| /linux/include/linux/ |
| H A D | pagevec.h | |
| H A D | pagemap.h | 991 pgoff_t end, struct folio_batch *fbatch); 993 pgoff_t *start, pgoff_t end, struct folio_batch *fbatch); 995 pgoff_t end, xa_mark_t tag, struct folio_batch *fbatch); 997 pgoff_t *start, pgoff_t end, struct folio_batch *fbatch); 1293 struct folio_batch *fbatch);
|
| H A D | writeback.h | 75 struct folio_batch fbatch; member
|
| /linux/mm/ |
| H A D | swap.c | 158 static void folio_batch_move_lru(struct folio_batch *fbatch, move_fn_t move_fn) in folio_batch_move_lru() argument 164 for (i = 0; i < folio_batch_count(fbatch); i++) { in folio_batch_move_lru() 165 struct folio *folio = fbatch->folios[i]; in folio_batch_move_lru() 179 folios_put(fbatch); in folio_batch_move_lru() 182 static void __folio_batch_add_and_move(struct folio_batch __percpu *fbatch, in __folio_batch_add_and_move() argument 194 if (!folio_batch_add(this_cpu_ptr(fbatch), folio) || in __folio_batch_add_and_move() 196 folio_batch_move_lru(this_cpu_ptr(fbatch), move_fn); in __folio_batch_add_and_move() 327 struct folio_batch *fbatch = &per_cpu(cpu_fbatches.lru_activate, cpu); in folio_activate_drain() 329 if (folio_batch_count(fbatch)) in folio_activate() 330 folio_batch_move_lru(fbatch, lru_activat in folio_activate() 323 struct folio_batch *fbatch = &per_cpu(cpu_fbatches.lru_activate, cpu); folio_activate_drain() local 359 struct folio_batch *fbatch; __lru_cache_activate_folio() local 645 struct folio_batch *fbatch = &fbatches->lru_add; lru_add_drain_cpu() local 1020 struct folio_batch fbatch; release_pages() local 1056 __folio_batch_release(struct folio_batch * fbatch) __folio_batch_release() argument 1075 folio_batch_remove_exceptionals(struct folio_batch * fbatch) folio_batch_remove_exceptionals() argument [all...] |
| H A D | truncate.c | 61 struct folio_batch *fbatch, pgoff_t *indices) in truncate_folio_batch_exceptionals() argument 64 int nr = folio_batch_count(fbatch); in truncate_folio_batch_exceptionals() 73 if (xa_is_value(fbatch->folios[j])) in truncate_folio_batch_exceptionals() 81 if (xa_is_value(fbatch->folios[i])) { in truncate_folio_batch_exceptionals() 117 folio_batch_remove_exceptionals(fbatch); in truncate_folio_batch_exceptionals() 371 struct folio_batch fbatch; in truncate_inode_pages_range() local 398 folio_batch_init(&fbatch); in truncate_inode_pages_range() 401 &fbatch, indices)) { in truncate_inode_pages_range() 402 truncate_folio_batch_exceptionals(mapping, &fbatch, indices); in truncate_inode_pages_range() 403 for (i = 0; i < folio_batch_count(&fbatch); in truncate_inode_pages_range() 538 struct folio_batch fbatch; mapping_try_invalidate() local 676 struct folio_batch fbatch; invalidate_inode_pages2_range() local [all...] |
| H A D | mlock.c | 33 struct folio_batch fbatch; member 186 static void mlock_folio_batch(struct folio_batch *fbatch) in mlock_folio_batch() argument 193 for (i = 0; i < folio_batch_count(fbatch); i++) { in mlock_folio_batch() 194 folio = fbatch->folios[i]; in mlock_folio_batch() 197 fbatch->folios[i] = folio; in mlock_folio_batch() 209 folios_put(fbatch); in mlock_folio_batch() 214 struct folio_batch *fbatch; in mlock_drain_local() local 217 fbatch = this_cpu_ptr(&mlock_fbatch.fbatch); in mlock_drain_local() 218 if (folio_batch_count(fbatch)) in mlock_drain_local() 225 struct folio_batch *fbatch; mlock_drain_remote() local 244 struct folio_batch *fbatch; mlock_folio() local 269 struct folio_batch *fbatch; mlock_new_folio() local 292 struct folio_batch *fbatch; munlock_folio() local [all...] |
| H A D | filemap.c | 270 * @fbatch: batch of folios to delete 273 * @fbatch from the mapping. The function expects @fbatch to be sorted 275 * It tolerates holes in @fbatch (mapping entries at those indices are not 281 struct folio_batch *fbatch) in page_cache_delete_batch() 283 XA_STATE(xas, &mapping->i_pages, fbatch->folios[0]->index); in page_cache_delete_batch() 290 if (i >= folio_batch_count(fbatch)) in page_cache_delete_batch() 303 if (folio != fbatch->folios[i]) { in page_cache_delete_batch() 305 fbatch->folios[i]->index, folio); in page_cache_delete_batch() 322 struct folio_batch *fbatch) in delete_from_page_cache_batch() 280 page_cache_delete_batch(struct address_space * mapping,struct folio_batch * fbatch) page_cache_delete_batch() argument 321 delete_from_page_cache_batch(struct address_space * mapping,struct folio_batch * fbatch) delete_from_page_cache_batch() argument 515 struct folio_batch fbatch; __filemap_fdatawait_range() local 2116 find_get_entries(struct address_space * mapping,pgoff_t * start,pgoff_t end,struct folio_batch * fbatch,pgoff_t * indices) find_get_entries() argument 2165 find_lock_entries(struct address_space * mapping,pgoff_t * start,pgoff_t end,struct folio_batch * fbatch,pgoff_t * indices) find_lock_entries() argument 2233 filemap_get_folios(struct address_space * mapping,pgoff_t * start,pgoff_t end,struct folio_batch * fbatch) filemap_get_folios() argument 2255 filemap_get_folios_contig(struct address_space * mapping,pgoff_t * start,pgoff_t end,struct folio_batch * fbatch) filemap_get_folios_contig() argument 2331 filemap_get_folios_tag(struct address_space * mapping,pgoff_t * start,pgoff_t end,xa_mark_t tag,struct folio_batch * fbatch) filemap_get_folios_tag() argument 2386 filemap_get_folios_dirty(struct address_space * mapping,pgoff_t * start,pgoff_t end,struct folio_batch * fbatch) filemap_get_folios_dirty() argument 2456 filemap_get_read_batch(struct address_space * mapping,pgoff_t index,pgoff_t max,struct folio_batch * fbatch) filemap_get_read_batch() argument 2600 filemap_create_folio(struct kiocb * iocb,struct folio_batch * fbatch) filemap_create_folio() argument 2668 filemap_get_pages(struct kiocb * iocb,size_t count,struct folio_batch * fbatch,bool need_uptodate) filemap_get_pages() argument 2775 struct folio_batch fbatch; filemap_read() local 3057 struct folio_batch fbatch; filemap_splice_read() local [all...] |
| H A D | shmem.c | 1061 struct folio_batch fbatch; in shmem_unlock_mapping() local 1064 folio_batch_init(&fbatch); in shmem_unlock_mapping() 1069 filemap_get_folios(mapping, &index, ~0UL, &fbatch)) { in shmem_unlock_mapping() 1070 check_move_unevictable_folios(&fbatch); in shmem_unlock_mapping() 1071 folio_batch_release(&fbatch); in shmem_unlock_mapping() 1115 struct folio_batch fbatch; in shmem_undo_range() local 1129 folio_batch_init(&fbatch); in shmem_undo_range() 1132 &fbatch, indices)) { in shmem_undo_range() 1133 for (i = 0; i < folio_batch_count(&fbatch); i++) { in shmem_undo_range() 1134 folio = fbatch in shmem_undo_range() 1439 shmem_find_swap_entries(struct address_space * mapping,pgoff_t start,struct folio_batch * fbatch,pgoff_t * indices,unsigned int type) shmem_find_swap_entries() argument 1481 shmem_unuse_swap_entries(struct inode * inode,struct folio_batch * fbatch,pgoff_t * indices) shmem_unuse_swap_entries() argument 1512 struct folio_batch fbatch; shmem_unuse_inode() local [all...] |
| H A D | page-writeback.c | 2428 folio = folio_batch_next(&wbc->fbatch); in writeback_get_folio() 2430 folio_batch_release(&wbc->fbatch); in writeback_get_folio() 2433 wbc_to_tag(wbc), &wbc->fbatch); in writeback_get_folio() 2434 folio = folio_batch_next(&wbc->fbatch); in writeback_get_folio() 2479 folio_batch_init(&wbc->fbatch); in writeback_iter() 2559 folio_batch_release(&wbc->fbatch); in writeback_iter()
|
| H A D | gup.c | 3444 struct folio_batch fbatch; 3475 folio_batch_init(&fbatch); in memfd_pin_folios() 3486 &fbatch); in memfd_pin_folios() 3493 folio = fbatch.folios[i]; in memfd_pin_folios() 3496 folio_batch_release(&fbatch); in memfd_pin_folios() 3510 folio_batch_release(&fbatch); in memfd_pin_folios() 3455 struct folio_batch fbatch; memfd_pin_folios() local
|
| /linux/fs/nilfs2/ |
| H A D | page.c | 246 struct folio_batch fbatch; in nilfs_copy_dirty_pages() local 251 folio_batch_init(&fbatch); in nilfs_copy_dirty_pages() 254 PAGECACHE_TAG_DIRTY, &fbatch)) in nilfs_copy_dirty_pages() 257 for (i = 0; i < folio_batch_count(&fbatch); i++) { in nilfs_copy_dirty_pages() 258 struct folio *folio = fbatch.folios[i], *dfolio; in nilfs_copy_dirty_pages() 282 folio_batch_release(&fbatch); in nilfs_copy_dirty_pages() 301 struct folio_batch fbatch; in nilfs_copy_back_pages() local 305 folio_batch_init(&fbatch); in nilfs_copy_back_pages() 307 n = filemap_get_folios(smap, &start, ~0UL, &fbatch); in nilfs_copy_back_pages() 311 for (i = 0; i < folio_batch_count(&fbatch); in nilfs_copy_back_pages() 363 struct folio_batch fbatch; nilfs_clear_dirty_pages() local 513 struct folio_batch fbatch; nilfs_find_uncommitted_extent() local [all...] |
| H A D | segment.c | 704 struct folio_batch fbatch; in nilfs_lookup_dirty_data_buffers() local 718 folio_batch_init(&fbatch); in nilfs_lookup_dirty_data_buffers() 722 PAGECACHE_TAG_DIRTY, &fbatch)) in nilfs_lookup_dirty_data_buffers() 725 for (i = 0; i < folio_batch_count(&fbatch); i++) { in nilfs_lookup_dirty_data_buffers() 727 struct folio *folio = fbatch.folios[i]; in nilfs_lookup_dirty_data_buffers() 749 folio_batch_release(&fbatch); in nilfs_lookup_dirty_data_buffers() 757 folio_batch_release(&fbatch); in nilfs_lookup_dirty_data_buffers() 767 struct folio_batch fbatch; in nilfs_lookup_dirty_node_buffers() local 774 folio_batch_init(&fbatch); in nilfs_lookup_dirty_node_buffers() 777 (pgoff_t)-1, PAGECACHE_TAG_DIRTY, &fbatch)) { in nilfs_lookup_dirty_node_buffers() [all...] |
| /linux/fs/ramfs/ |
| H A D | file-nommu.c | 208 struct folio_batch fbatch; in ramfs_nommu_get_unmapped_area() local 224 folio_batch_init(&fbatch); in ramfs_nommu_get_unmapped_area() 228 ULONG_MAX, &fbatch); in ramfs_nommu_get_unmapped_area() 235 ret = (unsigned long) folio_address(fbatch.folios[0]); in ramfs_nommu_get_unmapped_area() 236 pfn = folio_pfn(fbatch.folios[0]); in ramfs_nommu_get_unmapped_area() 240 if (pfn + nr_pages != folio_pfn(fbatch.folios[loop])) { in ramfs_nommu_get_unmapped_area() 244 nr_pages += folio_nr_pages(fbatch.folios[loop]); in ramfs_nommu_get_unmapped_area() 250 folio_batch_release(&fbatch); in ramfs_nommu_get_unmapped_area() 256 folio_batch_release(&fbatch); in ramfs_nommu_get_unmapped_area()
|
| /linux/fs/netfs/ |
| H A D | rolling_buffer.c | 199 struct folio_batch fbatch; in rolling_buffer_clear() local 202 folio_batch_init(&fbatch); in rolling_buffer_clear() 213 if (!folio_batch_add(&fbatch, folio)) in rolling_buffer_clear() 214 folio_batch_release(&fbatch); in rolling_buffer_clear() 221 folio_batch_release(&fbatch); in rolling_buffer_clear()
|
| H A D | misc.c | 81 struct folio_batch fbatch; in netfs_free_folioq_buffer() local 83 folio_batch_init(&fbatch); in netfs_free_folioq_buffer() 94 if (folio_batch_add(&fbatch, folio)) in netfs_free_folioq_buffer() 95 folio_batch_release(&fbatch); in netfs_free_folioq_buffer() 103 folio_batch_release(&fbatch); in netfs_free_folioq_buffer()
|
| /linux/drivers/gpu/drm/i915/gem/ |
| H A D | i915_gem_shmem.c | 27 static void check_release_folio_batch(struct folio_batch *fbatch) in check_release_folio_batch() argument 29 check_move_unevictable_folios(fbatch); in check_release_folio_batch() 30 __folio_batch_release(fbatch); in check_release_folio_batch() 38 struct folio_batch fbatch; in shmem_sg_free_table() local 44 folio_batch_init(&fbatch); in shmem_sg_free_table() 56 if (!folio_batch_add(&fbatch, folio)) in shmem_sg_free_table() 57 check_release_folio_batch(&fbatch); in shmem_sg_free_table() 59 if (fbatch.nr) in shmem_sg_free_table() 60 check_release_folio_batch(&fbatch); in shmem_sg_free_table()
|
| /linux/drivers/gpu/drm/ |
| H A D | drm_gem.c | 633 static void drm_gem_check_release_batch(struct folio_batch *fbatch) in drm_gem_check_release_batch() argument 635 check_move_unevictable_folios(fbatch); in drm_gem_check_release_batch() 636 __folio_batch_release(fbatch); in drm_gem_check_release_batch() 670 struct folio_batch fbatch; in drm_gem_get_pages() local 717 folio_batch_init(&fbatch); in drm_gem_get_pages() 721 if (!folio_batch_add(&fbatch, f)) in drm_gem_get_pages() 722 drm_gem_check_release_batch(&fbatch); in drm_gem_get_pages() 725 if (fbatch.nr) in drm_gem_get_pages() 726 drm_gem_check_release_batch(&fbatch); in drm_gem_get_pages() 745 struct folio_batch fbatch; in drm_gem_put_pages() local [all...] |
| /linux/fs/ceph/ |
| H A D | addr.c | 609 struct folio_batch fbatch; member 1015 folio_batch_init(&ceph_wbc->fbatch); in ceph_folio_batch_init() 1022 folio_batch_release(&ceph_wbc->fbatch); in ceph_folio_batch_reinit() 1297 folio = ceph_wbc->fbatch.folios[i]; in ceph_process_folio_batch() 1325 ceph_wbc->fbatch.folios[i] = NULL; in ceph_process_folio_batch() 1335 ceph_wbc->fbatch.folios[i] = NULL; in ceph_process_folio_batch() 1359 /* note position of first page in fbatch */ in ceph_process_folio_batch() 1373 ceph_wbc->fbatch.folios[i] = NULL; in ceph_process_folio_batch() 1381 void ceph_shift_unused_folios_left(struct folio_batch *fbatch) in ceph_shift_unused_folios_left() argument 1385 /* shift unused page to beginning of fbatch */ in ceph_shift_unused_folios_left() [all...] |
| /linux/fs/iomap/ |
| H A D | iter.c | 12 folio_batch_release(iter->fbatch); in iomap_iter_reset_iomap() 13 folio_batch_reinit(iter->fbatch); in iomap_iter_reset_iomap()
|
| H A D | buffered-io.c | 872 struct folio *folio = folio_batch_next(iter->fbatch); in __iomap_get_folio() 1608 if (!iter->fbatch) { in iomap_fill_dirty_folios() 1613 count = filemap_get_folios_dirty(mapping, &pstart, pend, iter->fbatch); in iomap_fill_dirty_folios() 1625 struct folio_batch fbatch; in iomap_zero_range() local 1632 .fbatch = &fbatch, in iomap_zero_range() 1638 folio_batch_init(&fbatch); in iomap_zero_range()
|
| /linux/drivers/gpu/drm/i915/ |
| H A D | i915_gpu_error.c | 191 static void pool_fini(struct folio_batch *fbatch) in pool_fini() argument 193 folio_batch_release(fbatch); in pool_fini() 196 static int pool_refill(struct folio_batch *fbatch, gfp_t gfp) in pool_refill() argument 198 while (folio_batch_space(fbatch)) { in pool_refill() 205 folio_batch_add(fbatch, folio); in pool_refill() 211 static int pool_init(struct folio_batch *fbatch, gfp_t gfp) in pool_init() argument 215 folio_batch_init(fbatch); in pool_init() 217 err = pool_refill(fbatch, gfp); in pool_init() 219 pool_fini(fbatch); in pool_init() 224 static void *pool_alloc(struct folio_batch *fbatch, gfp_ argument 235 pool_free(struct folio_batch * fbatch,void * addr) pool_free() argument [all...] |
| /linux/fs/btrfs/ |
| H A D | extent_io.c | 273 struct folio_batch fbatch; in __process_folios_contig() 276 folio_batch_init(&fbatch); in __process_folios_contig() 281 end_index, &fbatch); in __process_folios_contig() 283 struct folio *folio = fbatch.folios[i]; in __process_folios_contig() 288 folio_batch_release(&fbatch); in __process_folios_contig() 312 struct folio_batch fbatch; in lock_delalloc_folios() 314 folio_batch_init(&fbatch); in lock_delalloc_folios() 319 end_index, &fbatch); in lock_delalloc_folios() 324 struct folio *folio = fbatch.folios[i]; in lock_delalloc_folios() 342 folio_batch_release(&fbatch); in lock_delalloc_folios() 272 struct folio_batch fbatch; __process_folios_contig() local 311 struct folio_batch fbatch; lock_delalloc_folios() local 2463 struct folio_batch fbatch; extent_write_cache_pages() local [all...] |
| H A D | compression.c | 256 struct folio_batch fbatch; in end_compressed_writeback() local 264 folio_batch_init(&fbatch); in end_compressed_writeback() 267 &fbatch); in end_compressed_writeback() 273 struct folio *folio = fbatch.folios[i]; in end_compressed_writeback() 278 folio_batch_release(&fbatch); in end_compressed_writeback()
|
| /linux/fs/hugetlbfs/ |
| H A D | inode.c | 577 struct folio_batch fbatch; in remove_inode_hugepages() 582 folio_batch_init(&fbatch); in remove_inode_hugepages() 584 while (filemap_get_folios(mapping, &next, end - 1, &fbatch)) { in remove_inode_hugepages() 585 for (i = 0; i < folio_batch_count(&fbatch); ++i) { in remove_inode_hugepages() 586 struct folio *folio = fbatch.folios[i]; in remove_inode_hugepages() 602 folio_batch_release(&fbatch); in remove_inode_hugepages() 583 struct folio_batch fbatch; remove_inode_hugepages() local
|
| /linux/fs/ext4/ |
| H A D | inode.c | 1719 struct folio_batch fbatch; in mpage_release_unused_pages() 1742 folio_batch_init(&fbatch); in mpage_release_unused_pages() 1746 nr = filemap_get_folios(mapping, &index, end - 1, &fbatch); in mpage_release_unused_pages() 1750 struct folio *folio = fbatch.folios[i]; in mpage_release_unused_pages() 1781 folio_batch_release(&fbatch); in ext4_print_free_blocks() 2314 struct folio_batch fbatch; in mpage_map_and_submit_buffers() 2327 folio_batch_init(&fbatch); in mpage_map_and_submit_buffers() 2329 nr = filemap_get_folios(inode->i_mapping, &start, end, &fbatch); in mpage_map_and_submit_buffers() 2333 struct folio *folio = fbatch.folios[i]; in mpage_map_and_submit_buffers() 2351 folio_batch_release(&fbatch); in mpage_map_one_extent() 1720 struct folio_batch fbatch; mpage_release_unused_pages() local 2301 struct folio_batch fbatch; mpage_map_and_submit_buffers() local 2619 struct folio_batch fbatch; mpage_prepare_extent_to_map() local [all...] |