Lines Matching defs:batch

92 /* prevent >1 _updater_ of zone percpu pageset ->high and ->batch fields */
2201 int to_drain, batch;
2203 batch = READ_ONCE(pcp->batch);
2204 to_drain = min(pcp->count, batch);
2357 int batch = READ_ONCE(pcp->batch);
2359 /* Free everything if batch freeing high-order pages. */
2364 if (unlikely(high < batch))
2367 /* Leave at least pcp->batch pages on the list */
2368 min_nr_free = batch;
2369 max_nr_free = high - batch;
2375 batch <<= pcp->free_factor;
2376 if (batch < max_nr_free)
2378 batch = clamp(batch, min_nr_free, max_nr_free);
2380 return batch;
2398 return min(READ_ONCE(pcp->batch) << 2, high);
2720 int batch = READ_ONCE(pcp->batch);
2724 * Scale batch relative to order if batch implies
2730 if (batch > 1)
2731 batch = max(batch >> order, 2);
2733 batch, list,
2768 * On allocation, reduce the number of pages that are batch freed.
4370 /* Attempt the batch allocation */
5251 int batch;
5254 * The number of pages to batch allocate is either ~0.1%
5255 * of the zone or 1MB, whichever is smaller. The batch
5259 batch = min(zone_managed_pages(zone) >> 10, SZ_1M / PAGE_SIZE);
5260 batch /= 4; /* We effectively *= 4 below */
5261 if (batch < 1)
5262 batch = 1;
5265 * Clamp the batch to a 2^n - 1 value. Having a power
5274 batch = rounddown_pow_of_two(batch + batch/2) - 1;
5276 return batch;
5297 static int zone_highsize(struct zone *zone, int batch, int cpu_online)
5334 * Ensure high is at least batch*4. The multiple is based on the
5335 * historical relationship between high and batch.
5337 high = max(high, batch << 2);
5346 * pcp->high and pcp->batch values are related and generally batch is lower
5353 * store tearing. Any new users of pcp->batch and pcp->high should ensure they
5362 unsigned long batch)
5364 WRITE_ONCE(pcp->batch, batch);
5380 * Set batch and high values safe for a boot pageset. A true percpu
5386 pcp->batch = BOOT_PAGESET_BATCH;
5391 unsigned long batch)
5398 pageset_update(pcp, high, batch);
5403 * Calculate and set new high and batch values for all per-cpu pagesets of a
5445 * The zone indicated has a new number of managed_pages; batch sizes and percpu
5500 pr_debug(" %s zone: %lu pages, LIFO batch:%u\n", zone->name,
5756 * The watermark size have changed so update the pcpu batch