lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160623113153.GU1868@techsingularity.net>
Date:	Thu, 23 Jun 2016 12:31:53 +0100
From:	Mel Gorman <mgorman@...hsingularity.net>
To:	Hillf Danton <hillf.zj@...baba-inc.com>
Cc:	Johannes Weiner <hannes@...xchg.org>,
	Vlastimil Babka <vbabka@...e.cz>,
	linux-kernel <linux-kernel@...r.kernel.org>, linux-mm@...ck.org
Subject: Re: [PATCH 06/27] mm, vmscan: Make kswapd reclaim in terms of nodes

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ