diff options
Diffstat (limited to 'mm/internal.h')
-rw-r--r-- | mm/internal.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/mm/internal.h b/mm/internal.h index efad241f7014..a96da5b0029d 100644 --- a/mm/internal.h +++ b/mm/internal.h | |||
@@ -110,6 +110,28 @@ extern pmd_t *mm_find_pmd(struct mm_struct *mm, unsigned long address); | |||
110 | */ | 110 | */ |
111 | 111 | ||
112 | /* | 112 | /* |
113 | * Structure for holding the mostly immutable allocation parameters passed | ||
114 | * between functions involved in allocations, including the alloc_pages* | ||
115 | * family of functions. | ||
116 | * | ||
117 | * nodemask, migratetype and high_zoneidx are initialized only once in | ||
118 | * __alloc_pages_nodemask() and then never change. | ||
119 | * | ||
120 | * zonelist, preferred_zone and classzone_idx are set first in | ||
121 | * __alloc_pages_nodemask() for the fast path, and might be later changed | ||
122 | * in __alloc_pages_slowpath(). All other functions pass the whole strucure | ||
123 | * by a const pointer. | ||
124 | */ | ||
125 | struct alloc_context { | ||
126 | struct zonelist *zonelist; | ||
127 | nodemask_t *nodemask; | ||
128 | struct zone *preferred_zone; | ||
129 | int classzone_idx; | ||
130 | int migratetype; | ||
131 | enum zone_type high_zoneidx; | ||
132 | }; | ||
133 | |||
134 | /* | ||
113 | * Locate the struct page for both the matching buddy in our | 135 | * Locate the struct page for both the matching buddy in our |
114 | * pair (buddy1) and the combined O(n+1) page they form (page). | 136 | * pair (buddy1) and the combined O(n+1) page they form (page). |
115 | * | 137 | * |
@@ -329,8 +351,10 @@ extern int mminit_loglevel; | |||
329 | #define mminit_dprintk(level, prefix, fmt, arg...) \ | 351 | #define mminit_dprintk(level, prefix, fmt, arg...) \ |
330 | do { \ | 352 | do { \ |
331 | if (level < mminit_loglevel) { \ | 353 | if (level < mminit_loglevel) { \ |
332 | printk(level <= MMINIT_WARNING ? KERN_WARNING : KERN_DEBUG); \ | 354 | if (level <= MMINIT_WARNING) \ |
333 | printk(KERN_CONT "mminit::" prefix " " fmt, ##arg); \ | 355 | printk(KERN_WARNING "mminit::" prefix " " fmt, ##arg); \ |
356 | else \ | ||
357 | printk(KERN_DEBUG "mminit::" prefix " " fmt, ##arg); \ | ||
334 | } \ | 358 | } \ |
335 | } while (0) | 359 | } while (0) |
336 | 360 | ||