Re: [PATCH] drm/amdgpu: Fix a BUG_ON due to resv trylock fails

2021-05-23 Thread Christian König
Am 22.05.21 um 04:57 schrieb Felix Kuehling: When the BO gets individualized, there is an assumption that nobody is accessing it any more. See this comment in ttm_bo_individualize_resv: /* This works because the BO is about to be destroyed and nobody * referen

Re: [PATCH] drm/amdgpu: Fix a BUG_ON due to resv trylock fails

2021-05-21 Thread Felix Kuehling
When the BO gets individualized, there is an assumption that nobody is accessing it any more. See this comment in ttm_bo_individualize_resv: /* This works because the BO is about to be destroyed and nobody * reference it any more. The only tricky case is the tryloc

[PATCH] drm/amdgpu: Fix a BUG_ON due to resv trylock fails

2021-05-21 Thread xinhui pan
The reservation object might be locked again by evict/swap after individualized. The race is like below. cpu 0 cpu 1 BO release BO evict or swap lock lru_lock ttm_bo_individualize_resv {resv = &_r