Re: [PATCH] drm/gem: Mark pinned pages as unevictable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 14, 2018 at 5:51 PM Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:
>
> Quoting Kuo-Hsin Yang (2018-12-14 09:33:19)
> > On Fri, Dec 14, 2018 at 4:59 PM Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:
> > >
> > >
> > > Do you have a driver in mind (msm?) to demonstrate the use case?
> >
> > On Samsung Chromebook Plus, the drm/rockchip driver may call
> > rockchip_gem_get_pages()/drm_gem_get_pages() to pin a lot of pages,
> > breaking the page reclaim mechanism and causing oom-killer invocation.
>
> Hmm, but this doesn't change the unavailability of the pages, just how
> much work the shrinker must do scanning the evictable lists containing
> GEM pages to no avail. So it won't prevent an oom by itself because
> rockchip will still be holding the pages.
>
> Or?

When the size of a zone is 4GB, the inactive_ratio is 5. If all pages
in the inactive_anon are pinned and active_anon / inactive_anon < 5,
page reclaim would only scan inactive_anon due to inactive_ratio. It
breaks page reclaim when the rockchip driver only pins about 1/6 of
the anon lru pages. If the pinned pages are marked unevictable, the
oom-killer would be invoked when anon lru is close to 0.

An example dmesg with oom-killer invocation shows there are still a
lot of anon lru pages:

[  516.170949] TaskSchedulerFo invoked oom-killer: gfp_mask=0x24200ca,
order=0, oom_score_adj=300
...
[  516.211085] Mem-Info:
[  516.211116] DMA free:48816kB min:45056kB low:56320kB high:67584kB
active_anon:1453484kB inactive_anon:309284kB active_file:208808kB
inactive_file:177308kB unevictable:0kB isolated(anon):3200kB
isolated(file):0kB present:4059136kB managed:3904852kB mlocked:0kB
dirty:0kB writeback:0kB mapped:245000kB shmem:323300kB
slab_reclaimable:43540kB slab_unreclaimable:87896kB
kernel_stack:31520kB pagetables:59440kB unstable:0kB bounce:0kB
free_pcp:588kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB
pages_scanned:10977908 all_unreclaimable? yes
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux