History

mm: change alloc_pages_vma to pass down the policy node for local policy

Currently alloc_pages_vma() always uses the local node as policy node for the LOCAL policy. Pass this node down as an argument instead. No behaviour change from this patch, but will be needed for followons.

Andi Kleen committed 15 years ago

Commit 2f5f9481 parent b8bc1dd3 files · +11 −11Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/gfp.h+5−4
@@ -332,16 +332,17 @@ alloc_pages(gfp_t gfp_mask, unsigned int order) · 331 unmodified lines
332 return alloc_pages_current(gfp_mask, order);332 return alloc_pages_current(gfp_mask, order);
333}333}
334extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order,334extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order,
335 struct vm_area_struct *vma, unsigned long addr);335 struct vm_area_struct *vma, unsigned long addr,
336 int node);
336#else337#else
337#define alloc_pages(gfp_mask, order) \338#define alloc_pages(gfp_mask, order) \
338 alloc_pages_node(numa_node_id(), gfp_mask, order)339 alloc_pages_node(numa_node_id(), gfp_mask, order)
339#define alloc_pages_vma(gfp_mask, order, vma, addr) \340#define alloc_pages_vma(gfp_mask, order, vma, addr, node) \
340 alloc_pages(gfp_mask, order)341 alloc_pages(gfp_mask, order)
341#endif342#endif
342#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)343#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
343#define alloc_page_vma(gfp_mask, vma, addr) \344#define alloc_page_vma(gfp_mask, vma, addr) \
344 alloc_pages_vma(gfp_mask, 0, vma, addr)345 alloc_pages_vma(gfp_mask, 0, vma, addr, numa_node_id())
345 346
346extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);347extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
347extern unsigned long get_zeroed_page(gfp_t gfp_mask);348extern unsigned long get_zeroed_page(gfp_t gfp_mask);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t