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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110802102231.GC10436@suse.de>
Date:	Tue, 2 Aug 2011 11:22:31 +0100
From:	Mel Gorman <mgorman@...e.de>
To:	"Alex,Shi" <alex.shi@...el.com>
Cc:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"P@...igBrady.com" <P@...igBrady.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"andrea@...share.com" <andrea@...share.com>,
	"Chen, Tim C" <tim.c.chen@...el.com>,
	"Li, Shaohua" <shaohua.li@...el.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"riel@...hat.com" <riel@...hat.com>, "luto@....edu" <luto@....edu>
Subject: Re: [PATCH] kswapd: avoid unnecessary rebalance after an
 unsuccessful balancing

On Mon, Aug 01, 2011 at 08:45:17AM +0800, Alex,Shi wrote:
> On Fri, 2011-07-29 at 23:40 +0800, Mel Gorman wrote:
> > On Fri, Jul 29, 2011 at 11:23:10PM +0800, Alex Shi wrote:
> > > In commit 215ddd66, Mel Gorman said kswapd is better to sleep after a
> > > unsuccessful balancing if there is tighter reclaim request pending in
> > > the balancing. In this scenario, the 'order' and 'classzone_idx'
> > > that are checked for tighter request judgment is incorrect, since they
> > > aren't the one kswapd should read from new pgdat, but the last time pgdat
> > > value for just now balancing. Then kswapd will skip try_to_sleep func
> > > and rebalance the last pgdat request. It's not our expected behavior.
> > > 
> > > So, I added new variables to distinguish the returned order/classzone_idx
> > > from last balancing, that can resolved above issue in that scenario.
> > > 
> > 
> > I'm afraid this changelog is very difficult to read and I do not see
> > what problem you are trying to solve and I do not see what this patch
> > might solve.
> > 
> > When balance_pgdat() returns with a lower classzone or order, the values
> > stored in pgdat are not re-read and instead it tries to go to sleep
> > based on the starting request. Something like;
> 
> Thanks for your comments, I will use this comments style next time, list
> request A, B etc. 
> 
> > 
> > 1. Read pgdat request A (classzone_idx, order)
> 
> Assume the order of A > 0, like is 3.
> 
> > 2. balance_pgdat()
> > 3.During pgdat, a new pgdat request B (classzone_idx, order) is placed
> > 4. balance_pgdat() returns but failed so classzone_idx is lower
> 
> Another balance_pgdat() failure indicate is returned order == 0, am I
> right? 

Yes.

> If so, the next step of kswapd is not trying to sleep, but do
> request A balance again.  And I thought this behavior doesn't match the
> comments in kswapd. 
> 

You're right. I was thinking only of classzone_idx. I see the point now.

Acked-by: Mel Gorman <mgorman@...e.de>

-- 
Mel Gorman
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ