Lines Matching refs:batch
2566 int high_min, to_drain, batch; in decay_pcp_high() local
2570 batch = READ_ONCE(pcp->batch); in decay_pcp_high()
2577 pcp->high = max3(pcp->count - (batch << CONFIG_PCP_BATCH_SCALE_MAX), in decay_pcp_high()
2602 int to_drain, batch; in drain_zone_pages() local
2604 batch = READ_ONCE(pcp->batch); in drain_zone_pages()
2605 to_drain = min(pcp->count, batch); in drain_zone_pages()
2627 pcp->batch << CONFIG_PCP_BATCH_SCALE_MAX); in drain_pages_zone()
2749 static int nr_pcp_free(struct per_cpu_pages *pcp, int batch, int high, bool free_high) in nr_pcp_free() argument
2755 return min(pcp->count, batch << CONFIG_PCP_BATCH_SCALE_MAX); in nr_pcp_free()
2758 if (unlikely(high < batch)) in nr_pcp_free()
2762 min_nr_free = batch; in nr_pcp_free()
2763 max_nr_free = high - batch; in nr_pcp_free()
2769 batch = clamp_t(int, pcp->free_count, min_nr_free, max_nr_free); in nr_pcp_free()
2771 return batch; in nr_pcp_free()
2775 int batch, bool free_high) in nr_pcp_high() argument
2787 pcp->high = max(high - (batch << CONFIG_PCP_BATCH_SCALE_MAX), in nr_pcp_high()
2797 int free_count = max_t(int, pcp->free_count, batch); in nr_pcp_high()
2800 return min(batch << 2, pcp->high); in nr_pcp_high()
2807 int free_count = max_t(int, pcp->free_count, batch); in nr_pcp_high()
2812 int need_high = pcp->free_count + batch; in nr_pcp_high()
2826 int high, batch; in free_frozen_page_commit() local
2841 batch = READ_ONCE(pcp->batch); in free_frozen_page_commit()
2849 free_high = (pcp->free_count >= (batch + pcp->high_min / 2) && in free_frozen_page_commit()
2852 pcp->count >= batch)); in free_frozen_page_commit()
2857 if (pcp->free_count < (batch << CONFIG_PCP_BATCH_SCALE_MAX)) in free_frozen_page_commit()
2867 high = nr_pcp_high(pcp, zone, batch, free_high); in free_frozen_page_commit()
2869 free_pcppages_bulk(zone, nr_pcp_free(pcp, batch, high, free_high), in free_frozen_page_commit()
3193 int high, base_batch, batch, max_nr_alloc; in nr_pcp_alloc() local
3196 base_batch = READ_ONCE(pcp->batch); in nr_pcp_alloc()
3206 batch = base_batch; in nr_pcp_alloc()
3208 batch = (base_batch << pcp->alloc_factor); in nr_pcp_alloc()
3215 high = pcp->high = min(high + batch, high_max); in nr_pcp_alloc()
3223 if (batch <= max_nr_alloc && in nr_pcp_alloc()
3226 batch = min(batch, max_nr_alloc); in nr_pcp_alloc()
3235 if (batch > 1) in nr_pcp_alloc()
3236 batch = max(batch >> order, 2); in nr_pcp_alloc()
3238 return batch; in nr_pcp_alloc()
3253 int batch = nr_pcp_alloc(pcp, zone, order); in __rmqueue_pcplist() local
3257 batch, list, in __rmqueue_pcplist()
5809 int batch; in zone_batchsize() local
5817 batch = min(zone_managed_pages(zone) >> 10, SZ_1M / PAGE_SIZE); in zone_batchsize()
5818 batch /= 4; /* We effectively *= 4 below */ in zone_batchsize()
5819 if (batch < 1) in zone_batchsize()
5820 batch = 1; in zone_batchsize()
5832 batch = rounddown_pow_of_two(batch + batch/2) - 1; in zone_batchsize()
5834 return batch; in zone_batchsize()
5855 static int zone_highsize(struct zone *zone, int batch, int cpu_online, in zone_highsize() argument
5896 high = max(high, batch << 2); in zone_highsize()
5922 unsigned long high_max, unsigned long batch) in pageset_update() argument
5924 WRITE_ONCE(pcp->batch, batch); in pageset_update()
5948 pcp->batch = BOOT_PAGESET_BATCH; in per_cpu_pages_init()
5953 unsigned long high_max, unsigned long batch) in __zone_set_pageset_high_and_batch() argument
5960 pageset_update(pcp, high_min, high_max, batch); in __zone_set_pageset_high_and_batch()
6047 if ((cci->per_cpu_data_slice_size >> PAGE_SHIFT) > 3 * pcp->batch) in zone_pcp_update_cacheinfo()