[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1010291425360.26312@router.home>
Date: Fri, 29 Oct 2010 14:33:02 -0500 (CDT)
From: Christoph Lameter <cl@...ux.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Mel Gorman <mel@....ul.ie>, Shaohua Li <shaohua.li@...el.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
David Rientjes <rientjes@...gle.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
LKML <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>
Subject: Re: [PATCH 1/2] mm: page allocator: Adjust the per-cpu counter
threshold when memory is low
On Fri, 29 Oct 2010, Andrew Morton wrote:
> > Doing that caused cache misses in the past and reduced the performance of
> > the ZVCs. This way the threshold is in the same cacheline as the
> > differentials.
>
> This sounds wrong. As long as that threshold isn't stored in a
> cacheline which other CPUs are modifying, all CPUs should be able to
> happily cache it. Maybe it needed a bit of padding inside the zone
> struct.
High speed cpu caches are a very scarce resource. The differentials are
not in the zone struct. Tried to put it onto a single cacheline. Even that
did not do the trick for the large configurations.
The same optimizations are done in the slab allocators by the way.
Use of the percpu_counter() would at least quadruple the cache footprint
in use for the counters. percpu_counters() is using s32 and not s8.
--
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