Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-24 Thread Daniel Vetter
On Wed, Mar 24, 2021 at 01:07:44PM +0100, Christian König wrote: > > > Am 24.03.21 um 13:01 schrieb Daniel Vetter: > > On Wed, Mar 24, 2021 at 01:00:28PM +0100, Christian König wrote: > > > Am 24.03.21 um 12:55 schrieb Daniel Vetter: > > > > On Wed, Mar 24, 2021 at 11:19:13AM +0100, Thomas

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-24 Thread Christian König
Am 24.03.21 um 13:01 schrieb Daniel Vetter: On Wed, Mar 24, 2021 at 01:00:28PM +0100, Christian König wrote: Am 24.03.21 um 12:55 schrieb Daniel Vetter: On Wed, Mar 24, 2021 at 11:19:13AM +0100, Thomas Hellström (Intel) wrote: On 3/23/21 4:45 PM, Christian König wrote: Am 23.03.21 um 16:13

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-24 Thread Daniel Vetter
On Wed, Mar 24, 2021 at 01:00:28PM +0100, Christian König wrote: > Am 24.03.21 um 12:55 schrieb Daniel Vetter: > > On Wed, Mar 24, 2021 at 11:19:13AM +0100, Thomas Hellström (Intel) wrote: > > > On 3/23/21 4:45 PM, Christian König wrote: > > > > Am 23.03.21 um 16:13 schrieb Michal Hocko: > > > > >

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-24 Thread Christian König
Am 24.03.21 um 12:55 schrieb Daniel Vetter: On Wed, Mar 24, 2021 at 11:19:13AM +0100, Thomas Hellström (Intel) wrote: On 3/23/21 4:45 PM, Christian König wrote: Am 23.03.21 um 16:13 schrieb Michal Hocko: On Tue 23-03-21 14:56:54, Christian König wrote: Am 23.03.21 um 14:41 schrieb Michal

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-24 Thread Daniel Vetter
On Wed, Mar 24, 2021 at 11:19:13AM +0100, Thomas Hellström (Intel) wrote: > > On 3/23/21 4:45 PM, Christian König wrote: > > Am 23.03.21 um 16:13 schrieb Michal Hocko: > > > On Tue 23-03-21 14:56:54, Christian König wrote: > > > > Am 23.03.21 um 14:41 schrieb Michal Hocko: > > > [...] > > > > >

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-24 Thread Intel
On 3/23/21 4:45 PM, Christian König wrote: Am 23.03.21 um 16:13 schrieb Michal Hocko: On Tue 23-03-21 14:56:54, Christian König wrote: Am 23.03.21 um 14:41 schrieb Michal Hocko: [...] Anyway, I am wondering whether the overall approach is sound. Why don't you simply use shmem as your

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Michal Hocko
On Tue 23-03-21 14:56:54, Christian König wrote: > Am 23.03.21 um 14:41 schrieb Michal Hocko: [...] > > Anyway, I am wondering whether the overall approach is sound. Why don't > > you simply use shmem as your backing storage from the beginning and pin > > those pages if they are used by the

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Michal Hocko
On Tue 23-03-21 14:06:25, Christian König wrote: > Am 23.03.21 um 13:37 schrieb Michal Hocko: > > On Tue 23-03-21 13:21:32, Christian König wrote: [...] > > > Ideally I would like to be able to trigger swapping out the shmem page I > > > allocated immediately after doing the copy. > > So let me

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Michal Hocko
On Tue 23-03-21 14:15:05, Daniel Vetter wrote: > On Tue, Mar 23, 2021 at 01:04:03PM +0100, Michal Hocko wrote: > > On Tue 23-03-21 12:48:58, Christian König wrote: > > > Am 23.03.21 um 12:28 schrieb Daniel Vetter: > > > > On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote: > > > > > I

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Michal Hocko
On Tue 23-03-21 13:21:32, Christian König wrote: > Am 23.03.21 um 13:04 schrieb Michal Hocko: > > On Tue 23-03-21 12:48:58, Christian König wrote: > > > Am 23.03.21 um 12:28 schrieb Daniel Vetter: > > > > On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote: > > > > > On Mon 22-03-21

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Michal Hocko
On Tue 23-03-21 12:51:13, Christian König wrote: > > > Am 23.03.21 um 12:46 schrieb Michal Hocko: > > On Tue 23-03-21 12:28:20, Daniel Vetter wrote: > > > On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote: > > [...] > > > > > > fs_reclaim_acquire is there to make sure lockdep

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Michal Hocko
On Tue 23-03-21 12:28:20, Daniel Vetter wrote: > On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote: [...] > > > > fs_reclaim_acquire is there to make sure lockdep understands that this > > > > is a shrinker and that it checks all the dependencies for us like if > > > > we'd be in real

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Michal Hocko
On Tue 23-03-21 12:48:58, Christian König wrote: > Am 23.03.21 um 12:28 schrieb Daniel Vetter: > > On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote: > > > On Mon 22-03-21 20:34:25, Christian König wrote: [...] > > > > My only concern is that if I could rely on memalloc_no* being used

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Christian König
Am 23.03.21 um 16:13 schrieb Michal Hocko: On Tue 23-03-21 14:56:54, Christian König wrote: Am 23.03.21 um 14:41 schrieb Michal Hocko: [...] Anyway, I am wondering whether the overall approach is sound. Why don't you simply use shmem as your backing storage from the beginning and pin those

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Christian König
Am 23.03.21 um 14:41 schrieb Michal Hocko: On Tue 23-03-21 14:06:25, Christian König wrote: Am 23.03.21 um 13:37 schrieb Michal Hocko: On Tue 23-03-21 13:21:32, Christian König wrote: [...] Ideally I would like to be able to trigger swapping out the shmem page I allocated immediately after

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Daniel Vetter
On Tue, Mar 23, 2021 at 01:04:03PM +0100, Michal Hocko wrote: > On Tue 23-03-21 12:48:58, Christian König wrote: > > Am 23.03.21 um 12:28 schrieb Daniel Vetter: > > > On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote: > > > > I think this is where I don't get yet what Christian tries to

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Christian König
Am 23.03.21 um 13:37 schrieb Michal Hocko: On Tue 23-03-21 13:21:32, Christian König wrote: Am 23.03.21 um 13:04 schrieb Michal Hocko: On Tue 23-03-21 12:48:58, Christian König wrote: Am 23.03.21 um 12:28 schrieb Daniel Vetter: On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote:

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Christian König
Am 23.03.21 um 13:04 schrieb Michal Hocko: On Tue 23-03-21 12:48:58, Christian König wrote: Am 23.03.21 um 12:28 schrieb Daniel Vetter: On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote: On Mon 22-03-21 20:34:25, Christian König wrote: [...] My only concern is that if I could

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Michal Hocko
On Mon 22-03-21 20:34:25, Christian König wrote: > Am 22.03.21 um 18:02 schrieb Daniel Vetter: > > On Mon, Mar 22, 2021 at 5:06 PM Michal Hocko wrote: > > > On Mon 22-03-21 14:05:48, Matthew Wilcox wrote: > > > > On Mon, Mar 22, 2021 at 02:49:27PM +0100, Daniel Vetter wrote: > > > > > On Sun, Mar

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Daniel Vetter
On Tue, Mar 23, 2021 at 12:51:13PM +0100, Christian König wrote: > > > Am 23.03.21 um 12:46 schrieb Michal Hocko: > > On Tue 23-03-21 12:28:20, Daniel Vetter wrote: > > > On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote: > > [...] > > > > > > fs_reclaim_acquire is there to make sure

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Christian König
Am 23.03.21 um 12:46 schrieb Michal Hocko: On Tue 23-03-21 12:28:20, Daniel Vetter wrote: On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote: [...] fs_reclaim_acquire is there to make sure lockdep understands that this is a shrinker and that it checks all the dependencies for us

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Christian König
Am 23.03.21 um 12:28 schrieb Daniel Vetter: On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote: On Mon 22-03-21 20:34:25, Christian König wrote: Am 22.03.21 um 18:02 schrieb Daniel Vetter: On Mon, Mar 22, 2021 at 5:06 PM Michal Hocko wrote: On Mon 22-03-21 14:05:48, Matthew Wilcox

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-23 Thread Daniel Vetter
On Tue, Mar 23, 2021 at 08:38:33AM +0100, Michal Hocko wrote: > On Mon 22-03-21 20:34:25, Christian König wrote: > > Am 22.03.21 um 18:02 schrieb Daniel Vetter: > > > On Mon, Mar 22, 2021 at 5:06 PM Michal Hocko wrote: > > > > On Mon 22-03-21 14:05:48, Matthew Wilcox wrote: > > > > > On Mon, Mar

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-22 Thread Michal Hocko
On Mon 22-03-21 14:05:48, Matthew Wilcox wrote: > On Mon, Mar 22, 2021 at 02:49:27PM +0100, Daniel Vetter wrote: > > On Sun, Mar 21, 2021 at 03:18:28PM +0100, Christian König wrote: > > > Am 20.03.21 um 14:17 schrieb Daniel Vetter: > > > > On Sat, Mar 20, 2021 at 10:04 AM Christian König > > > >

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-22 Thread Christian König
Am 22.03.21 um 18:02 schrieb Daniel Vetter: On Mon, Mar 22, 2021 at 5:06 PM Michal Hocko wrote: On Mon 22-03-21 14:05:48, Matthew Wilcox wrote: On Mon, Mar 22, 2021 at 02:49:27PM +0100, Daniel Vetter wrote: On Sun, Mar 21, 2021 at 03:18:28PM +0100, Christian König wrote: Am 20.03.21 um

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-22 Thread Daniel Vetter
On Mon, Mar 22, 2021 at 5:06 PM Michal Hocko wrote: > > On Mon 22-03-21 14:05:48, Matthew Wilcox wrote: > > On Mon, Mar 22, 2021 at 02:49:27PM +0100, Daniel Vetter wrote: > > > On Sun, Mar 21, 2021 at 03:18:28PM +0100, Christian König wrote: > > > > Am 20.03.21 um 14:17 schrieb Daniel Vetter: > >

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-22 Thread Matthew Wilcox
On Mon, Mar 22, 2021 at 02:49:27PM +0100, Daniel Vetter wrote: > On Sun, Mar 21, 2021 at 03:18:28PM +0100, Christian König wrote: > > Am 20.03.21 um 14:17 schrieb Daniel Vetter: > > > On Sat, Mar 20, 2021 at 10:04 AM Christian König > > > wrote: > > > > Am 19.03.21 um 20:06 schrieb Daniel Vetter:

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-22 Thread Daniel Vetter
On Mon, Mar 22, 2021 at 02:05:48PM +, Matthew Wilcox wrote: > On Mon, Mar 22, 2021 at 02:49:27PM +0100, Daniel Vetter wrote: > > On Sun, Mar 21, 2021 at 03:18:28PM +0100, Christian König wrote: > > > Am 20.03.21 um 14:17 schrieb Daniel Vetter: > > > > On Sat, Mar 20, 2021 at 10:04 AM Christian

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-22 Thread Daniel Vetter
On Sun, Mar 21, 2021 at 03:18:28PM +0100, Christian König wrote: > Am 20.03.21 um 14:17 schrieb Daniel Vetter: > > On Sat, Mar 20, 2021 at 10:04 AM Christian König > > wrote: > > > Am 19.03.21 um 20:06 schrieb Daniel Vetter: > > > > On Fri, Mar 19, 2021 at 07:53:48PM +0100, Christian König wrote:

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure v2

2021-03-22 Thread Daniel Vetter
On Mon, Mar 22, 2021 at 12:22 PM Christian König wrote: > > Don't print a warning when we fail to allocate a page for swapping things out. > > v2: only stop the warning > > Signed-off-by: Christian König Reviewed-by: Daniel Vetter It is kinda surprising that page allocator warns here even

[PATCH] drm/ttm: stop warning on TT shrinker failure v2

2021-03-22 Thread Christian König
Don't print a warning when we fail to allocate a page for swapping things out. v2: only stop the warning Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_tt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-21 Thread Christian König
Am 20.03.21 um 14:17 schrieb Daniel Vetter: On Sat, Mar 20, 2021 at 10:04 AM Christian König wrote: Am 19.03.21 um 20:06 schrieb Daniel Vetter: On Fri, Mar 19, 2021 at 07:53:48PM +0100, Christian König wrote: Am 19.03.21 um 18:52 schrieb Daniel Vetter: On Fri, Mar 19, 2021 at 03:08:57PM

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-20 Thread Daniel Vetter
On Sat, Mar 20, 2021 at 10:04 AM Christian König wrote: > > Am 19.03.21 um 20:06 schrieb Daniel Vetter: > > On Fri, Mar 19, 2021 at 07:53:48PM +0100, Christian König wrote: > >> Am 19.03.21 um 18:52 schrieb Daniel Vetter: > >>> On Fri, Mar 19, 2021 at 03:08:57PM +0100, Christian König wrote: >

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-20 Thread Christian König
Am 19.03.21 um 20:06 schrieb Daniel Vetter: On Fri, Mar 19, 2021 at 07:53:48PM +0100, Christian König wrote: Am 19.03.21 um 18:52 schrieb Daniel Vetter: On Fri, Mar 19, 2021 at 03:08:57PM +0100, Christian König wrote: Don't print a warning when we fail to allocate a page for swapping things

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-19 Thread Daniel Vetter
On Fri, Mar 19, 2021 at 07:53:48PM +0100, Christian König wrote: > Am 19.03.21 um 18:52 schrieb Daniel Vetter: > > On Fri, Mar 19, 2021 at 03:08:57PM +0100, Christian König wrote: > > > Don't print a warning when we fail to allocate a page for swapping things > > > out. > > > > > > Also rely on

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-19 Thread Christian König
Am 19.03.21 um 18:52 schrieb Daniel Vetter: On Fri, Mar 19, 2021 at 03:08:57PM +0100, Christian König wrote: Don't print a warning when we fail to allocate a page for swapping things out. Also rely on memalloc_nofs_save/memalloc_nofs_restore instead of GFP_NOFS. Uh this part doesn't make

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-19 Thread Daniel Vetter
On Fri, Mar 19, 2021 at 03:08:57PM +0100, Christian König wrote: > Don't print a warning when we fail to allocate a page for swapping things out. > > Also rely on memalloc_nofs_save/memalloc_nofs_restore instead of GFP_NOFS. Uh this part doesn't make sense. Especially since you only do it for

Re: [PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-19 Thread Deucher, Alexander
[AMD Official Use Only - Internal Distribution Only] + Leo From: amd-gfx on behalf of Christian König Sent: Friday, March 19, 2021 10:08 AM To: Liu, Leo ; amd-gfx@lists.freedesktop.org ; dri-de...@lists.freedesktop.org Subject: [PATCH] drm/ttm: stop warning

[PATCH] drm/ttm: stop warning on TT shrinker failure

2021-03-19 Thread Christian König
Don't print a warning when we fail to allocate a page for swapping things out. Also rely on memalloc_nofs_save/memalloc_nofs_restore instead of GFP_NOFS. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_tt.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git