You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Allow huge page allocations to use GFP_HIGH_MOVABLE
Huge pages are not movable so are not allocated from ZONE_MOVABLE. However, as ZONE_MOVABLE will always have pages that can be migrated or reclaimed, it can be used to satisfy hugepage allocations even when the system has been running a long time. This allows an administrator to resize the hugepage pool at runtime depending on the size of ZONE_MOVABLE. This patch adds a new sysctl called hugepages_treat_as_movable. When a non-zero value is written to it, future allocations for the huge page pool will use ZONE_MOVABLE. Despite huge pages being non-movable, we do not introduce additional external fragmentation of note as huge pages are always the largest contiguous block we care about. [akpm@linux-foundation.org: various fixes] Signed-off-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
2a1e274acf
commit
396faf0303
@@ -159,7 +159,7 @@ extern void mpol_fix_fork_child_flag(struct task_struct *p);
|
||||
|
||||
extern struct mempolicy default_policy;
|
||||
extern struct zonelist *huge_zonelist(struct vm_area_struct *vma,
|
||||
unsigned long addr);
|
||||
unsigned long addr, gfp_t gfp_flags);
|
||||
extern unsigned slab_node(struct mempolicy *policy);
|
||||
|
||||
extern enum zone_type policy_zone;
|
||||
@@ -256,9 +256,9 @@ static inline void mpol_fix_fork_child_flag(struct task_struct *p)
|
||||
#define set_cpuset_being_rebound(x) do {} while (0)
|
||||
|
||||
static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma,
|
||||
unsigned long addr)
|
||||
unsigned long addr, gfp_t gfp_flags)
|
||||
{
|
||||
return NODE_DATA(0)->node_zonelists + gfp_zone(GFP_HIGHUSER);
|
||||
return NODE_DATA(0)->node_zonelists + gfp_zone(gfp_flags);
|
||||
}
|
||||
|
||||
static inline int do_migrate_pages(struct mm_struct *mm,
|
||||
|
||||
Reference in New Issue
Block a user