Lines Matching defs:batch
121 /* Number of regions to batch together during background hydration. */
973 * To better utilize device bandwidth we batch together the hydration of
984 static void __batch_hydration(struct batch_info *batch,
990 if (batch->head) {
991 /* Try to extend the current batch */
992 if (batch->nr_batched_regions < max_batch_size &&
993 (batch->head->region_nr + batch->nr_batched_regions) == hd->region_nr) {
994 list_add_tail(&hd->list, &batch->head->list);
995 batch->nr_batched_regions++;
999 /* Check if we should issue the current batch */
1000 if (batch->nr_batched_regions >= max_batch_size || hd) {
1001 hydration_copy(batch->head, batch->nr_batched_regions);
1002 batch->head = NULL;
1003 batch->nr_batched_regions = 0;
1010 /* We treat max batch sizes of zero and one equivalently */
1016 /* Start a new batch */
1018 batch->head = hd;
1019 batch->nr_batched_regions = 1;
1024 struct batch_info *batch)
1048 __batch_hydration(batch, hd);
1072 struct batch_info batch = {
1104 current_volume += batch.nr_batched_regions;
1109 offset = __start_next_hydration(clone, offset, &batch);
1112 if (batch.head)
1113 hydration_copy(batch.head, batch.nr_batched_regions);