Re: HUGETLB pages on multiple nodes

From: Christoph Hellwig <hch_at_infradead.org>
Date: 2003-07-18 01:20:56
On Mon, Jul 14, 2003 at 12:20:37PM -0700, Nick Pollitt wrote:
> +#ifdef CONFIG_NUMA
> +		int node = i % num_memblks;
> +		page = alloc_pages_node(node, __GFP_HIGHMEM, HUGETLB_PAGE_ORDER);
> +#else
>  		page = alloc_pages(__GFP_HIGHMEM, HUGETLB_PAGE_ORDER);
> +#endif /* CONFIG_NUMA */

Why the num_memblks?  We care for nodes, not memblks, don't we?

Also you can just use alloc_pages_node directly in the non-NUMA code.

See how alloc_pages is implemented in 2.5:

#define alloc_pages(gfp_mask, order) \
                alloc_pages_node(numa_node_id(), gfp_mask, order)

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Jul 17 11:23:14 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:16 EST