From: Rik van Riel <riel@redhat.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Christoph Lameter <cl@linux-foundation.org>,
Nick Piggin <npiggin@suse.de>
Subject: Re: [PATCH] vmscan: skip freeing memory from zones with lots free
Date: Mon, 08 Dec 2008 15:25:10 -0500 [thread overview]
Message-ID: <493D82A6.9070104@redhat.com> (raw)
In-Reply-To: <20081208220016.53FB.KOSAKI.MOTOHIRO@jp.fujitsu.com>
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.
WARNING: multiple messages have this Message-ID (diff)
From: Rik van Riel <riel@redhat.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Christoph Lameter <cl@linux-foundation.org>,
Nick Piggin <npiggin@suse.de>
Subject: Re: [PATCH] vmscan: skip freeing memory from zones with lots free
Date: Mon, 08 Dec 2008 15:25:10 -0500 [thread overview]
Message-ID: <493D82A6.9070104@redhat.com> (raw)
In-Reply-To: <20081208220016.53FB.KOSAKI.MOTOHIRO@jp.fujitsu.com>
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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-12-08 20:25 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-28 11:08 [PATCH] vmscan: skip freeing memory from zones with lots free Rik van Riel
2008-11-28 11:08 ` Rik van Riel
2008-11-28 11:30 ` Peter Zijlstra
2008-11-28 11:30 ` Peter Zijlstra
2008-11-28 22:43 ` Johannes Weiner
2008-11-28 22:43 ` Johannes Weiner
2008-11-29 7:19 ` Andrew Morton
2008-11-29 7:19 ` Andrew Morton
2008-11-29 10:55 ` KOSAKI Motohiro
2008-11-29 10:55 ` KOSAKI Motohiro
2008-12-08 13:00 ` KOSAKI Motohiro
2008-12-08 13:00 ` KOSAKI Motohiro
2008-12-08 13:03 ` KOSAKI Motohiro
2008-12-08 13:03 ` KOSAKI Motohiro
2008-12-08 17:48 ` KOSAKI Motohiro
2008-12-08 17:48 ` KOSAKI Motohiro
2008-12-10 5:07 ` Nick Piggin
2008-12-10 5:07 ` Nick Piggin
2008-12-08 20:25 ` Rik van Riel [this message]
2008-12-08 20:25 ` Rik van Riel
2008-12-10 5:09 ` Nick Piggin
2008-12-10 5:09 ` Nick Piggin
2008-12-12 5:50 ` KOSAKI Motohiro
2008-11-29 16:47 ` Rik van Riel
2008-11-29 16:47 ` Rik van Riel
2008-11-29 17:45 ` Andrew Morton
2008-11-29 17:45 ` Andrew Morton
2008-11-29 17:58 ` Rik van Riel
2008-11-29 17:58 ` Rik van Riel
2008-11-29 18:26 ` Andrew Morton
2008-11-29 18:26 ` Andrew Morton
2008-11-29 18:41 ` Rik van Riel
2008-11-29 18:41 ` Rik van Riel
2008-11-29 18:51 ` Andrew Morton
2008-11-29 18:51 ` Andrew Morton
2008-11-29 18:59 ` Rik van Riel
2008-11-29 18:59 ` Rik van Riel
2008-11-29 20:29 ` Andrew Morton
2008-11-29 20:29 ` Andrew Morton
2008-11-29 21:35 ` Rik van Riel
2008-11-29 21:35 ` Rik van Riel
2008-11-29 21:57 ` Andrew Morton
2008-11-29 21:57 ` Andrew Morton
2008-11-29 22:07 ` Rik van Riel
2008-11-29 22:07 ` Rik van Riel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=493D82A6.9070104@redhat.com \
--to=riel@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.