- 论坛徽章:
- 0
|
v2.4.0
下面的NODE_DATA(numa_node_id())找不到?
struct page * alloc_pages(int gfp_mask, unsigned long order)
{
struct page *ret = 0;
pg_data_t *start, *temp;
#ifndef CONFIG_NUMA
unsigned long flags;
static pg_data_t *next = 0;
#endif
if (order >= MAX_ORDER)
return NULL;
#ifdef CONFIG_NUMA
temp = NODE_DATA(numa_node_id());
#else
spin_lock_irqsave(&node_lock, flags);
if (!next) next = pgdat_list;
temp = next;
next = next->node_next;
spin_unlock_irqrestore(&node_lock, flags);
#endif
start = temp;
while (temp) {
if ((ret = alloc_pages_pgdat(temp, gfp_mask, order)))
return(ret);
temp = temp->node_next;
}
temp = pgdat_list;
while (temp != start) {
if ((ret = alloc_pages_pgdat(temp, gfp_mask, order)))
return(ret);
temp = temp->node_next;
}
return(0);
}
头文件include/linux/mmzone.h
#ifndef CONFIG_DISCONTIGMEM
#define NODE_DATA(nid) (&contig_page_data)
#define NODE_MEM_MAP(nid) mem_map
#else /* !CONFIG_DISCONTIGMEM */
#include <asm/mmzone.h>
#endif /* !CONFIG_DISCONTIGMEM */
asm/mmzone.h(连接到include/asm-i386/mmzone.h)找不到此文件 |
|