linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@techsingularity.net>
To: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org
Subject: Re: [PATCH 06/27] mm, vmscan: Make kswapd reclaim in terms of nodes
Date: Thu, 23 Jun 2016 12:31:53 +0100	[thread overview]
Message-ID: <20160623113153.GU1868@techsingularity.net> (raw)
In-Reply-To: <072501d1cc61$f51a2380$df4e6a80$@alibaba-inc.com>

On Wed, Jun 22, 2016 at 04:42:06PM +0800, Hillf Danton wrote:
> >  	/*
> > -	 * If a zone reaches its high watermark, consider it to be no longer
> > -	 * congested. It's possible there are dirty pages backed by congested
> > -	 * BDIs but as pressure is relieved, speculatively avoid congestion
> > -	 * waits.
> > +	 * Fragmentation may mean that the system cannot be rebalanced for
> > +	 * high-order allocations. If twice the allocation size has been
> > +	 * reclaimed then recheck watermarks only at order-0 to prevent
> > +	 * excessive reclaim. Assume that a process requested a high-order
> > +	 * can direct reclaim/compact.
> >  	 */
> > -	if (pgdat_reclaimable(zone->zone_pgdat) &&
> > -	    zone_balanced(zone, sc->order, false, 0, classzone_idx)) {
> > -		clear_bit(PGDAT_CONGESTED, &pgdat->flags);
> > -		clear_bit(PGDAT_DIRTY, &pgdat->flags);
> > -	}
> > +	if (sc->order && sc->nr_reclaimed >= 2UL << sc->order)
> > +		sc->order = 0;
> > 
> 
> Reclaim order is changed here.
> Btw, I find no such change in current code.
> 

It is reintroducing a check removed by commit accf62422b3a ("mm, kswapd: replace
kswapd compaction with waking up kcompactd"). That patch had kswapd
always check at order-0 once kswapd is awake in pgdat_balanced but would
still take at least one pass through reclaiming so kcompactd potentially
makes progress.

This patch removes pgdat_balanced entirely and zone_balanced() checks the
order it is asked like it used to. Hence, it is necessary to reset sc->order
once progress is made or kswapd potentially stays awake reclaiming pages
until a high-order page is freed.

-- 
Mel Gorman
SUSE Labs

  reply	other threads:[~2016-06-23 11:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <071801d1cc5c$245087d0$6cf19770$@alibaba-inc.com>
2016-06-22  8:42 ` [PATCH 06/27] mm, vmscan: Make kswapd reclaim in terms of nodes Hillf Danton
2016-06-23 11:31   ` Mel Gorman [this message]
2016-06-21 14:15 [PATCH 00/27] Move LRU page reclaim from zones to nodes v7 Mel Gorman
2016-06-21 14:15 ` [PATCH 06/27] mm, vmscan: Make kswapd reclaim in terms of nodes Mel Gorman
     [not found] <02fe01d1c48b$c44e9e80$4cebdb80$@alibaba-inc.com>
2016-06-12  9:33 ` Hillf Danton
2016-06-14 14:52   ` Mel Gorman
  -- strict thread matches above, loose matches on Subject: below --
2016-06-09 18:04 [PATCH 00/27] Move LRU page reclaim from zones to nodes v6 Mel Gorman
2016-06-09 18:04 ` [PATCH 06/27] mm, vmscan: Make kswapd reclaim in terms of nodes Mel Gorman
2016-06-15 14:23   ` Vlastimil Babka
2016-04-15  9:13 [PATCH 00/27] Move LRU page reclaim from zones to nodes v5 Mel Gorman
2016-04-15  9:13 ` [PATCH 06/27] mm, vmscan: Make kswapd reclaim in terms of nodes Mel Gorman
2016-04-28  8:36   ` Vlastimil Babka

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=20160623113153.GU1868@techsingularity.net \
    --to=mgorman@techsingularity.net \
    --cc=hannes@cmpxchg.org \
    --cc=hillf.zj@alibaba-inc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=vbabka@suse.cz \
    /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;
as well as URLs for NNTP newsgroup(s).