ANDROID: mm: Added zone_pageset_high_and_batch_update
Added a new function zone_pageset_high_and_batch_update, which is like zone_pcp_update but with new high_min, high_max and batch values provided directly by the caller (rather than returned by zone_highsize). This gives vendors an interface to directly tune the pageset to suit varying loads. Bug: 431672372 Change-Id: Icd1e297f4cfb2309b36caa7f7c61b1c7c7cd9f24 Signed-off-by: Pengfei Li <pengfei.kernel@vivo.corp-partner.google.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user