From: Michal Hocko <mhocko@suse.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, Hugh Dickins <hughd@google.com>,
Matthew Auld <matthew.auld@intel.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH v2 5/5] drm/i915: Start writeback from the shrinker
Date: Fri, 9 Jun 2017 15:35:58 +0200 [thread overview]
Message-ID: <20170609133558.GG21764@dhcp22.suse.cz> (raw)
In-Reply-To: <149700911784.23435.5596315979107409786@mail.alporthouse.com>
On Fri 09-06-17 12:51:57, Chris Wilson wrote:
> Quoting Michal Hocko (2017-06-09 12:17:26)
> > [Add Hugh]
> >
> > On Fri 09-06-17 12:03:50, Chris Wilson wrote:
> > > When we are called to relieve mempressue via the shrinker, the only way
> > > we can make progress is either by discarding unwanted pages (those
> > > objects that userspace has marked MADV_DONTNEED) or by reclaiming the
> > > dirty objects via swap. As we know that is the only way to make further
> > > progress, we can initiate the writeback as we invalidate the objects.
> > > This means the objects we put onto the inactive anon lru list are
> > > already marked for reclaim+writeback and so will trigger a wait upon the
> > > writeback inside direct reclaim, greatly improving the success rate of
> > > direct reclaim on i915 objects.
> > >
> > > The corollary is that we may start a slow swap on opportunistic
> > > mempressure from the likes of the compaction + migration kthreads. This
> > > is limited by those threads only being allowed to shrink idle pages, but
> > > also that if we reactivate the page before it is swapped out by gpu
> > > activity, we only page the cost of repinning the page. The cost is most
> > > felt when an object is reused after mempressure, which hopefully
> > > excludes the latency sensitive tasks (as we are just extending the
> > > impact of swap thrashing to them).
> >
> > I am not sure you can start writeback on shmem while it is not in the
> > swapcache. Hugh?
>
> Note this is just mm/vmscan.c::pageout(), and we call into shmem which
> is indeed responsible for adding it to the swapcache.
You are right. I would still like to hear from Hugh this is OK. It is
quite some time since I've looked into shmem.c.
> My intention was
> to simply start pageout() earlier to ensure the pages we tried to shrink
> were indeed being reclaimed.
Yes the intention is clear...
--
Michal Hocko
SUSE Labs
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-06-09 13:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 11:03 [PATCH v2 1/5] drm/i915: Encourage our shrinker more when our shmemfs allocations fails Chris Wilson
2017-06-09 11:03 ` [PATCH v2 2/5] drm/i915: Remove __GFP_NORETRY from our buffer allocator Chris Wilson
2017-06-09 11:07 ` Michal Hocko
2017-06-13 14:01 ` Joonas Lahtinen
2017-06-09 11:03 ` [PATCH v2 3/5] drm/i915: Only restrict noreclaim in the early shrink passes Chris Wilson
2017-06-13 14:02 ` Joonas Lahtinen
2017-06-09 11:03 ` [PATCH v2 4/5] drm/i915: Spin for struct_mutex inside shrinker Chris Wilson
2017-06-13 13:59 ` Joonas Lahtinen
2017-06-09 11:03 ` [PATCH v2 5/5] drm/i915: Start writeback from the shrinker Chris Wilson
2017-06-09 11:17 ` Michal Hocko
2017-06-09 11:51 ` Chris Wilson
2017-06-09 13:35 ` Michal Hocko [this message]
2017-06-13 14:07 ` Joonas Lahtinen
2017-06-14 10:03 ` Chris Wilson
2017-06-09 11:31 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/5] drm/i915: Encourage our shrinker more when our shmemfs allocations fails Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170609133558.GG21764@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=hughd@google.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox