Re: [PATCH v3] mm/memory_hotplug: refrain from adding memory into an impossible node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 14-04-20 17:58:12, Vishal Verma wrote:
[...]
> +static int check_hotplug_node(int nid)
> +{
> +	int alt_nid;
> +
> +	if (node_possible(nid))
> +		return nid;
> +
> +	alt_nid = numa_map_to_online_node(nid);
> +	if (alt_nid == NUMA_NO_NODE)
> +		alt_nid = first_online_node;
> +	WARN_TAINT(1, TAINT_FIRMWARE_WORKAROUND,
> +		   "node %d expected, but was absent from the node_possible_map, using %d instead\n",
> +		   nid, alt_nid);

I really do not like this. Why should we try to be clever and change the
node id requested by the caller? I would just stick with node_possible
check and be done with this.

-- 
Michal Hocko
SUSE Labs




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux