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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 20 Jan 2010 22:58:37 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Haicheng Li <haicheng.li@...ux.intel.com>
cc:	Ingo Molnar <mingo@...hat.com>, Yinghai Lu <yinghai@...nel.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
	Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org
Subject: Re: [patch] x86: set hotpluggable nodes in nodes_possible_map

On Thu, 21 Jan 2010, Haicheng Li wrote:

> diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
> index a271241..c5552ae 100644
> --- a/arch/x86/mm/srat_64.c
> +++ b/arch/x86/mm/srat_64.c
> @@ -27,8 +27,18 @@ int acpi_numa __initdata;
> 
>  static struct acpi_table_slit *acpi_slit;
> 
> +/* nodes_parsed:
> + *  - nodes with memory on
> + * cpu_nodes_parsed:
> + *  - nodes with cpu on
> + * hp_nodes_parsed:
> + *  - nodes with hotpluggable memory region
> + *
> + * We union these tree nodemasks to get node_possible_map.
> + */
>  static nodemask_t nodes_parsed __initdata;
>  static nodemask_t cpu_nodes_parsed __initdata;
> +static nodemask_t hp_nodes_parsed __initdata;
>  static struct bootnode nodes[MAX_NUMNODES] __initdata;
>  static struct bootnode nodes_add[MAX_NUMNODES];
> 
> @@ -229,9 +239,11 @@ update_nodes_add(int node, unsigned long start, unsigned
> long end)
>  			printk(KERN_ERR "SRAT: Hotplug zone not continuous.
> Partly ignored\n");
>  	}
> 
> -	if (changed)
> +	if (changed) {
> +		node_set(node, hp_nodes_parsed);
>  		printk(KERN_INFO "SRAT: hot plug zone found %Lx - %Lx\n",
>  				 nd->start, nd->end);
> +	}
>  }
> 
>  /* Callback for parsing of the Proximity Domain <-> Memory Area mappings */
> @@ -380,8 +392,10 @@ int __init acpi_scan_nodes(unsigned long start, unsigned
> long end)
>  		return -1;
>  	}
> 
> -	/* Account for nodes with cpus and no memory */
> +	/* Account for nodes with memory and cpus */
>  	nodes_or(node_possible_map, nodes_parsed, cpu_nodes_parsed);
> +	/* Account for nodes with hotpluggable memory regions */
> +	nodes_or(node_possible_map, node_possible_map, hp_nodes_parsed);
> 
>  	/* Finally register nodes */
>  	for_each_node_mask(i, node_possible_map)
> 
> 

Nack, we don't need to add yet another nodemask because you're having 
trouble finding a new name for a cpu_nodes_parsed.  It would be perfectly 
acceptable to rename nodes_parsed to mem_nodes and cpu_nodes_parsed to 
no_mem_nodes, which are even shorter.  But we definitely don't need 
another nodemask and I think we're convoluting the bug fix here way too 
much.  Regardless of the future nomenclature, let's please merge my patch 
to fix the outstanding kernel issue and then propose an alternative naming 
scheme later.
--
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