public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Christoph Lameter <cl@linux-foundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH tip:x86/mm] x86-64, NUMA: Remove custom phys_to_nid() implementation
Date: Thu, 31 Mar 2011 08:56:07 -0700	[thread overview]
Message-ID: <4D94A417.80508@kernel.org> (raw)
In-Reply-To: <20110331135744.GE3385@htj.dyndns.org>

On 03/31/2011 06:57 AM, Tejun Heo wrote:
> phys_to_nid() maps physical address to NUMA node id.  This is
> implemented by building perfect hash in compute_hash_shift() during
> initialization.
>
> However, with SPARSE memory model, the nid is encoded in page flags.
> The perfect hash implementation was for DISCONTIG memory model which
> got removed years ago by b263295dbf (x86: 64-bit, make sparsemem
> vmemmap the only memory model).
>
> So, the perfect hash ends up being used only during initialization
> when the core SPARSE code already provides perfectly acceptable
> generic early_pfn_to_nid() implementation.
>
> Drop phys_to_nid() and use the generic ealry_pfn_to_nid() instead.
>
> Signed-off-by: Tejun Heo<tj@kernel.org>
> Cc: Christoph Lameter<cl@linux-foundation.org>
> Cc: Ingo Molnar<mingo@redhat.com>
> Cc: Yinghai Lu<yinghai@kernel.org>
> Cc: "H. Peter Anvin"<hpa@zytor.com>
> Cc: Thomas Gleixner<tglx@linutronix.de>
> ---
> If no one objects, will route through x86-mm.  Thanks.
>
>   arch/x86/Kconfig                 |    4 -
>   arch/x86/include/asm/mmzone_64.h |   23 -------
>   arch/x86/mm/numa_64.c            |  123 ---------------------------------------
>   3 files changed, 1 insertion(+), 149 deletions(-)

good finding.

Acked-by: Yinghai Lu <yinghai@kernel.org>

      parent reply	other threads:[~2011-03-31 15:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31 13:57 [PATCH tip:x86/mm] x86-64, NUMA: Remove custom phys_to_nid() implementation Tejun Heo
2011-03-31 14:31 ` Christoph Lameter
2011-03-31 15:56 ` Yinghai Lu [this message]

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=4D94A417.80508@kernel.org \
    --to=yinghai@kernel.org \
    --cc=cl@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tj@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