Lines Matching defs:fbatch

158 static void folio_batch_move_lru(struct folio_batch *fbatch, move_fn_t move_fn)
164 for (i = 0; i < folio_batch_count(fbatch); i++) {
165 struct folio *folio = fbatch->folios[i];
175 folios_put(fbatch);
178 static void __folio_batch_add_and_move(struct folio_batch __percpu *fbatch,
194 if (!folio_batch_add(this_cpu_ptr(fbatch), folio) || folio_test_large(folio) ||
196 folio_batch_move_lru(this_cpu_ptr(fbatch), move_fn);
323 struct folio_batch *fbatch = &per_cpu(cpu_fbatches.lru_activate, cpu);
325 if (folio_batch_count(fbatch))
326 folio_batch_move_lru(fbatch, lru_activate);
358 struct folio_batch *fbatch;
362 fbatch = this_cpu_ptr(&cpu_fbatches.lru_add);
374 for (i = folio_batch_count(fbatch) - 1; i >= 0; i--) {
375 struct folio *batch_folio = fbatch->folios[i];
644 struct folio_batch *fbatch = &fbatches->lru_add;
646 if (folio_batch_count(fbatch))
647 folio_batch_move_lru(fbatch, lru_add);
649 fbatch = &fbatches->lru_move_tail;
651 if (data_race(folio_batch_count(fbatch))) {
656 folio_batch_move_lru(fbatch, lru_move_tail);
660 fbatch = &fbatches->lru_deactivate_file;
661 if (folio_batch_count(fbatch))
662 folio_batch_move_lru(fbatch, lru_deactivate_file);
664 fbatch = &fbatches->lru_deactivate;
665 if (folio_batch_count(fbatch))
666 folio_batch_move_lru(fbatch, lru_deactivate);
668 fbatch = &fbatches->lru_lazyfree;
669 if (folio_batch_count(fbatch))
670 folio_batch_move_lru(fbatch, lru_lazyfree);
1015 struct folio_batch fbatch;
1020 folio_batch_init(&fbatch);
1026 refs[fbatch.nr] = 1;
1029 refs[fbatch.nr] = encoded_nr_pages(encoded[++i]);
1031 if (folio_batch_add(&fbatch, folio) > 0)
1033 folios_put_refs(&fbatch, refs);
1036 if (fbatch.nr)
1037 folios_put_refs(&fbatch, refs);
1051 void __folio_batch_release(struct folio_batch *fbatch)
1053 if (!fbatch->percpu_pvec_drained) {
1055 fbatch->percpu_pvec_drained = true;
1057 folios_put(fbatch);
1063 * @fbatch: The batch to prune
1066 * entries. This function prunes all the non-folio entries from @fbatch
1070 void folio_batch_remove_exceptionals(struct folio_batch *fbatch)
1074 for (i = 0, j = 0; i < folio_batch_count(fbatch); i++) {
1075 struct folio *folio = fbatch->folios[i];
1077 fbatch->folios[j++] = folio;
1079 fbatch->nr = j;