Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1568316

Re: [PATCH 3/5] mm: vmscan: remove old flusher wakeup from direct reclaim path

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/5] mm: vmscan: remove old flusher wakeup from direct reclaim path
Date 2017-01-27 13:10 +0100
Message-ID <t4dvQ-3YT-33@gated-at.bofh.it> (permalink)
References <t2RnI-1o4-13@gated-at.bofh.it> <t2RnJ-1o4-37@gated-at.bofh.it> <t3Pa9-61W-9@gated-at.bofh.it> <t3Xr4-2rI-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu 26-01-17 13:50:27, Johannes Weiner wrote:
> On Thu, Jan 26, 2017 at 10:05:09AM +0000, Mel Gorman wrote:
> > On Mon, Jan 23, 2017 at 01:16:39PM -0500, Johannes Weiner wrote:
> > > Direct reclaim has been replaced by kswapd reclaim in pretty much all
> > > common memory pressure situations, so this code most likely doesn't
> > > accomplish the described effect anymore. The previous patch wakes up
> > > flushers for all reclaimers when we encounter dirty pages at the tail
> > > end of the LRU. Remove the crufty old direct reclaim invocation.
> > > 
> > > Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
> > 
> > In general I like this. I worried first that if kswapd is blocked
> > writing pages that it won't reach the wakeup_flusher_threads but the
> > previous patch handles it.
> > 
> > Now though, it occurs to me with the last patch that we always writeout
> > the world when flushing threads. This may not be a great idea. Consider
> > for example if there is a heavy writer of short-lived tmp files. In such a
> > case, it is possible for the files to be truncated before they even hit the
> > disk. However, if there are multiple "writeout the world" calls, these may
> > now be hitting the disk. Furthermore, multiplle kswapd and direct reclaimers
> > could all be requested to writeout the world and each request unplugs.
> > 
> > Is it possible to maintain the property of writing back pages relative
> > to the numbers of pages scanned or have you determined already that it's
> > not necessary?
> 
> That's what I started out with - waking the flushers for nr_taken. I
> was using a silly test case that wrote < dirty background limit and
> then allocated a burst of anon memory. When the dirty data is linear,
> the bigger IO requests are beneficial. They don't exhaust struct
> request (like kswapd 4k IO routinely does, and SWAP_CLUSTER_MAX is
> only 32), and they require less frequent plugging.
> 
> Force-flushing temporary files under memory pressure is a concern -
> although the most recently dirtied files would get queued last, giving
> them still some time to get truncated - but I'm wary about splitting
> the flush requests too aggressively when we DO sustain throngs of
> dirty pages hitting the reclaim scanners.

I think the above would be helpful in the changelog for future
reference.

-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3/5] mm: vmscan: remove old flusher wakeup from direct reclaim path Johannes Weiner <hannes@cmpxchg.org> - 2017-01-23 19:20 +0100
  Re: [PATCH 3/5] mm: vmscan: remove old flusher wakeup from direct  reclaim path Minchan Kim <minchan@kernel.org> - 2017-01-26 02:40 +0100
  Re: [PATCH 3/5] mm: vmscan: remove old flusher wakeup from direct  reclaim path Mel Gorman <mgorman@suse.de> - 2017-01-26 11:10 +0100
    Re: [PATCH 3/5] mm: vmscan: remove old flusher wakeup from direct  reclaim path Johannes Weiner <hannes@cmpxchg.org> - 2017-01-26 20:00 +0100
      Re: [PATCH 3/5] mm: vmscan: remove old flusher wakeup from direct  reclaim path Mel Gorman <mgorman@suse.de> - 2017-01-26 21:50 +0100
      Re: [PATCH 3/5] mm: vmscan: remove old flusher wakeup from direct  reclaim path Michal Hocko <mhocko@kernel.org> - 2017-01-27 13:10 +0100
        Re: [PATCH 3/5] mm: vmscan: remove old flusher wakeup from direct  reclaim path Mel Gorman <mgorman@suse.de> - 2017-01-27 15:50 +0100
  Re: [PATCH 3/5] mm: vmscan: remove old flusher wakeup from direct  reclaim path Michal Hocko <mhocko@kernel.org> - 2017-01-26 14:30 +0100

csiph-web