mm, compaction: persistently skip hugetlbfs pageblocks
Subsystems (2)
[email protected]
maintainerPATCH 6/94 mm, compaction: persistently skip hugetlbfs pageblocks
From: David Rientjes <[email protected]>
Subject: mm, compaction: persistently skip hugetlbfs pageblocks
It is pointless to migrate hugetlb memory as part of memory compaction if the hugetlb size is equal to the pageblock order. No defragmentation is occurring in this condition.
It is also pointless to for the freeing scanner to scan a pageblock where a hugetlb page is pinned. Unconditionally skip these pageblocks, and do so peristently so that they are not rescanned until it is observed that these hugepages are no longer pinned.
It would also be possible to do this by involving the hugetlb subsystem in marking pageblocks to no longer be skipped when they hugetlb pages are freed. This is a simple solution that doesn't involve any additional subsystems in pageblock skip manipulation.
---
include/linux/pageblock-flags.h | 11 ++++++ mm/compaction.c | 54 +++++++++++++++++++++++------- 2 files changed, 54 insertions(+), 11 deletions(-)
include/linux/pageblock-flags.h renamed from include/linux/pageblock-flags.h~mm-compaction-persistently-skip-hugetlbfs-pageblocks +11 -0
@@ -96,6 +96,17 @@ void set_pfnblock_flags_mask(struct page#define set_pageblock_skip (page) \ set_pageblock_flags_group(page, 1, PB_migrate_skip, \ PB_migrate_skip) +#else +static inline bool get_pageblock_skip (struct page *page) +{ +return false; +} +static inline void clear_pageblock_skip (struct page *page) +{ +} +static inline void set_pageblock_skip (struct page *page) +{ +}#endif /* CONFIG_COMPACTION */ #endif /* PAGEBLOCK_FLAGS_H */
mm/compaction.c renamed from mm/compaction.c~mm-compaction-persistently-skip-hugetlbfs-pageblocks +43 -11
93 lines not on this page · raw message
_