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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 18 Jul 2011 12:20:11 -0500 (CDT)
From:	Christoph Lameter <cl@...ux.com>
To:	Mel Gorman <mgorman@...e.de>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Minchan Kim <minchan.kim@...il.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] mm: page allocator: Initialise ZLC for first zone
 eligible for zone_reclaim



On Mon, 18 Jul 2011, Mel Gorman wrote:

> On Mon, Jul 18, 2011 at 09:56:31AM -0500, Christoph Lameter wrote:
> > On Fri, 15 Jul 2011, Mel Gorman wrote:
> >
> > > Currently the zonelist cache is setup only after the first zone has
> > > been considered and zone_reclaim() has been called. The objective was
> > > to avoid a costly setup but zone_reclaim is itself quite expensive. If
> > > it is failing regularly such as the first eligible zone having mostly
> > > mapped pages, the cost in scanning and allocation stalls is far higher
> > > than the ZLC initialisation step.
> >
> > Would it not be easier to set zlc_active and allowednodes based on the
> > zone having an active ZLC at the start of get_pages()?
> >
>
> What do you mean by a zones active ZLC? zonelists are on a per-node,
> not a per-zone basis (see node_zonelist) so a zone doesn't have an
> active ZLC as such. If the zlc_active is set at the beginning of

Look at get_page_from_freelist(): It sets
zlc_active = 0 even through the zonelist under consideration may have a
ZLC. zlc_active = 0 can also mean that the function has not bothered to
look for the zlc information of the current zonelist.

> get_page_from_freelist(), it implies that we are calling zlc_setup()
> even when the watermarks are met which is unnecessary.

Ok then that decision to not call zlc_setup() for performance reasons is
what created the problem that you are trying to solve. In case that the
first zones watermarks are okay we can avoid calling zlc_setup().

What we do now have is checking for zlc_active in the loop just so that
the first time around we do not call zlc_setup().


We may be able to simplify the function by:

1.  Checking for the special case that the first zone is ok and that we do
not want to call zlc_setup before we get to the loop.

2. Do the zlc_setup() before the loop.

3. Remove the zlc_setup() code as you did from the loop as well as the
checks for zlc_active. zlc_active becomes not necessary since a zlc
is always available when we go through the loop.

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