lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D5EB35D.3000305@kernel.org>
Date:	Fri, 18 Feb 2011 09:58:53 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Tejun Heo <tj@...nel.org>, David Rientjes <rientjes@...gle.com>
CC:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
	Cyrill Gorcunov <gorcunov@...il.com>
Subject: Re: [PATCH 2/3 tip:x86/mm] x86-64, NUMA: Move NUMA emulation into
 numa_emulation.c

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@...nel.org>
> Cc: Yinghai Lu <yinghai@...nel.org>
> Cc: Ingo Molnar <mingo@...hat.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 */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ