Re: [Intel-gfx] [PATCH v6] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-11-06 Thread Kuo-Hsin Yang
On Tue, Nov 6, 2018 at 6:54 PM Daniel Vetter wrote: > There was ages ago some planes to have our own i915fs, so that we could > overwrite the address_space hooks for page migration and eviction and that > sort of thing, which would make all these pages evictable. Atm you have to > ĥope our shrinke

Re: [Intel-gfx] [PATCH v7] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-11-06 Thread Kuo-Hsin Yang
On Tue, Nov 6, 2018 at 9:23 PM Chris Wilson wrote: > Cc: Chris Wilson > Cc: Joonas Lahtinen > Cc: Peter Zijlstra > Cc: Andrew Morton > Cc: Dave Hansen > Signed-off-by: Kuo-Hsin Yang > Acked-by: Michal Hocko # mm part > Reviewed-by: Chris Wilson Thanks f

Re: [Intel-gfx] [PATCH v6] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-11-06 Thread Kuo-Hsin Yang
On Tue, Nov 6, 2018 at 7:07 PM Chris Wilson wrote: > This gave disappointing syslatency results until I put a cond_resched() > here and moved the one in put_pages_gtt to before the page alloc, see > https://patchwork.freedesktop.org/patch/260332/ > > The last really nasty wart for syslatency is th

[Intel-gfx] [PATCH v6] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-11-06 Thread Kuo-Hsin Yang
hange [1]. [1]: https://patchwork.kernel.org/patch/9768741/ Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Peter Zijlstra Cc: Andrew Morton Cc: Dave Hansen Signed-off-by: Kuo-Hsin Yang Acked-by: Michal Hocko # mm part --- Changes for v6: Tweak the acked-by. Changes for v5: Modify doc and com

Re: [Intel-gfx] [PATCH v5] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-11-06 Thread Kuo-Hsin Yang
On Tue, Nov 6, 2018 at 5:08 PM Michal Hocko wrote: > > On Tue 06-11-18 17:03:51, Kuo-Hsin Yang wrote: > > The i915 driver uses shmemfs to allocate backing storage for gem > > objects. These shmemfs pages can be pinned (increased ref count) by > > shmem_read_mapping_page_gf

[Intel-gfx] [PATCH v5] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-11-06 Thread Kuo-Hsin Yang
hange [1]. [1]: https://patchwork.kernel.org/patch/9768741/ Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Peter Zijlstra Cc: Andrew Morton Cc: Dave Hansen Signed-off-by: Kuo-Hsin Yang Acked-by: Michal Hocko --- Changes for v5: Modify doc and comments. Remove the ifdef surrou

Re: [Intel-gfx] [PATCH v4] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-11-05 Thread Kuo-Hsin Yang
On Tue, Nov 6, 2018 at 2:52 AM Dave Hansen wrote: > > On 11/5/18 3:13 AM, Kuo-Hsin Yang wrote: > > -These are currently used in two places in the kernel: > > +These are currently used in three places in the kernel: > > > > (1) By ramfs to mark the address spac

Re: [Intel-gfx] [PATCH v4] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-11-05 Thread Kuo-Hsin Yang
On Tue, Nov 6, 2018 at 12:41 AM Michal Hocko wrote: > On Mon 05-11-18 22:33:13, Kuo-Hsin Yang wrote: > > OK, this function should not be specific to shmem pages. > > > > Is it OK to remove the #ifdef SHMEM surrounding > > check_move_unevictable_pages? > > Yes, I

Re: [Intel-gfx] [PATCH v4] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-11-05 Thread Kuo-Hsin Yang
On Mon, Nov 5, 2018 at 9:02 PM Michal Hocko wrote: > > On Mon 05-11-18 19:13:48, Kuo-Hsin Yang wrote: > > The i915 driver uses shmemfs to allocate backing storage for gem > > objects. These shmemfs pages can be pinned (increased ref count) by > > shmem_read_mapping_page_gf

Re: [Intel-gfx] [PATCH v3] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-11-05 Thread Kuo-Hsin Yang
On Fri, Nov 2, 2018 at 10:05 PM Dave Hansen wrote: > On 11/2/18 6:22 AM, Vovo Yang wrote: > > Chris helped to answer this question: > > Though it includes a few non-shmemfs objects, see > > debugfs/dri/0/i915_gem_objects and the "bound objects". > > > > Example i915_gem_object output: > > 591 ob

[Intel-gfx] [PATCH v4] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-11-05 Thread Kuo-Hsin Yang
hange [1]. [1]: https://patchwork.kernel.org/patch/9768741/ Cc: Chris Wilson Cc: Michal Hocko Cc: Joonas Lahtinen Cc: Peter Zijlstra Cc: Andrew Morton Cc: Dave Hansen Signed-off-by: Kuo-Hsin Yang --- Changes for v4: Export pagevec API check_move_unevictable_pages(). Changes for v3:

[Intel-gfx] [PATCH v3] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-10-31 Thread Kuo-Hsin Yang
Wilson's change [1]. [1]: https://patchwork.kernel.org/patch/9768741/ Cc: Chris Wilson Cc: Michal Hocko Cc: Joonas Lahtinen Cc: Peter Zijlstra Cc: Andrew Morton Cc: Dave Hansen Signed-off-by: Kuo-Hsin Yang --- The previous mapping_set_unevictable patch is worse on gem_syslatency becau

[Intel-gfx] [PATCH v2] shmem, drm/i915: mark pinned shmemfs pages as unevictable

2018-10-17 Thread Kuo-Hsin Yang
ge [1]. [1]: https://patchwork.kernel.org/patch/9768741/ Signed-off-by: Kuo-Hsin Yang --- Changes for v2: Squashed the two patches. Documentation/vm/unevictable-lru.rst | 4 +++- drivers/gpu/drm/i915/i915_gem.c | 8 mm/shmem.c | 2 ++ 3 files change

[Intel-gfx] [PATCH 1/2] shmem: export shmem_unlock_mapping

2018-10-16 Thread Kuo-Hsin Yang
mapping_clear_unevictable(), and move these pages back to evictable list with shmem_unlock_mapping(). Signed-off-by: Kuo-Hsin Yang --- Documentation/vm/unevictable-lru.rst | 4 +++- mm/shmem.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a

[Intel-gfx] [PATCH 2/2] drm/i915: Mark pinned shmemfs pages as unevictable

2018-10-16 Thread Kuo-Hsin Yang
speed up vmscan. Signed-off-by: Kuo-Hsin Yang --- drivers/gpu/drm/i915/i915_gem.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index fcc73a6ab503..e0ff5b736128 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers

[Intel-gfx] [PATCH 0/2] shmem, drm/i915: Mark pinned shmemfs pages as unevictable

2018-10-16 Thread Kuo-Hsin Yang
unevictable is sufficient to solve this issue. [1]: https://patchwork.kernel.org/patch/9768741/ Kuo-Hsin Yang (2): shmem: export shmem_unlock_mapping drm/i915: Mark pinned shmemfs pages as unevictable Documentation/vm/unevictable-lru.rst | 4 +++- drivers/gpu/drm/i915/i915_gem.c | 8