@@ -534,10 +534,14 @@ unsigned long reclaim_clean_pages_from_list(struct zone *zone,
#endif
#define ALLOC_KSWAPD 0x200 /* allow waking of kswapd */
+static inline void disable_watermark_boosting(void)
+{
+ watermark_boost_factor = 0;
+}
+
enum ttu_flags;
struct tlbflush_unmap_batch;
-
/*
* only for MM internal work items which do not depend on
* any allocations or locks which might depend on allocations
@@ -5810,10 +5810,12 @@ void __ref build_all_zonelists(pg_data_t *pgdat)
* made on memory-hotadd so a system can start with mobility
* disabled and enable it later
*/
- if (vm_total_pages < (pageblock_nr_pages * MIGRATE_TYPES))
+ if (vm_total_pages < (pageblock_nr_pages * MIGRATE_TYPES)) {
page_group_by_mobility_disabled = 1;
- else
+ disable_watermark_boosting();
+ } else {
page_group_by_mobility_disabled = 0;
+ }
pr_info("Built %u zonelists, mobility grouping %s. Total pages: %ld\n",
nr_online_nodes,
An off-list bug report indicated that watermark boosting was affecting a very small memory system and causing excessive reclaim. Watermark boosting is intended to reduce the mixing of page mobility types within pageblocks for high-order allocations. If the system has so little memory that pages are not even grouped by mobility, then watermark boosting should also be disabled. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> --- mm/internal.h | 6 +++++- mm/page_alloc.c | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-)