Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-27 Thread Paul Mackerras
Balbir Singh writes: Here's a better and more complete fix for the problem. Could you please see if it works for you? I tested it on a real NUMA box and it seemed to work fine there. There are a couple of other changes in behaviour that your patch introduces, and I'd like to understand them

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-27 Thread Balbir Singh
* Paul Mackerras [EMAIL PROTECTED] [2008-01-27 22:55:43]: Balbir Singh writes: Here's a better and more complete fix for the problem. Could you please see if it works for you? I tested it on a real NUMA box and it seemed to work fine there. There are a couple of other changes in

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-27 Thread Nish Aravamudan
On 1/27/08, Balbir Singh [EMAIL PROTECTED] wrote: * Paul Mackerras [EMAIL PROTECTED] [2008-01-27 22:55:43]: Balbir Singh writes: Here's a better and more complete fix for the problem. Could you please see if it works for you? I tested it on a real NUMA box and it seemed to work fine

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-25 Thread Balbir Singh
* Michael Ellerman [EMAIL PROTECTED] [2008-01-18 16:44:58]: This fixes it, although I'm a little worried about some of the removals/movings of node_set_online() in the patch. diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 1666e7d..dcedc26 100644 ---

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-18 Thread Balbir Singh
* Michael Ellerman [EMAIL PROTECTED] [2008-01-18 16:44:58]: On Fri, 2008-01-18 at 16:34 +1100, Michael Ellerman wrote: On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote: Changelog 1. Get rid of the constant 5 (based on comments from [EMAIL

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-18 Thread Balbir Singh
* Michael Ellerman [EMAIL PROTECTED] [2008-01-18 16:55:03]: On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote: Here's a dumb simple implementation of fake NUMA nodes for PowerPC. Fake NUMA nodes can be specified using the following command line option Comments are as always

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-18 Thread Balbir Singh
* Michael Ellerman [EMAIL PROTECTED] [2008-01-18 16:34:53]: On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote: Changelog 1. Get rid of the constant 5 (based on comments from [EMAIL PROTECTED]) 2. Implement suggestions from Olof Johannson 3. Check

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-17 Thread Michael Ellerman
On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote: Changelog 1. Get rid of the constant 5 (based on comments from [EMAIL PROTECTED]) 2. Implement suggestions from Olof Johannson 3. Check if cmdline is NULL in fake_numa_create_new_node() Tested with

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-17 Thread Michael Ellerman
On Fri, 2008-01-18 at 16:34 +1100, Michael Ellerman wrote: On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote: Changelog 1. Get rid of the constant 5 (based on comments from [EMAIL PROTECTED]) 2. Implement suggestions from Olof Johannson 3. Check if

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2008-01-17 Thread Michael Ellerman
On Sat, 2007-12-08 at 04:07 +0530, Balbir Singh wrote: Here's a dumb simple implementation of fake NUMA nodes for PowerPC. Fake NUMA nodes can be specified using the following command line option Comments are as always welcome! Here's some :) diff -puN

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2007-12-10 Thread Balbir Singh
Balbir Singh wrote: Changelog 1. Get rid of the constant 5 (based on comments from [EMAIL PROTECTED]) 2. Implement suggestions from Olof Johannson 3. Check if cmdline is NULL in fake_numa_create_new_node() Tested with additional parameters from Olof

Re: [PATCH] Fake NUMA emulation for PowerPC (Take 2)

2007-12-10 Thread Olof Johansson
On Sat, Dec 08, 2007 at 04:07:14AM +0530, Balbir Singh wrote: Signed-off-by: Balbir Singh [EMAIL PROTECTED] Looks good to me. Sure, it could be fleshed out to something more generic and in common code, but this is small and simple and doesn't bloat the kernel much as it stands, and it has value

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-09 Thread Pavel Machek
On Sat 2007-12-08 09:52:06, Balbir Singh wrote: David Rientjes wrote: On Sat, 8 Dec 2007, Balbir Singh wrote: To be able to test the memory controller under NUMA, I use fake NUMA nodes. x86-64 has a similar feature, the code I have here is the simplest I could come up with for

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-09 Thread Balbir Singh
Pavel Machek wrote: On Sat 2007-12-08 09:52:06, Balbir Singh wrote: David Rientjes wrote: On Sat, 8 Dec 2007, Balbir Singh wrote: To be able to test the memory controller under NUMA, I use fake NUMA nodes. x86-64 has a similar feature, the code I have here is the simplest I could come up

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread David Rientjes
On Sat, 8 Dec 2007, Balbir Singh wrote: You're going to want to distribute the cpu's based on how they match up physically with the actual platform that you're running on. x86_64 does Could you explain this better, how does it match up CPU's with fake NUMA memory? Is there some

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
David Rientjes wrote: On Sat, 8 Dec 2007, Balbir Singh wrote: Yes, they all appear on node 0. We could have tweaks to distribute CPU's as well. You're going to want to distribute the cpu's based on how they match up physically with the actual platform that you're running on. x86_64

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
David Rientjes wrote: On Sat, 8 Dec 2007, Balbir Singh wrote: To be able to test the memory controller under NUMA, I use fake NUMA nodes. x86-64 has a similar feature, the code I have here is the simplest I could come up with for PowerPC. Magnus Damm had patches from over a year ago

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Nathan Lynch wrote: Hi Balbir- Balbir Singh wrote: Here's a dumb simple implementation of fake NUMA nodes for PowerPC. Fake NUMA nodes can be specified using the following command line option numa=fake=node range node range is of the format range1,range2,...rangeN Each of the rangeX

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Kumar Gala
On Dec 7, 2007, at 4:12 PM, Balbir Singh wrote: Kumar Gala wrote: On Dec 7, 2007, at 3:35 PM, Balbir Singh wrote: Olof Johansson wrote: Hi, On Sat, Dec 08, 2007 at 02:44:25AM +0530, Balbir Singh wrote: Comments are as always welcome! Care to explain what this is useful for? (Not

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Arnd Bergmann wrote: On Friday 07 December 2007, Balbir Singh wrote: Balbir Singh wrote: Geert Uytterhoeven wrote: On Sat, 8 Dec 2007, Balbir Singh wrote: + if (strstr(p, fake=)) + cmdline = p + 5;/* 5 is faster than strlen(fake=) */ Really? My gcc is smart enough to

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Arnd Bergmann
On Friday 07 December 2007, Balbir Singh wrote: Balbir Singh wrote: Geert Uytterhoeven wrote: On Sat, 8 Dec 2007, Balbir Singh wrote: +   if (strstr(p, fake=)) +   cmdline = p + 5;/* 5 is faster than strlen(fake=) */ Really? My gcc is smart enough to replace the

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Kumar Gala
On Dec 7, 2007, at 3:35 PM, Balbir Singh wrote: Olof Johansson wrote: Hi, On Sat, Dec 08, 2007 at 02:44:25AM +0530, Balbir Singh wrote: Comments are as always welcome! Care to explain what this is useful for? (Not saying it's a stupid idea, just wondering what the reason for doing it

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Balbir Singh wrote: Geert Uytterhoeven wrote: On Sat, 8 Dec 2007, Balbir Singh wrote: + if (strstr(p, fake=)) + cmdline = p + 5;/* 5 is faster than strlen(fake=) */ Really? My gcc is smart enough to replace the `strlen(fake=)' by 5, even without -O. Thanks for

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Olof Johansson
Hi, On Sat, Dec 08, 2007 at 02:44:25AM +0530, Balbir Singh wrote: Comments are as always welcome! Care to explain what this is useful for? (Not saying it's a stupid idea, just wondering what the reason for doing it is). diff -puN arch/powerpc/mm/numa.c~ppc-fake-numa-easy

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread David Rientjes
On Sat, 8 Dec 2007, Balbir Singh wrote: Yes, they all appear on node 0. We could have tweaks to distribute CPU's as well. You're going to want to distribute the cpu's based on how they match up physically with the actual platform that you're running on. x86_64 does this already and it

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Arnd Bergmann wrote: On Friday 07 December 2007, Balbir Singh wrote: Here's a dumb simple implementation of fake NUMA nodes for PowerPC. Fake NUMA nodes can be specified using the following command line option numa=fake=node range node range is of the format range1,range2,...rangeN

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Kumar Gala wrote: On Dec 7, 2007, at 4:12 PM, Balbir Singh wrote: Kumar Gala wrote: On Dec 7, 2007, at 3:35 PM, Balbir Singh wrote: Olof Johansson wrote: Hi, On Sat, Dec 08, 2007 at 02:44:25AM +0530, Balbir Singh wrote: Comments are as always welcome! Care to explain what this is

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Geert Uytterhoeven wrote: On Sat, 8 Dec 2007, Balbir Singh wrote: +if (strstr(p, fake=)) +cmdline = p + 5;/* 5 is faster than strlen(fake=) */ Really? My gcc is smart enough to replace the `strlen(fake=)' by 5, even without -O. Thanks for pointing that out, but I

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Olof Johansson wrote: Hi, On Sat, Dec 08, 2007 at 02:44:25AM +0530, Balbir Singh wrote: Comments are as always welcome! Care to explain what this is useful for? (Not saying it's a stupid idea, just wondering what the reason for doing it is). In my case, I use it to test parts of my

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread David Rientjes
On Sat, 8 Dec 2007, Balbir Singh wrote: To be able to test the memory controller under NUMA, I use fake NUMA nodes. x86-64 has a similar feature, the code I have here is the simplest I could come up with for PowerPC. Magnus Damm had patches from over a year ago that, I believe, made much of

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Balbir Singh
Kumar Gala wrote: On Dec 7, 2007, at 3:35 PM, Balbir Singh wrote: Olof Johansson wrote: Hi, On Sat, Dec 08, 2007 at 02:44:25AM +0530, Balbir Singh wrote: Comments are as always welcome! Care to explain what this is useful for? (Not saying it's a stupid idea, just wondering what the

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Arnd Bergmann
On Friday 07 December 2007, Balbir Singh wrote: Here's a dumb simple implementation of fake NUMA nodes for PowerPC. Fake NUMA nodes can be specified using the following command line option numa=fake=node range node range is of the format range1,range2,...rangeN Excellent idea! I'd love to

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread David Rientjes
On Fri, 7 Dec 2007, Olof Johansson wrote: Comments are as always welcome! Care to explain what this is useful for? (Not saying it's a stupid idea, just wondering what the reason for doing it is). Fake NUMA has always been useful for testing NUMA code without having to have a wide range

Re: [PATCH] Fake NUMA emulation for PowerPC

2007-12-07 Thread Geert Uytterhoeven
On Sat, 8 Dec 2007, Balbir Singh wrote: + if (strstr(p, fake=)) + cmdline = p + 5;/* 5 is faster than strlen(fake=) */ Really? My gcc is smart enough to replace the `strlen(fake=)' by 5, even without -O. With kind regards, Geert Uytterhoeven Software Architect Sony