public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [tip:sched/core] x86/numa: Allow specifying node_distance() for numa=fake
@ 2012-05-09 12:58 tip-bot for Peter Zijlstra
  2012-05-31 20:49 ` David Rientjes
  0 siblings, 1 reply; 3+ messages in thread
From: tip-bot for Peter Zijlstra @ 2012-05-09 12:58 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, yinghai, a.p.zijlstra, tj, tglx

Commit-ID:  94c0dd3278dd3eae52eabf0fb77d472d0dd3e373
Gitweb:     http://git.kernel.org/tip/94c0dd3278dd3eae52eabf0fb77d472d0dd3e373
Author:     Peter Zijlstra <a.p.zijlstra@chello.nl>
AuthorDate: Wed, 18 Apr 2012 19:04:17 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 9 May 2012 13:28:59 +0200

x86/numa: Allow specifying node_distance() for numa=fake

Allows emulating more interesting NUMA configurations like a quad
socket AMD Magny-Cour:

 "numa=fake=8:10,16,16,22,16,22,16,22,
              16,10,22,16,22,16,22,16,
              16,22,10,16,16,22,16,22,
              22,16,16,10,22,16,22,16,
              16,22,16,22,10,16,16,22,
              22,16,22,16,16,10,22,16,
              16,22,16,22,16,22,10,16,
              22,16,22,16,22,16,16,10"

Which has a non-fully-connected topology.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tejun Heo <tj@kernel.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: x86@kernel.org
Link: http://lkml.kernel.org/n/tip-e1136ef7kdffj7yf9tjhydln@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/mm/numa_emulation.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c
index 53489ff..871dd88 100644
--- a/arch/x86/mm/numa_emulation.c
+++ b/arch/x86/mm/numa_emulation.c
@@ -339,9 +339,11 @@ void __init numa_emulation(struct numa_meminfo *numa_meminfo, int numa_dist_cnt)
 	} else {
 		unsigned long n;
 
-		n = simple_strtoul(emu_cmdline, NULL, 0);
+		n = simple_strtoul(emu_cmdline, &emu_cmdline, 0);
 		ret = split_nodes_interleave(&ei, &pi, 0, max_addr, n);
 	}
+	if (*emu_cmdline == ':')
+		emu_cmdline++;
 
 	if (ret < 0)
 		goto no_emu;
@@ -418,7 +420,9 @@ void __init numa_emulation(struct numa_meminfo *numa_meminfo, int numa_dist_cnt)
 			int physj = emu_nid_to_phys[j];
 			int dist;
 
-			if (physi >= numa_dist_cnt || physj >= numa_dist_cnt)
+			if (get_option(&emu_cmdline, &dist) == 2)
+				;
+			else if (physi >= numa_dist_cnt || physj >= numa_dist_cnt)
 				dist = physi == physj ?
 					LOCAL_DISTANCE : REMOTE_DISTANCE;
 			else

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [tip:sched/core] x86/numa: Allow specifying node_distance()  for numa=fake
  2012-05-09 12:58 [tip:sched/core] x86/numa: Allow specifying node_distance() for numa=fake tip-bot for Peter Zijlstra
@ 2012-05-31 20:49 ` David Rientjes
  2012-06-06  7:11   ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: David Rientjes @ 2012-05-31 20:49 UTC (permalink / raw)
  To: a.p.zijlstra
  Cc: mingo, hpa, linux-kernel, yinghai, tj, tglx, linux-tip-commits

On Wed, 9 May 2012, tip-bot for Peter Zijlstra wrote:

> Commit-ID:  94c0dd3278dd3eae52eabf0fb77d472d0dd3e373
> Gitweb:     http://git.kernel.org/tip/94c0dd3278dd3eae52eabf0fb77d472d0dd3e373
> Author:     Peter Zijlstra <a.p.zijlstra@chello.nl>
> AuthorDate: Wed, 18 Apr 2012 19:04:17 +0200
> Committer:  Ingo Molnar <mingo@kernel.org>
> CommitDate: Wed, 9 May 2012 13:28:59 +0200
> 
> x86/numa: Allow specifying node_distance() for numa=fake
> 
> Allows emulating more interesting NUMA configurations like a quad
> socket AMD Magny-Cour:
> 
>  "numa=fake=8:10,16,16,22,16,22,16,22,
>               16,10,22,16,22,16,22,16,
>               16,22,10,16,16,22,16,22,
>               22,16,16,10,22,16,22,16,
>               16,22,16,22,10,16,16,22,
>               22,16,22,16,16,10,22,16,
>               16,22,16,22,16,22,10,16,
>               22,16,22,16,22,16,16,10"
> 
> Which has a non-fully-connected topology.
> 

I like this support and I'm pretty sure you used it to reproduce my 
problems with sched/numa locally, but I think it would be better to 
seperate it out as a different parameter such as slit=fake so that we can 
still use it to fake the SLIT of our NUMA machines without requiring 
numa=fake which provides no guarantees to break the nodes along physical 
boundaries.

So without seperating it out into slit=fake, we can't change this 
information without changing the SLIT itself and that makes debugging 
harder.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [tip:sched/core] x86/numa: Allow specifying node_distance() for numa=fake
  2012-05-31 20:49 ` David Rientjes
@ 2012-06-06  7:11   ` Ingo Molnar
  0 siblings, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2012-06-06  7:11 UTC (permalink / raw)
  To: David Rientjes
  Cc: a.p.zijlstra, hpa, linux-kernel, yinghai, tj, tglx,
	linux-tip-commits


* David Rientjes <rientjes@google.com> wrote:

> On Wed, 9 May 2012, tip-bot for Peter Zijlstra wrote:
> 
> > Commit-ID:  94c0dd3278dd3eae52eabf0fb77d472d0dd3e373
> > Gitweb:     http://git.kernel.org/tip/94c0dd3278dd3eae52eabf0fb77d472d0dd3e373
> > Author:     Peter Zijlstra <a.p.zijlstra@chello.nl>
> > AuthorDate: Wed, 18 Apr 2012 19:04:17 +0200
> > Committer:  Ingo Molnar <mingo@kernel.org>
> > CommitDate: Wed, 9 May 2012 13:28:59 +0200
> > 
> > x86/numa: Allow specifying node_distance() for numa=fake
> > 
> > Allows emulating more interesting NUMA configurations like a quad
> > socket AMD Magny-Cour:
> > 
> >  "numa=fake=8:10,16,16,22,16,22,16,22,
> >               16,10,22,16,22,16,22,16,
> >               16,22,10,16,16,22,16,22,
> >               22,16,16,10,22,16,22,16,
> >               16,22,16,22,10,16,16,22,
> >               22,16,22,16,16,10,22,16,
> >               16,22,16,22,16,22,10,16,
> >               22,16,22,16,22,16,16,10"
> > 
> > Which has a non-fully-connected topology.
> > 
> 
> I like this support and I'm pretty sure you used it to 
> reproduce my problems with sched/numa locally, but I think it 
> would be better to seperate it out as a different parameter 
> such as slit=fake so that we can still use it to fake the SLIT 
> of our NUMA machines without requiring numa=fake which 
> provides no guarantees to break the nodes along physical 
> boundaries.
> 
> So without seperating it out into slit=fake, we can't change 
> this information without changing the SLIT itself and that 
> makes debugging harder.

Makes sense - wanna send a patch?

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-06  7:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-09 12:58 [tip:sched/core] x86/numa: Allow specifying node_distance() for numa=fake tip-bot for Peter Zijlstra
2012-05-31 20:49 ` David Rientjes
2012-06-06  7:11   ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox