mm: Extend gfp masking to the page allocator
The page allocator also needs the masking of gfp flags during boot, so this moves it out of slab/slub and uses it with the page allocator as well. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
9729a6eb58
commit
dcce284a25
@@ -99,7 +99,7 @@ struct vm_area_struct;
|
||||
__GFP_NORETRY|__GFP_NOMEMALLOC)
|
||||
|
||||
/* Control slab gfp mask during early boot */
|
||||
#define SLAB_GFP_BOOT_MASK __GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS)
|
||||
#define GFP_BOOT_MASK __GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS)
|
||||
|
||||
/* Control allocation constraints */
|
||||
#define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE)
|
||||
@@ -348,4 +348,11 @@ static inline void oom_killer_enable(void)
|
||||
oom_killer_disabled = false;
|
||||
}
|
||||
|
||||
extern gfp_t gfp_allowed_mask;
|
||||
|
||||
static inline void set_gfp_allowed_mask(gfp_t mask)
|
||||
{
|
||||
gfp_allowed_mask = mask;
|
||||
}
|
||||
|
||||
#endif /* __LINUX_GFP_H */
|
||||
|
Reference in New Issue
Block a user