All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: David Rientjes <rientjes@google.com>
Cc: akpm@linux-foundation.org, andi@firstfloor.org, riel@redhat.com,
	yinghai@kernel.org, isimatu.yasuaki@jp.fujitsu.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] x86: numa: drop ZONE_ALIGN
Date: Mon, 9 Jun 2014 23:19:20 -0400	[thread overview]
Message-ID: <20140609231920.08a1b0f9@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1406091453570.5271@chino.kir.corp.google.com>

On Mon, 9 Jun 2014 14:57:16 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:

> On Mon, 9 Jun 2014, Luiz Capitulino wrote:
> 
> > > > diff --git a/arch/x86/include/asm/numa.h b/arch/x86/include/asm/numa.h
> > > > index 4064aca..01b493e 100644
> > > > --- a/arch/x86/include/asm/numa.h
> > > > +++ b/arch/x86/include/asm/numa.h
> > > > @@ -9,7 +9,6 @@
> > > >  #ifdef CONFIG_NUMA
> > > >  
> > > >  #define NR_NODE_MEMBLKS		(MAX_NUMNODES*2)
> > > > -#define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
> > > >  
> > > >  /*
> > > >   * Too small node sizes may confuse the VM badly. Usually they
> > > > diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
> > > > index 1d045f9..69f6362 100644
> > > > --- a/arch/x86/mm/numa.c
> > > > +++ b/arch/x86/mm/numa.c
> > > > @@ -200,8 +200,6 @@ static void __init setup_node_data(int nid, u64 start, u64 end)
> > > >  	if (end && (end - start) < NODE_MIN_SIZE)
> > > >  		return;
> > > >  
> > > > -	start = roundup(start, ZONE_ALIGN);
> > > > -
> > > >  	printk(KERN_INFO "Initmem setup node %d [mem %#010Lx-%#010Lx]\n",
> > > >  	       nid, start, end - 1);
> > > >  
> > > 
> > > What ensures this start address is page aligned from the BIOS?
> > 
> > To which start address do you refer to?
> 
> The start address displayed in the dmesg is not page aligned anymore with 
> your change, correct?  

I have to check that but I don't expect this to happen because my
understanding of the code is that what's rounded up here is just discarded
in free_area_init_node(). Am I wrong?

> acpi_parse_memory_affinity() does no 
> transformations on the table, the base address is coming strictly from the 
> SRAT and there is no page alignment requirement in the ACPI specification.  
> NODE_DATA(nid)->node_start_pfn will be correct because it does the shift 
> for you, but it still seems you want to at least align to PAGE_SIZE here. 

I do agree we need to align to PAGE_SIZE, but I'm not sure where we should
do it.

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Luiz Capitulino <lcapitulino@redhat.com>
To: David Rientjes <rientjes@google.com>
Cc: akpm@linux-foundation.org, andi@firstfloor.org, riel@redhat.com,
	yinghai@kernel.org, isimatu.yasuaki@jp.fujitsu.com,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] x86: numa: drop ZONE_ALIGN
Date: Mon, 9 Jun 2014 23:19:20 -0400	[thread overview]
Message-ID: <20140609231920.08a1b0f9@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1406091453570.5271@chino.kir.corp.google.com>

On Mon, 9 Jun 2014 14:57:16 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:

> On Mon, 9 Jun 2014, Luiz Capitulino wrote:
> 
> > > > diff --git a/arch/x86/include/asm/numa.h b/arch/x86/include/asm/numa.h
> > > > index 4064aca..01b493e 100644
> > > > --- a/arch/x86/include/asm/numa.h
> > > > +++ b/arch/x86/include/asm/numa.h
> > > > @@ -9,7 +9,6 @@
> > > >  #ifdef CONFIG_NUMA
> > > >  
> > > >  #define NR_NODE_MEMBLKS		(MAX_NUMNODES*2)
> > > > -#define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
> > > >  
> > > >  /*
> > > >   * Too small node sizes may confuse the VM badly. Usually they
> > > > diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
> > > > index 1d045f9..69f6362 100644
> > > > --- a/arch/x86/mm/numa.c
> > > > +++ b/arch/x86/mm/numa.c
> > > > @@ -200,8 +200,6 @@ static void __init setup_node_data(int nid, u64 start, u64 end)
> > > >  	if (end && (end - start) < NODE_MIN_SIZE)
> > > >  		return;
> > > >  
> > > > -	start = roundup(start, ZONE_ALIGN);
> > > > -
> > > >  	printk(KERN_INFO "Initmem setup node %d [mem %#010Lx-%#010Lx]\n",
> > > >  	       nid, start, end - 1);
> > > >  
> > > 
> > > What ensures this start address is page aligned from the BIOS?
> > 
> > To which start address do you refer to?
> 
> The start address displayed in the dmesg is not page aligned anymore with 
> your change, correct?  

I have to check that but I don't expect this to happen because my
understanding of the code is that what's rounded up here is just discarded
in free_area_init_node(). Am I wrong?

> acpi_parse_memory_affinity() does no 
> transformations on the table, the base address is coming strictly from the 
> SRAT and there is no page alignment requirement in the ACPI specification.  
> NODE_DATA(nid)->node_start_pfn will be correct because it does the shift 
> for you, but it still seems you want to at least align to PAGE_SIZE here. 

I do agree we need to align to PAGE_SIZE, but I'm not sure where we should
do it.

  reply	other threads:[~2014-06-10  3:19 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-08 22:14 [PATCH] x86: numa: drop ZONE_ALIGN Luiz Capitulino
2014-06-08 22:14 ` Luiz Capitulino
2014-06-08 22:25 ` David Rientjes
2014-06-08 22:25   ` David Rientjes
2014-06-09 18:43   ` Luiz Capitulino
2014-06-09 18:43     ` Luiz Capitulino
2014-06-09 21:57     ` David Rientjes
2014-06-09 21:57       ` David Rientjes
2014-06-10  3:19       ` Luiz Capitulino [this message]
2014-06-10  3:19         ` Luiz Capitulino
2014-06-10 22:10         ` David Rientjes
2014-06-10 22:10           ` David Rientjes
2014-06-11  2:21           ` Luiz Capitulino
2014-06-11  2:21             ` Luiz Capitulino
2014-06-09  1:29 ` Yinghai Lu
2014-06-09  1:29   ` Yinghai Lu
2014-06-09 19:03   ` Luiz Capitulino
2014-06-09 19:03     ` Luiz Capitulino
2014-06-09 22:13     ` Yinghai Lu
2014-06-09 22:13       ` Yinghai Lu
2014-06-11 13:23       ` Luiz Capitulino
2014-06-11 13:23         ` Luiz Capitulino
2014-06-11 13:58         ` Christoph Lameter
2014-06-11 13:58           ` Christoph Lameter
2014-06-11 22:54           ` David Rientjes
2014-06-11 22:54             ` David Rientjes
2014-06-13 15:47             ` Christoph Lameter
2014-06-13 15:47               ` Christoph Lameter

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=20140609231920.08a1b0f9@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=stable@vger.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 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.