Lines Matching defs:batch
115 /* Number of regions to batch together during background hydration. */
967 * To better utilize device bandwidth we batch together the hydration of
978 static void __batch_hydration(struct batch_info *batch,
984 if (batch->head) {
985 /* Try to extend the current batch */
986 if (batch->nr_batched_regions < max_batch_size &&
987 (batch->head->region_nr + batch->nr_batched_regions) == hd->region_nr) {
988 list_add_tail(&hd->list, &batch->head->list);
989 batch->nr_batched_regions++;
993 /* Check if we should issue the current batch */
994 if (batch->nr_batched_regions >= max_batch_size || hd) {
995 hydration_copy(batch->head, batch->nr_batched_regions);
996 batch->head = NULL;
997 batch->nr_batched_regions = 0;
1004 /* We treat max batch sizes of zero and one equivalently */
1010 /* Start a new batch */
1012 batch->head = hd;
1013 batch->nr_batched_regions = 1;
1018 struct batch_info *batch)
1042 __batch_hydration(batch, hd);
1066 struct batch_info batch = {
1098 current_volume += batch.nr_batched_regions;
1103 offset = __start_next_hydration(clone, offset, &batch);
1106 if (batch.head)
1107 hydration_copy(batch.head, batch.nr_batched_regions);