[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <154160489128.4321.4951578054574913878@skylake-alporthouse-com>
Date: Wed, 07 Nov 2018 15:34:51 +0000
From: Chris Wilson <chris@...is-wilson.co.uk>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: intel-gfx@...ts.freedesktop.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Kuo-Hsin Yang <vovoy@...omium.org>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
Dave Hansen <dave.hansen@...el.com>
Subject: Re: [PATCH v7] mm, drm/i915: mark pinned shmemfs pages as unevictable
Quoting Andrew Morton (2018-11-06 18:12:11)
> On Tue, 6 Nov 2018 13:23:24 +0000 Chris Wilson <chris@...is-wilson.co.uk> wrote:
>
> > From: Kuo-Hsin Yang <vovoy@...omium.org>
> >
> > 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 inactive anon lru are pinned, and only the inactive
> > anon lru is scanned due to inactive_ratio, the system cannot swap and
> > invokes the oom-killer. Mark these pinned pages as unevictable to speed
> > up vmscan.
> >
> > Export pagevec API check_move_unevictable_pages().
> >
> > This patch was inspired by Chris Wilson's change [1].
> >
> > [1]: https://patchwork.kernel.org/patch/9768741/
> >
> > ...
> >
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -2382,12 +2382,26 @@ void __i915_gem_object_invalidate(struct drm_i915_gem_object *obj)
> > invalidate_mapping_pages(mapping, 0, (loff_t)-1);
> > }
> >
> > +/**
>
> This token is used to introduce a kerneldoc comment.
>
> > + * Move pages to appropriate lru and release the pagevec. Decrement the ref
> > + * count of these pages.
> > + */
>
> But this isn't a kerneldoc comment.
>
> At least, I don't think it is. Maybe the parser got smarter when I
> wasn't looking.
>
> > +static inline void check_release_pagevec(struct pagevec *pvec)
> > +{
> > + if (pagevec_count(pvec)) {
> > + check_move_unevictable_pages(pvec);
> > + __pagevec_release(pvec);
> > + cond_resched();
> > + }
> > +}
>
> This looks too large to be inlined and the compiler will ignore the
> `inline' anyway.
Applied both corrections.
> Otherwise, Acked-by: Andrew Morton <akpm@...ux-foundation.org>. Please
> go ahead and merge via the appropriate drm tree.
Thank you, pushed to drm-intel, expected to arrive around 4.21.
-Chris
Powered by blists - more mailing lists