public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Tejun Heo <tj@kernel.org>, David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org,
	Cyrill Gorcunov <gorcunov@gmail.com>
Subject: Re: [PATCH 2/3 tip:x86/mm] x86-64, NUMA: Move NUMA emulation into numa_emulation.c
Date: Fri, 18 Feb 2011 09:58:53 -0800	[thread overview]
Message-ID: <4D5EB35D.3000305@kernel.org> (raw)
In-Reply-To: <20110218135939.GH21209@htj.dyndns.org>

On 02/18/2011 05:59 AM, Tejun Heo wrote:
> Create numa_emulation.c and move all NUMA emulation code there.  The
> definitions of struct numa_memblk and numa_meminfo are moved to
> numa_64.h.  Also, numa_remove_memblk_from(), numa_cleanup_meminfo(),
> numa_reset_distance() along with numa_emulation() are made global.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Yinghai Lu <yinghai@kernel.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> ---
>  arch/x86/include/asm/numa_64.h |   29 ++
>  arch/x86/mm/Makefile           |    1 
>  arch/x86/mm/numa_64.c          |  479 -----------------------------------------
>  arch/x86/mm/numa_emulation.c   |  451 ++++++++++++++++++++++++++++++++++++++
>  4 files changed, 482 insertions(+), 478 deletions(-)
> 
> Index: work/arch/x86/include/asm/numa_64.h
> ===================================================================
> --- work.orig/arch/x86/include/asm/numa_64.h
> +++ work/arch/x86/include/asm/numa_64.h
> @@ -18,6 +18,21 @@ extern void setup_node_bootmem(int nodei
>  
>  #ifdef CONFIG_NUMA
>  /*
> + * Data structures to describe memory configuration during NUMA
> + * initialization.  Use only in NUMA init and emulation paths.
> + */

those internal struct and functions declaring could be in
arch/x86/mm/numa_internal.h ?

David, can you please check tip/x86/mm ?

Thanks

Yinghai



> +struct numa_memblk {
> +	u64			start;
> +	u64			end;
> +	int			nid;
> +};
> +
> +struct numa_meminfo {
> +	int			nr_blks;
> +	struct numa_memblk	blk[NR_NODE_MEMBLKS];
> +};
> +
> +/*
>   * Too small node sizes may confuse the VM badly. Usually they
>   * result from BIOS bugs. So dont recognize nodes as standalone
>   * NUMA entities that have less than this amount of RAM listed:
> @@ -28,15 +43,25 @@ extern nodemask_t numa_nodes_parsed __in
>  
>  extern int __cpuinit numa_cpu_node(int cpu);
>  extern int __init numa_add_memblk(int nodeid, u64 start, u64 end);
> +extern void __init numa_remove_memblk_from(int idx, struct numa_meminfo *mi);
> +extern int __init numa_cleanup_meminfo(struct numa_meminfo *mi);
> +extern void __init numa_reset_distance(void);
>  extern void __init numa_set_distance(int from, int to, int distance);
>  
>  #ifdef CONFIG_NUMA_EMU
>  #define FAKE_NODE_MIN_SIZE	((u64)32 << 20)
>  #define FAKE_NODE_MIN_HASH_MASK	(~(FAKE_NODE_MIN_SIZE - 1UL))
>  void numa_emu_cmdline(char *);
> +void __init numa_emulation(struct numa_meminfo *numa_meminfo,
> +			   int numa_dist_cnt);
> +#else  /* CONFIG_NUMA_EMU */
> +static inline void numa_emulation(struct numa_meminfo *numa_meminfo,
> +				  int numa_dist_cnt)
> +{ }
>  #endif /* CONFIG_NUMA_EMU */
> -#else
> +
> +#else  /* CONFIG_NUMA */
>  static inline int numa_cpu_node(int cpu)		{ return NUMA_NO_NODE; }
> -#endif
> +#endif /* CONFIG_NUMA */
>  
>  #endif /* _ASM_X86_NUMA_64_H */

  reply	other threads:[~2011-02-18 18:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18 13:58 [PATCH 1/3 tip:x86/mm] x86-64, NUMA: Prepare numa_emulation() for moving NUMA emulation into a separate file Tejun Heo
2011-02-18 13:59 ` [PATCH 2/3 tip:x86/mm] x86-64, NUMA: Move NUMA emulation into numa_emulation.c Tejun Heo
2011-02-18 17:58   ` Yinghai Lu [this message]
2011-02-20 21:58     ` David Rientjes
2011-02-24 19:38       ` Yinghai Lu
2011-02-21  8:26   ` [PATCH UPDATED " Tejun Heo
2011-02-21 17:10     ` Yinghai Lu
2011-02-22 10:14       ` Tejun Heo
2011-02-18 14:00 ` [PATCH 3/3 tip:x86/mm] x86-64, NUMA: Add proper function comments to global functions Tejun Heo

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=4D5EB35D.3000305@kernel.org \
    --to=yinghai@kernel.org \
    --cc=gorcunov@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rientjes@google.com \
    --cc=tglx@linutronix.de \
    --cc=tj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox