From: Paul Jackson <pj@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: clameter@engr.sgi.com, steiner@sgi.com, dgc@sgi.com,
Simon.Derr@bull.net, ak@suse.de, linux-kernel@vger.kernel.org,
Pekka Enberg <penberg@cs.helsinki.fi>
Subject: Re: [PATCH 2/5] cpuset memory spread page cache implementation and hooks
Date: Sun, 5 Feb 2006 21:51:52 -0800 [thread overview]
Message-ID: <20060205215152.27800776.pj@sgi.com> (raw)
In-Reply-To: <20060204221524.1607401e.akpm@osdl.org>
Earlier Andrew wrote:
> Really has two forms, depending upon Kconfig.
>
> 1:
>
> static inline struct page *page_cache_alloc(struct address_space *x)
> {
> return alloc_pages(mapping_gfp_mask(x), 0);
> }
>
> That should be inlined.
>
> 2:
>
> static inline struct page *page_cache_alloc(struct address_space *x)
> {
> if (cpuset_mem_spread_check()) {
> int n = cpuset_mem_spread_node();
> return alloc_pages_node(n, mapping_gfp_mask(x), 0);
> }
> return alloc_pages(mapping_gfp_mask(x), 0);
> }
Later on, he wrote:
> I'm saying "gee, that looks big. Do you have time to investigate possible
> improvements?" They may come to naught.
After playing around with the variations we've considered on this
thread, the results are simple enough. I experimented with just
the 3 calls to page_cache_alloc_cold() in mm/filemap.c, because that
was easy, and all these calls have the same shape.
For non-NUMA, removing 'inline' from the three page_cache_alloc_cold()
calls in mm/filemap.c would cost a total of 16 bytes text size
For NUMA+CPUSET, removing it would _save_ 583 bytes total over the
three calls.
The "nm -S" size of the uninlined page_cache_alloc_cold() is 448 bytes
(it was 96 bytes before this cpuset patchset).
This is all on ia64 sn2_defconfig gcc 3.3.3.
The conclusion is straight forward, and as Andrew suspected.
We want these two page_cache_alloc*() routines out of line in the
NUMA case, but left inline for the non-NUMA case.
I will follow up with a simple patch that makes it easy to mark
routines that should be inline for UMA, out of line for NUMA.
These two page_cache_alloc*(), and perhaps also __cache_alloc() when
Pekka or I gets a handle on it, are candidates for this marking, as
routines to inline on UMA, out of line on NUMA.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401
next prev parent reply other threads:[~2006-02-06 5:52 UTC|newest]
Thread overview: 102+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-04 7:19 [PATCH 1/5] cpuset memory spread basic implementation Paul Jackson
2006-02-04 7:19 ` [PATCH 2/5] cpuset memory spread page cache implementation and hooks Paul Jackson
2006-02-04 23:49 ` Andrew Morton
2006-02-05 1:42 ` Paul Jackson
2006-02-05 1:54 ` Andrew Morton
2006-02-05 3:28 ` Christoph Lameter
2006-02-05 5:06 ` Andrew Morton
2006-02-05 6:08 ` Paul Jackson
2006-02-05 6:15 ` Andrew Morton
2006-02-05 6:28 ` Paul Jackson
2006-02-06 0:20 ` Paul Jackson
2006-02-06 5:51 ` Paul Jackson [this message]
2006-02-06 7:14 ` Pekka J Enberg
2006-02-06 7:42 ` Pekka J Enberg
2006-02-06 7:51 ` Pekka J Enberg
2006-02-06 17:32 ` Pekka Enberg
2006-02-04 7:19 ` [PATCH 3/5] cpuset memory spread slab cache implementation Paul Jackson
2006-02-04 23:49 ` Andrew Morton
2006-02-05 3:37 ` Christoph Lameter
2006-02-04 7:19 ` [PATCH 4/5] cpuset memory spread slab cache optimizations Paul Jackson
2006-02-04 23:50 ` Andrew Morton
2006-02-05 3:18 ` Paul Jackson
2006-02-04 23:50 ` Andrew Morton
2006-02-05 4:10 ` Paul Jackson
2006-02-04 7:19 ` [PATCH 5/5] cpuset memory spread slab cache hooks Paul Jackson
2006-02-06 4:37 ` Andrew Morton
2006-02-04 23:49 ` [PATCH 1/5] cpuset memory spread basic implementation Andrew Morton
2006-02-05 3:35 ` Christoph Lameter
2006-02-06 4:33 ` Andrew Morton
2006-02-06 5:50 ` Paul Jackson
2006-02-06 6:02 ` Andrew Morton
2006-02-06 6:17 ` Ingo Molnar
2006-02-06 7:22 ` Paul Jackson
2006-02-06 7:43 ` Ingo Molnar
2006-02-06 8:19 ` Paul Jackson
2006-02-06 8:22 ` Ingo Molnar
2006-02-06 8:40 ` Ingo Molnar
2006-02-06 9:03 ` Paul Jackson
2006-02-06 9:09 ` Ingo Molnar
2006-02-06 9:27 ` Paul Jackson
2006-02-06 9:37 ` Ingo Molnar
2006-02-06 20:22 ` Paul Jackson
2006-02-06 8:47 ` Paul Jackson
2006-02-06 8:51 ` Ingo Molnar
2006-02-06 9:09 ` Paul Jackson
2006-02-06 10:09 ` Andi Kleen
2006-02-06 10:11 ` Ingo Molnar
2006-02-06 10:16 ` Andi Kleen
2006-02-06 10:23 ` Ingo Molnar
2006-02-06 10:35 ` Andi Kleen
2006-02-06 14:42 ` Paul Jackson
2006-02-06 14:35 ` Paul Jackson
2006-02-06 16:48 ` Christoph Lameter
2006-02-06 17:11 ` Andi Kleen
2006-02-06 18:21 ` Christoph Lameter
2006-02-06 18:36 ` Andi Kleen
2006-02-06 18:43 ` Christoph Lameter
2006-02-06 18:48 ` Andi Kleen
2006-02-06 19:19 ` Christoph Lameter
2006-02-06 20:27 ` Paul Jackson
2006-02-06 18:43 ` Ingo Molnar
2006-02-06 20:01 ` Paul Jackson
2006-02-06 20:05 ` Ingo Molnar
2006-02-06 20:27 ` Christoph Lameter
2006-02-06 20:41 ` Ingo Molnar
2006-02-06 20:49 ` Christoph Lameter
2006-02-06 21:07 ` Ingo Molnar
2006-02-06 22:10 ` Christoph Lameter
2006-02-06 23:29 ` Ingo Molnar
2006-02-06 23:45 ` Paul Jackson
2006-02-07 0:19 ` Ingo Molnar
2006-02-07 1:17 ` David Chinner
2006-02-07 9:31 ` Andi Kleen
2006-02-07 11:53 ` Ingo Molnar
2006-02-07 12:14 ` Andi Kleen
2006-02-07 12:30 ` Ingo Molnar
2006-02-07 12:43 ` Andi Kleen
2006-02-07 12:58 ` Ingo Molnar
2006-02-07 13:14 ` Andi Kleen
2006-02-07 14:11 ` Ingo Molnar
2006-02-07 14:23 ` Andi Kleen
2006-02-07 17:11 ` Christoph Lameter
2006-02-07 17:29 ` Andi Kleen
2006-02-07 17:39 ` Christoph Lameter
2006-02-07 17:10 ` Christoph Lameter
2006-02-07 17:28 ` Andi Kleen
2006-02-07 17:42 ` Christoph Lameter
2006-02-07 17:51 ` Andi Kleen
2006-02-07 17:06 ` Christoph Lameter
2006-02-07 17:26 ` Andi Kleen
2006-02-04 23:50 ` Andrew Morton
2006-02-04 23:57 ` David S. Miller
2006-02-06 4:37 ` Andrew Morton
2006-02-06 6:02 ` Ingo Molnar
2006-02-06 6:56 ` Paul Jackson
2006-02-06 7:08 ` Andrew Morton
2006-02-06 7:39 ` Ingo Molnar
2006-02-06 8:22 ` Paul Jackson
2006-02-06 8:35 ` Paul Jackson
2006-02-06 9:32 ` Paul Jackson
2006-02-06 9:57 ` Andrew Morton
2006-02-06 9:18 ` Simon Derr
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=20060205215152.27800776.pj@sgi.com \
--to=pj@sgi.com \
--cc=Simon.Derr@bull.net \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=clameter@engr.sgi.com \
--cc=dgc@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=steiner@sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox