Lines Matching refs:fbatch

52 	struct folio_batch fbatch;  member
232 static void folio_batch_move_lru(struct folio_batch *fbatch, move_fn_t move_fn) in folio_batch_move_lru() argument
238 for (i = 0; i < folio_batch_count(fbatch); i++) { in folio_batch_move_lru()
239 struct folio *folio = fbatch->folios[i]; in folio_batch_move_lru()
253 folios_put(fbatch->folios, folio_batch_count(fbatch)); in folio_batch_move_lru()
254 folio_batch_init(fbatch); in folio_batch_move_lru()
257 static void folio_batch_add_and_move(struct folio_batch *fbatch, in folio_batch_add_and_move() argument
260 if (folio_batch_add(fbatch, folio) && !folio_test_large(folio) && in folio_batch_add_and_move()
263 folio_batch_move_lru(fbatch, move_fn); in folio_batch_add_and_move()
287 struct folio_batch *fbatch; in folio_rotate_reclaimable() local
292 fbatch = this_cpu_ptr(&lru_rotate.fbatch); in folio_rotate_reclaimable()
293 folio_batch_add_and_move(fbatch, folio, lru_move_tail_fn); in folio_rotate_reclaimable()
363 struct folio_batch *fbatch = &per_cpu(cpu_fbatches.activate, cpu); in folio_activate_drain() local
365 if (folio_batch_count(fbatch)) in folio_activate_drain()
366 folio_batch_move_lru(fbatch, folio_activate_fn); in folio_activate_drain()
373 struct folio_batch *fbatch; in folio_activate() local
377 fbatch = this_cpu_ptr(&cpu_fbatches.activate); in folio_activate()
378 folio_batch_add_and_move(fbatch, folio, folio_activate_fn); in folio_activate()
403 struct folio_batch *fbatch; in __lru_cache_activate_folio() local
407 fbatch = this_cpu_ptr(&cpu_fbatches.lru_add); in __lru_cache_activate_folio()
419 for (i = folio_batch_count(fbatch) - 1; i >= 0; i--) { in __lru_cache_activate_folio()
420 struct folio *batch_folio = fbatch->folios[i]; in __lru_cache_activate_folio()
520 struct folio_batch *fbatch; in folio_add_lru() local
533 fbatch = this_cpu_ptr(&cpu_fbatches.lru_add); in folio_add_lru()
534 folio_batch_add_and_move(fbatch, folio, lru_add_fn); in folio_add_lru()
666 struct folio_batch *fbatch = &fbatches->lru_add; in lru_add_drain_cpu() local
668 if (folio_batch_count(fbatch)) in lru_add_drain_cpu()
669 folio_batch_move_lru(fbatch, lru_add_fn); in lru_add_drain_cpu()
671 fbatch = &per_cpu(lru_rotate.fbatch, cpu); in lru_add_drain_cpu()
673 if (data_race(folio_batch_count(fbatch))) { in lru_add_drain_cpu()
678 folio_batch_move_lru(fbatch, lru_move_tail_fn); in lru_add_drain_cpu()
682 fbatch = &fbatches->lru_deactivate_file; in lru_add_drain_cpu()
683 if (folio_batch_count(fbatch)) in lru_add_drain_cpu()
684 folio_batch_move_lru(fbatch, lru_deactivate_file_fn); in lru_add_drain_cpu()
686 fbatch = &fbatches->lru_deactivate; in lru_add_drain_cpu()
687 if (folio_batch_count(fbatch)) in lru_add_drain_cpu()
688 folio_batch_move_lru(fbatch, lru_deactivate_fn); in lru_add_drain_cpu()
690 fbatch = &fbatches->lru_lazyfree; in lru_add_drain_cpu()
691 if (folio_batch_count(fbatch)) in lru_add_drain_cpu()
692 folio_batch_move_lru(fbatch, lru_lazyfree_fn); in lru_add_drain_cpu()
709 struct folio_batch *fbatch; in deactivate_file_folio() local
717 fbatch = this_cpu_ptr(&cpu_fbatches.lru_deactivate_file); in deactivate_file_folio()
718 folio_batch_add_and_move(fbatch, folio, lru_deactivate_file_fn); in deactivate_file_folio()
736 struct folio_batch *fbatch; in deactivate_page() local
740 fbatch = this_cpu_ptr(&cpu_fbatches.lru_deactivate); in deactivate_page()
741 folio_batch_add_and_move(fbatch, folio, lru_deactivate_fn); in deactivate_page()
760 struct folio_batch *fbatch; in mark_page_lazyfree() local
764 fbatch = this_cpu_ptr(&cpu_fbatches.lru_lazyfree); in mark_page_lazyfree()
765 folio_batch_add_and_move(fbatch, folio, lru_lazyfree_fn); in mark_page_lazyfree()
817 data_race(folio_batch_count(&per_cpu(lru_rotate.fbatch, cpu))) || in cpu_needs_drain()
1089 void folio_batch_remove_exceptionals(struct folio_batch *fbatch) in folio_batch_remove_exceptionals() argument
1093 for (i = 0, j = 0; i < folio_batch_count(fbatch); i++) { in folio_batch_remove_exceptionals()
1094 struct folio *folio = fbatch->folios[i]; in folio_batch_remove_exceptionals()
1096 fbatch->folios[j++] = folio; in folio_batch_remove_exceptionals()
1098 fbatch->nr = j; in folio_batch_remove_exceptionals()