Re: [PATCH v3 07/23] mm/memblock: switch to use NUMA_NO_NODE instead of MAX_NUMNODES

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

 



On Mon, Dec 09, 2013 at 04:50:40PM -0500, Santosh Shilimkar wrote:
> +	if (nid == MAX_NUMNODES)
> +		pr_warn_once("%s: Usage of MAX_NUMNODES is depricated. Use NUMA_NO_NODE instead\n",
> +			     __func__);

Why not just use WARN_ONCE()?  We'd want to know who the caller is
anyway.  Also, wouldn't something like the following simpler?

	if (WARN_ONCE(nid == MAX_NUMNODES, blah blah))
		nid = NUMA_NO_NODE;

> @@ -768,6 +773,11 @@ void __init_memblock __next_free_mem_range_rev(u64 *idx, int nid,
>  	struct memblock_type *rsv = &memblock.reserved;
>  	int mi = *idx & 0xffffffff;
>  	int ri = *idx >> 32;
> +	bool check_node = (nid != NUMA_NO_NODE) && (nid != MAX_NUMNODES);
> +
> +	if (nid == MAX_NUMNODES)
> +		pr_warn_once("%s: Usage of MAX_NUMNODES is depricated. Use NUMA_NO_NODE instead\n",
> +			     __func__);

Ditto.

Provided the patch is tested on an actual NUMA setup.

Reviwed-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

-- 
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




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