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]
Date:	Tue, 30 Nov 2010 20:19:28 +0900 (JST)
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Mel Gorman <mel@....ul.ie>
Cc:	kosaki.motohiro@...fujitsu.com, Simon Kirby <sim@...tway.ca>,
	Shaohua Li <shaohua.li@...el.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Dave Hansen <dave@...ux.vnet.ibm.com>
Subject: Re: Free memory never fully used, swapping

Hi

> > > > >  out:
> > > > > -	if (!all_zones_ok) {
> > > > > +	if (!(all_zones_ok || (order && any_zone_ok))) {
> > > > 
> > > > This doesn't work ;)
> > > > kswapd have to clear ZONE_CONGESTED flag before enter sleeping.
> > > > otherwise nobody can clear it.
> > > > 
> > > 
> > > Does it not do it earlier in balance_pgdat() here
> > > 
> > >                                 /*
> > >                                  * 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, spectulatively avoid congestion waits
> > >                                  */
> > >                                 zone_clear_flag(zone, ZONE_CONGESTED);
> > >                                 if (i <= pgdat->high_zoneidx)
> > >                                         any_zone_ok = 1;
> > 
> > zone_clear_flag(zone, ZONE_CONGESTED) only clear one zone status. other
> > zone remain old status.
> > 
> 
> Ah now I get you. kswapd does not necessarily balance all zones so it needs
> to unconditionally clear them all before it goes to sleep in case. At
> some time in the future, the tagging of ZONE_CONGESTED needs more
> thinking about.
>

This is a option.


> > > > Say, we have to fill below condition.
> > > >  - All zone are successing zone_watermark_ok(order-0)
> > > 
> > > We should loop around at least once with order == 0 where all_zones_ok
> > > is checked.
> > 
> > But no gurantee. IOW kswapd early stopping increase GFP_ATOMIC allocation
> > failure risk, I think.
> > 
> 
> Force all zones to be balanced for order-0?

Yes.

I think following change does.

	if (i <= pgdat->high_zoneidx)
- 		 any_zone_ok = 1;
+		order = sc.order = 0;


This is more conservative.



--
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