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 v6] mm, drm/i915: mark pinned shmemfs pages as unevictable

2018-11-06 Thread Michal Hocko
On Tue 06-11-18 11:06:58, Chris Wilson wrote: [...] > The challenge for the patch as it stands, is who lands it? We can take > it through drm-intel (for merging in 4.21) but need Andrew's ack on top > of all to agree with that path. Or we split the patch and only land the > i915 portion once we bac

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

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

2018-11-06 Thread Chris Wilson
Quoting Kuo-Hsin Yang (2018-11-06 09:30:59) > 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_gfp(). When a lot of pages are pinned, vmscan > wastes a lot of time scanning these pinned p

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

2018-11-06 Thread Daniel Vetter
On Tue, Nov 06, 2018 at 05:30:59PM +0800, 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_gfp(). When a lot of pages are pinned, vmscan > wastes a lot of time scan

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

2018-11-06 Thread Kuo-Hsin Yang
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_gfp(). When a lot of pages are pinned, vmscan wastes a lot of time scanning these pinned pages. In some extreme case, all pages in the inactiv