diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 12:37:17 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 12:37:17 +0000 |
commit | 9aa9eb41942b918f385ccabd2efdd6e7e4232165 (patch) | |
tree | 20bec7da036d31ec185dfc1dcc00753c7ac9b170 /mm | |
parent | 87075e049581f880f01eb0b41aa6ac807b299e35 (diff) |
Merge with Linux 2.4.0-test6-pre1.
Diffstat (limited to 'mm')
-rw-r--r-- | mm/numa.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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))) |