Re: [resend PATCH] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-16 Thread Daniel Vetter
On Wed, Sep 15, 2021 at 12:05:30PM +0200, Christian König wrote: > Am 14.09.21 um 15:50 schrieb Daniel Vetter: > > On Thu, Sep 09, 2021 at 09:10:39AM +0200, Christian König wrote: > > > Am 08.09.21 um 20:27 schrieb Daniel Vetter: > > > > On Tue, Sep 07, 2021 at 11:28:23AM +0200, Christian König wro

Re: [resend PATCH] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-15 Thread Christian König
Am 14.09.21 um 15:50 schrieb Daniel Vetter: On Thu, Sep 09, 2021 at 09:10:39AM +0200, Christian König wrote: Am 08.09.21 um 20:27 schrieb Daniel Vetter: On Tue, Sep 07, 2021 at 11:28:23AM +0200, Christian König wrote: Am 07.09.21 um 11:05 schrieb Daniel Vetter: On Tue, Sep 07, 2021 at 08:22:2

Re: [resend PATCH] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-14 Thread Daniel Vetter
On Thu, Sep 09, 2021 at 09:10:39AM +0200, Christian König wrote: > Am 08.09.21 um 20:27 schrieb Daniel Vetter: > > On Tue, Sep 07, 2021 at 11:28:23AM +0200, Christian König wrote: > > > Am 07.09.21 um 11:05 schrieb Daniel Vetter: > > > > On Tue, Sep 07, 2021 at 08:22:20AM +0200, Christian König wro

Re: [resend PATCH] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-09 Thread Christian König
Am 08.09.21 um 20:27 schrieb Daniel Vetter: On Tue, Sep 07, 2021 at 11:28:23AM +0200, Christian König wrote: Am 07.09.21 um 11:05 schrieb Daniel Vetter: On Tue, Sep 07, 2021 at 08:22:20AM +0200, Christian König wrote: Added a Fixes tag and pushed this to drm-misc-fixes. We're in the merge win

Re: [resend PATCH] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-08 Thread Daniel Vetter
On Tue, Sep 07, 2021 at 11:28:23AM +0200, Christian König wrote: > Am 07.09.21 um 11:05 schrieb Daniel Vetter: > > On Tue, Sep 07, 2021 at 08:22:20AM +0200, Christian König wrote: > > > Added a Fixes tag and pushed this to drm-misc-fixes. > > We're in the merge window, this should have been drm-mis

Re: [resend PATCH] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-07 Thread Christian König
Am 07.09.21 um 11:05 schrieb Daniel Vetter: On Tue, Sep 07, 2021 at 08:22:20AM +0200, Christian König wrote: Added a Fixes tag and pushed this to drm-misc-fixes. We're in the merge window, this should have been drm-misc-next-fixes. I'll poke misc maintainers so it's not lost. Hui? It's a fix

Re: [resend PATCH] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-07 Thread Daniel Vetter
On Tue, Sep 07, 2021 at 08:22:20AM +0200, Christian König wrote: > Added a Fixes tag and pushed this to drm-misc-fixes. We're in the merge window, this should have been drm-misc-next-fixes. I'll poke misc maintainers so it's not lost. -Daniel > > It will take a while until it cycles back into th

Re: [resend PATCH] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-06 Thread Christian König
Added a Fixes tag and pushed this to drm-misc-fixes. It will take a while until it cycles back into the development branches, so feel free to push some version to amd-staging-drm-next as well. Just ping Alex when you do this. Thanks, Christian. Am 07.09.21 um 06:08 schrieb xinhui pan: The r

[resend PATCH] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-06 Thread xinhui pan
The ret value might be -EBUSY, caller will think lru lock is still locked but actually NOT. So return -ENOSPC instead. Otherwise we hit list corruption. ttm_bo_cleanup_refs might fail too if BO is not idle. If we return 0, caller(ttm_tt_populate -> ttm_global_swapout ->ttm_device_swapout) will be