diff --git a/include/linux/mm.h b/include/linux/mm.h index f767c5f1b784..62b8f0403498 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -4291,6 +4291,9 @@ void vma_pgtable_walk_end(struct vm_area_struct *vma); int reserve_mem_find_by_name(const char *name, phys_addr_t *start, phys_addr_t *size); +void zone_pageset_high_and_batch_update(struct zone *zone, int new_high_min, + int new_high_max, int new_batch); + #ifdef CONFIG_64BIT int do_mseal(unsigned long start, size_t len_in, unsigned long flags); #else diff --git a/mm/page_alloc.c b/mm/page_alloc.c index da3ab3c781f9..01e7586a7e11 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -6217,6 +6217,22 @@ static void zone_pcp_update(struct zone *zone, int cpu_online) mutex_unlock(&pcp_batch_high_lock); } +void zone_pageset_high_and_batch_update(struct zone *zone, int new_high_min, + int new_high_max, int new_batch) +{ + mutex_lock(&pcp_batch_high_lock); + + zone->pageset_high_min = new_high_min; + zone->pageset_high_max = new_high_max; + zone->pageset_batch = new_batch; + + __zone_set_pageset_high_and_batch(zone, new_high_min, new_high_max, + new_batch); + + mutex_unlock(&pcp_batch_high_lock); +} +EXPORT_SYMBOL_GPL(zone_pageset_high_and_batch_update); + static void zone_pcp_update_cacheinfo(struct zone *zone, unsigned int cpu) { struct per_cpu_pages *pcp;