From: "H. Peter Anvin" <hpa@zytor.com>
To: Robin Holt <holt@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
x86@kernel.org, Yinghai Lu <yinghai@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Joerg Roedel <joerg.roedel@amd.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Stable Maintainers <stable@kernel.org>
Subject: Re: [Patch] numa:x86_64: Cacheline aliasing makes for_each_populated_zone extremely expensive -V2.
Date: Thu, 19 Aug 2010 15:54:36 -0700 [thread overview]
Message-ID: <4C6DB62C.9040105@zytor.com> (raw)
In-Reply-To: <20100818183024.GZ3043@sgi.com>
On 08/18/2010 11:30 AM, Robin Holt wrote:
>
> - node_data[nodeid] = early_node_mem(nodeid, start, end, pgdat_size,
> + /*
> + * Allocate an extra cacheline per node to reduce cacheline
> + * aliasing when scanning all node's node_data.
> + */
> + cache_alias_offset = nodeid * SMP_CACHE_BYTES;
> + node_data[nodeid] = cache_alias_offset +
> + early_node_mem(nodeid, start, end,
> + pgdat_size + cache_alias_offset,
> SMP_CACHE_BYTES);
> - if (node_data[nodeid] == NULL)
> + if (node_data[nodeid] == (void *)cache_alias_offset)
> return;
> nodedata_phys = __pa(node_data[nodeid]);
> reserve_early(nodedata_phys, nodedata_phys + pgdat_size, "NODE_DATA");
I'm concerned about this, because it really seems to rely on subtleties
in the behavior of early_node_mem, as well as the direction of
find_e820_area -- which is pretty much intended to change anyway. It's
the "action at a distance" effect.
What we really want, I think, is to push the offsetting into
find_early_area(). Right now we have an alignment parameter, but what
we need is an alignment and a color parameter (this is just a classic
case of cache coloring, after all) which indicates the desirable offset
from the alignment base.
-hpa
next prev parent reply other threads:[~2010-08-19 22:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 16:56 [Patch] numa:x86_64: Cacheline aliasing makes for_each_populated_zone extremely expensive Robin Holt
2010-08-18 18:30 ` [Patch] numa:x86_64: Cacheline aliasing makes for_each_populated_zone extremely expensive -V2 Robin Holt
2010-08-19 17:30 ` Roedel, Joerg
2010-08-19 20:42 ` Robin Holt
2010-08-19 22:02 ` Robin Holt
2010-08-19 22:54 ` H. Peter Anvin [this message]
2010-08-20 13:58 ` Robin Holt
2010-08-20 15:03 ` Robin Holt
2010-08-20 16:16 ` H. Peter Anvin
2010-08-21 13:07 ` Robin Holt
2010-08-23 21:42 ` H. Peter Anvin
2010-08-25 11:08 ` Robin Holt
2010-08-25 18:56 ` H. Peter Anvin
2010-08-25 21:49 ` Yinghai Lu
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=4C6DB62C.9040105@zytor.com \
--to=hpa@zytor.com \
--cc=holt@sgi.com \
--cc=joerg.roedel@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=stable@kernel.org \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
--cc=yinghai@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
Powered by JetHome