All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Holasek <pholasek@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	Anton Arapov <anton@redhat.com>
Subject: Re: NUMA emulation x86_64: numa=fake parameter for custom nodes distance
Date: Sat, 19 Nov 2011 01:31:15 +0100	[thread overview]
Message-ID: <20111119003114.GA10179@stainedmachine.redhat.com> (raw)
In-Reply-To: <20111118115336.18de45a0.akpm@linux-foundation.org>

On Fri, 18 Nov 2011, Andrew Morton wrote:

> Date: Fri, 18 Nov 2011 11:53:36 -0800
> From: Andrew Morton <akpm@linux-foundation.org>
> To: Petr Holasek <pholasek@redhat.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>,
>  "H. Peter Anvin" <hpa@zytor.com>, linux-kernel@vger.kernel.org,
>  x86@kernel.org, Anton Arapov <anton@redhat.com>
> Subject: Re: [PATCH 1/2] NUMA emulation x86_64: numa=fake parameter for
>  custom nodes distance
> 
> On Fri, 18 Nov 2011 12:55:07 +0100
> Petr Holasek <pholasek@redhat.com> wrote:
> 
> > As default, when numa emulation is turned on, node distance table
> > uses physical distance, so for 4 nodes emulated on 1 physical table is
> > 
> > node   0   1   2   3
> > 0:  10  10  10  10
> > 1:  10  10  10  10
> > 2:  10  10  10  10
> > 3:  10  10  10  10
> > 
> > This patch adds new [distance] argument to
> > 
> > numa=fake=<number/size of nodes>[,distance]
> > 
> > When distance argument is used, it sets linear distance between nodes
> > like that:
> > 
> >     __distance__
> > ___|___     ____|___     ________     ________
> > |       |   |        |   |        |   |        |
> > | node1 |---| node 2 |---| node 3 |---| node 4 |
> > |_______|   |________|   |________|   |________|
> > |                        |             |
> > |                        |             |
> > |____distance * 2________|             |
> > |                                      |
> > |____________distance * 3______________|
> > 
> > This feature might be useful for testing some numa awareness features in
> > both user and kernel spaces.
> > 
> 
> "might" is a red flag.  We don't merge things which might be useful!
> 
> *Is* it useful?  If so then please tell us why and explain how it might
> be useful to others.

A lot of developers still have no access to large NUMA machines and 
possibility of NUMA emulation could involve more of them to thinking
about NUMA awareness of their apps/kernel code.

> 
> > @@ -404,6 +406,17 @@ void __init numa_emulation(struct numa_meminfo *numa_meminfo, int numa_dist_cnt)
> >  		if (emu_nid_to_phys[i] == NUMA_NO_NODE)
> >  			emu_nid_to_phys[i] = dfl_phys_nid;
> >  
> > +	/* load distance level parameter */
> > +	dist_level = -1;
> > +	c = strchr(emu_cmdline, ',');
> > +	if (c) {
> > +		c++;
> > +		ret = kstrtoul(c, 10, &dist_level);
> > +		if (ret < 0 || dist_level < LOCAL_DISTANCE ||
> > +				dist_level * max_emu_nid > ULONG_MAX)
> > +			dist_level = -1;
> 
> If this happens, the user goofed and we should tell them, with a printk.
> 
> 
> [patch 2/2] adds the documentation for the feature and should be
> included in the same patch as the implementation.

Apologize, I'll send v2 of patch with printk() and documentation all-in-one
if it is necessary.

thanks,
Petr H

> 

  reply	other threads:[~2011-11-19  0:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-18 11:55 [PATCH 1/2] NUMA emulation x86_64: numa=fake parameter for custom nodes distance Petr Holasek
2011-11-18 11:55 ` [PATCH 2/2] NUMA emulation x86_64: Documentation changes in boot-options.txt Petr Holasek
2011-11-18 19:53 ` [PATCH 1/2] NUMA emulation x86_64: numa=fake parameter for custom nodes distance Andrew Morton
2011-11-19  0:31   ` Petr Holasek [this message]
2011-11-20  2:09     ` David Rientjes
2011-11-21 20:41       ` Petr Holasek
2011-11-21 22:24         ` David Rientjes
2011-11-20  2:06 ` [PATCH 1/2] " David Rientjes

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=20111119003114.GA10179@stainedmachine.redhat.com \
    --to=pholasek@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=anton@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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.