From: Eric Dumazet <dada1@cosmosbay.com>
To: Andi Kleen <ak@suse.de>
Cc: Amul Shah <amul.shah@unisys.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86_64: Make the NUMA hash function nodemap allocation dynamic and remove NODEMAPSIZE
Date: Fri, 10 Nov 2006 10:43:14 +0100 [thread overview]
Message-ID: <200611101043.14749.dada1@cosmosbay.com> (raw)
In-Reply-To: <200611100748.30889.ak@suse.de>
On Friday 10 November 2006 07:48, Andi Kleen wrote:
> Have you checked how much the code .text size changes because
> of the pointer reference? If it's a lot phys_to_nid might need to
> be out of lined.
Here I have also big numbers on pfn_to_page(), on a machine with mapsize=1
(NUMA kernel, but one node)
oprofile results L1_AND_L2_DTLB_MISSES /usr/src/linux-2.6.18/vmlinux
Counted L1_AND_L2_DTLB_MISSES events (L1 and L2 DTLB misses) with a unit mask
of 0x00 (No unit mask) count 10000
ffffffff80258fa0 <pfn_to_page>: /* pfn_to_page total: 48433 0.4914 */
So adding yet another indirection (to a another cache line) might hurt.
Therefore I suggest to use a structure like that :
struct memnode {
int shift;
unsigned int mapsize; /* no need to use 8 bytes here */
u8 *map;
u8 embedded_map[64-8]; /* total size = 64 bytes */
} ____cacheline_aligned;
and make memnode.map point to memnode.embedded_map if mapsize <= 56 ?
This way, most AMD64 dual/quad processors wont waste a full PAGE to store few
bytes in it, and should use only one cache line.
Thank you
Eric
next prev parent reply other threads:[~2006-11-10 9:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-08 23:37 [PATCH] x86_64: Make the NUMA hash function nodemap allocation dynamic and remove NODEMAPSIZE Amul Shah
2006-11-10 6:48 ` Andi Kleen
2006-11-10 9:43 ` Eric Dumazet [this message]
2006-11-10 9:46 ` Eric Dumazet
2006-11-10 9:51 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2006-11-15 21:48 Amul Shah
2006-11-26 20:49 ` Andi Kleen
2006-11-27 10:23 ` Eric Dumazet
2006-11-27 15:32 ` Amul Shah
2006-11-27 15:38 ` Andi Kleen
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=200611101043.14749.dada1@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=ak@suse.de \
--cc=amul.shah@unisys.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox