aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/gfp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r--include/linux/gfp.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 0b84c61607e8..bfb8f934521e 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -35,6 +35,7 @@ struct vm_area_struct;
35#define ___GFP_NOTRACK 0 35#define ___GFP_NOTRACK 0
36#endif 36#endif
37#define ___GFP_NO_KSWAPD 0x400000u 37#define ___GFP_NO_KSWAPD 0x400000u
38#define ___GFP_OTHER_NODE 0x800000u
38 39
39/* 40/*
40 * GFP bitmasks.. 41 * GFP bitmasks..
@@ -83,6 +84,7 @@ struct vm_area_struct;
83#define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */ 84#define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */
84 85
85#define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) 86#define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD)
87#define __GFP_OTHER_NODE ((__force gfp_t)___GFP_OTHER_NODE) /* On behalf of other node */
86 88
87/* 89/*
88 * This may seem redundant, but it's a way of annotating false positives vs. 90 * This may seem redundant, but it's a way of annotating false positives vs.
@@ -332,16 +334,19 @@ alloc_pages(gfp_t gfp_mask, unsigned int order)
332 return alloc_pages_current(gfp_mask, order); 334 return alloc_pages_current(gfp_mask, order);
333} 335}
334extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order, 336extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order,
335 struct vm_area_struct *vma, unsigned long addr); 337 struct vm_area_struct *vma, unsigned long addr,
338 int node);
336#else 339#else
337#define alloc_pages(gfp_mask, order) \ 340#define alloc_pages(gfp_mask, order) \
338 alloc_pages_node(numa_node_id(), gfp_mask, order) 341 alloc_pages_node(numa_node_id(), gfp_mask, order)
339#define alloc_pages_vma(gfp_mask, order, vma, addr) \ 342#define alloc_pages_vma(gfp_mask, order, vma, addr, node) \
340 alloc_pages(gfp_mask, order) 343 alloc_pages(gfp_mask, order)
341#endif 344#endif
342#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) 345#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
343#define alloc_page_vma(gfp_mask, vma, addr) \ 346#define alloc_page_vma(gfp_mask, vma, addr) \
344 alloc_pages_vma(gfp_mask, 0, vma, addr) 347 alloc_pages_vma(gfp_mask, 0, vma, addr, numa_node_id())
348#define alloc_page_vma_node(gfp_mask, vma, addr, node) \
349 alloc_pages_vma(gfp_mask, 0, vma, addr, node)
345 350
346extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); 351extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
347extern unsigned long get_zeroed_page(gfp_t gfp_mask); 352extern unsigned long get_zeroed_page(gfp_t gfp_mask);