From 9aa9eb41942b918f385ccabd2efdd6e7e4232165 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 8 Aug 2000 12:37:17 +0000 Subject: Merge with Linux 2.4.0-test6-pre1. --- mm/numa.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mm') diff --git a/mm/numa.c b/mm/numa.c index 3826d636e..bbe9ec6fb 100644 --- a/mm/numa.c +++ b/mm/numa.c @@ -86,18 +86,24 @@ void __init free_area_init_node(int nid, pg_data_t *pgdat, struct page * alloc_pages(int gfp_mask, unsigned long order) { struct page *ret = 0; - unsigned long flags; int startnode, tnode; +#ifndef CONFIG_NUMA + unsigned long flags; static int nextnid = 0; +#endif if (order >= MAX_ORDER) return NULL; +#ifdef CONFIG_NUMA + tnode = numa_node_id(); +#else spin_lock_irqsave(&node_lock, flags); tnode = nextnid; nextnid++; if (nextnid == numnodes) nextnid = 0; spin_unlock_irqrestore(&node_lock, flags); +#endif startnode = tnode; while (tnode < numnodes) { if ((ret = alloc_pages_node(tnode++, gfp_mask, order))) -- cgit v1.2.3