[PATCH] drm/gem: Mark pinned pages as unevictable
Chris Wilson
chris at chris-wilson.co.uk
Fri Dec 14 08:58:58 UTC 2018
Quoting Kuo-Hsin Yang (2018-12-14 08:41:35)
> The gem drivers use shmemfs to allocate backing storage for gem objects.
> These shmemfs pages can be pinned by shmem_read_mapping_page_gfp(). Mark
> these pinned pages as unevictable to speed up vmscan. See also similar
> patch on i915 driver [1].
One difference to contemplate is that i915 does at least attempt to
invalidate the pinning under mempressure (via the shrinker) and release
the pages back to the system. Yes, the same argument about the
ineffectiveness of use the evictable LRU while the pages are pinned by
GEM is there, but in general we lack the alternative LRU and a means of
tracking how much memory is held.
Do you have a driver in mind (msm?) to demonstrate the use case?
> [1]: https://patchwork.freedesktop.org/patch/msgid/20181106132324.17390-1-chris@chris-wilson.co.uk
Note that this first requires i915 merged into drm-misc-next.
-Chris
More information about the dri-devel
mailing list