Re: [PATCH] vmscan: skip freeing memory from zones with lots free
From: Rik van Riel
Date: Mon Dec 08 2008 - 15:25:49 EST
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/