From: Michael Ellerman <michael@ellerman.id.au>
To: balbir@linux.vnet.ibm.com
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH powerpc] Fake NUMA emulation for PowerPC (Take 3)
Date: Wed, 30 Jan 2008 00:04:58 +1100 [thread overview]
Message-ID: <1201611898.26410.7.camel@concordia> (raw)
In-Reply-To: <20080128125206.GC4330@balbir.in.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2113 bytes --]
On Mon, 2008-01-28 at 18:22 +0530, Balbir Singh wrote:
> Hi, Paul,
>
> Here's version 3 of the patch. I've commented the side-effect of
> repeatedly setting node 0 online (as to why that is done) and I've
> removed the side effect of not creating memory less nodes
> (when we hit the memory limit).
>
> I've described all my tests below
>
> Changelog v3
> 1. Remove the side-effect of not setting nodes online if they end
> up having no memory in them because of the memory limit.
>
> Changelog v2
>
> 1. Get rid of the constant 5 (based on comments from
> Geert.Uytterhoeven@sonycom.com)
> 2. Implement suggestions from Olof Johannson
> 3. Check if cmdline is NULL in fake_numa_create_new_node()
> diff -puN arch/powerpc/mm/numa.c~fakenumappc arch/powerpc/mm/numa.c
> --- linux-2.6.24-rc8/arch/powerpc/mm/numa.c~fakenumappc 2008-01-28 17:05:34.000000000 +0530
> +++ linux-2.6.24-rc8-balbir/arch/powerpc/mm/numa.c 2008-01-28 18:15:41.000000000 +0530
> @@ -39,6 +41,47 @@ static bootmem_data_t __initdata plat_no
> static int min_common_depth;
> static int n_mem_addr_cells, n_mem_size_cells;
>
> +static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn,
> + unsigned int *nid)
> +{
> + unsigned long long mem;
> + char *p = cmdline;
> + static unsigned int fake_nid;
> + static unsigned long long curr_boundary;
> +
> + /*
> + * Modify node id, iff we started creating NUMA nodes
> + */
> + if (fake_nid)
> + *nid = fake_nid;
> + if (!p)
> + return 0;
Why do you check !p after assigning to nid? I assume it's because we
might have reached the end of the command line, ie. p == NULL, but we're
still adding memory to the last node? If so it's a it's a little subtle
and deserves a comment I think.
Otherwise this looks pretty good.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <michael@ellerman.id.au>
To: balbir@linux.vnet.ibm.com
Cc: Paul Mackerras <paulus@samba.org>,
linuxppc-dev@ozlabs.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH powerpc] Fake NUMA emulation for PowerPC (Take 3)
Date: Wed, 30 Jan 2008 00:04:58 +1100 [thread overview]
Message-ID: <1201611898.26410.7.camel@concordia> (raw)
In-Reply-To: <20080128125206.GC4330@balbir.in.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 2113 bytes --]
On Mon, 2008-01-28 at 18:22 +0530, Balbir Singh wrote:
> Hi, Paul,
>
> Here's version 3 of the patch. I've commented the side-effect of
> repeatedly setting node 0 online (as to why that is done) and I've
> removed the side effect of not creating memory less nodes
> (when we hit the memory limit).
>
> I've described all my tests below
>
> Changelog v3
> 1. Remove the side-effect of not setting nodes online if they end
> up having no memory in them because of the memory limit.
>
> Changelog v2
>
> 1. Get rid of the constant 5 (based on comments from
> Geert.Uytterhoeven@sonycom.com)
> 2. Implement suggestions from Olof Johannson
> 3. Check if cmdline is NULL in fake_numa_create_new_node()
> diff -puN arch/powerpc/mm/numa.c~fakenumappc arch/powerpc/mm/numa.c
> --- linux-2.6.24-rc8/arch/powerpc/mm/numa.c~fakenumappc 2008-01-28 17:05:34.000000000 +0530
> +++ linux-2.6.24-rc8-balbir/arch/powerpc/mm/numa.c 2008-01-28 18:15:41.000000000 +0530
> @@ -39,6 +41,47 @@ static bootmem_data_t __initdata plat_no
> static int min_common_depth;
> static int n_mem_addr_cells, n_mem_size_cells;
>
> +static int __cpuinit fake_numa_create_new_node(unsigned long end_pfn,
> + unsigned int *nid)
> +{
> + unsigned long long mem;
> + char *p = cmdline;
> + static unsigned int fake_nid;
> + static unsigned long long curr_boundary;
> +
> + /*
> + * Modify node id, iff we started creating NUMA nodes
> + */
> + if (fake_nid)
> + *nid = fake_nid;
> + if (!p)
> + return 0;
Why do you check !p after assigning to nid? I assume it's because we
might have reached the end of the command line, ie. p == NULL, but we're
still adding memory to the last node? If so it's a it's a little subtle
and deserves a comment I think.
Otherwise this looks pretty good.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-01-29 13:04 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-07 22:37 [PATCH] Fake NUMA emulation for PowerPC (Take 2) Balbir Singh
2007-12-07 22:37 ` Balbir Singh
2007-12-10 19:36 ` Balbir Singh
2007-12-10 19:36 ` Balbir Singh
2007-12-10 23:07 ` Olof Johansson
2008-01-18 5:34 ` Michael Ellerman
2008-01-18 5:41 ` Balbir Singh
2008-01-18 5:44 ` Michael Ellerman
2008-01-18 5:44 ` Michael Ellerman
2008-01-18 7:08 ` Balbir Singh
2008-01-18 7:08 ` Balbir Singh
2008-01-26 7:13 ` Balbir Singh
2008-01-26 7:13 ` Balbir Singh
2008-01-27 11:55 ` Paul Mackerras
2008-01-27 11:55 ` Paul Mackerras
2008-01-27 15:01 ` Balbir Singh
2008-01-27 20:22 ` Nish Aravamudan
2008-01-28 9:41 ` Balbir Singh
2008-01-28 9:41 ` Balbir Singh
2008-01-28 12:52 ` [PATCH powerpc] Fake NUMA emulation for PowerPC (Take 3) Balbir Singh
2008-01-28 12:52 ` Balbir Singh
2008-01-29 13:04 ` Michael Ellerman [this message]
2008-01-29 13:04 ` Michael Ellerman
2008-01-29 13:50 ` Balbir Singh
2008-01-29 13:50 ` Balbir Singh
2008-02-01 4:57 ` [PATCH powerpc] Fake NUMA emulation for PowerPC (Take 4) Balbir Singh
2008-01-18 5:55 ` [PATCH] Fake NUMA emulation for PowerPC (Take 2) Michael Ellerman
2008-01-18 5:55 ` Michael Ellerman
2008-01-18 6:51 ` Balbir Singh
2008-01-18 6:51 ` Balbir Singh
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=1201611898.26410.7.camel@concordia \
--to=michael@ellerman.id.au \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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.