[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <493D82A6.9070104@redhat.com>
Date: Mon, 08 Dec 2008 15:25:10 -0500
From: Rik van Riel <riel@...hat.com>
To: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
CC: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Johannes Weiner <hannes@...xchg.org>,
Christoph Lameter <cl@...ux-foundation.org>,
Nick Piggin <npiggin@...e.de>
Subject: Re: [PATCH] vmscan: skip freeing memory from zones with lots free
KOSAKI Motohiro wrote:
> + for (o = order; o < MAX_ORDER; o++) {
> + if (z->free_area[o].nr_free)
> + return 1;
Since page breakup and coalescing always manipulates .nr_free,
I wonder if it would make sense to pack the nr_free variables
in their own cache line(s), so we have fewer cache misses when
going through zone_watermark_ok() ?
That would end up looking something like this:
(whitespace mangled because it doesn't make sense to apply
just this thing, anyway)
Index: linux-2.6.28-rc7/include/linux/mmzone.h
===================================================================
--- linux-2.6.28-rc7.orig/include/linux/mmzone.h 2008-12-02
15:04:33.000000000 -0500
+++ linux-2.6.28-rc7/include/linux/mmzone.h 2008-12-08
15:24:25.000000000 -0500
@@ -58,7 +58,6 @@ static inline int get_pageblock_migratet
struct free_area {
struct list_head free_list[MIGRATE_TYPES];
- unsigned long nr_free;
};
struct pglist_data;
@@ -296,6 +295,7 @@ struct zone {
seqlock_t span_seqlock;
#endif
struct free_area free_area[MAX_ORDER];
+ struct nr_free [MAX_ORDER];
#ifndef CONFIG_SPARSEMEM
/*
--
All rights reversed.
--
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