• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/contrib/openzfs/module/os/linux/zfs/

Lines Matching refs:page

115 	 * contiguous multi-page chunks, a single chunk is optimal.
145 * Scatter ABD's use at least one page each, so sub-page allocations waste
147 * half of each page). Using linear ABD's for small allocations means that
153 * possible for them to actually waste more memory than scatter (one page per
166 * just a single zero'd page. This allows us to conserve memory by
167 * only using a single zero page for the scatterlist.
171 struct page;
176 static struct page *abd_zero_page = NULL;
216 abd_mark_zfs_page(struct page *page)
218 get_page(page);
219 SetPagePrivate(page);
220 set_page_private(page, ABD_FILE_CACHE_PAGE);
224 abd_unmark_zfs_page(struct page *page)
226 set_page_private(page, 0UL);
227 ClearPagePrivate(page);
228 put_page(page);
231 #define abd_mark_zfs_page(page)
232 #define abd_unmark_zfs_page(page)
254 struct page *page, *tmp_page = NULL;
273 page = alloc_pages_node(nid, order ? gfp_comp : gfp, order);
274 if (page == NULL) {
284 list_add_tail(&page->lru, &pages);
286 if ((nid != NUMA_NO_NODE) && (page_to_nid(page) != nid))
289 nid = page_to_nid(page);
304 list_for_each_entry_safe(page, tmp_page, &pages, lru) {
305 size_t sg_size = MIN(PAGESIZE << compound_order(page),
307 sg_set_page(sg, page, sg_size, 0);
308 abd_mark_zfs_page(page);
312 list_del(&page->lru);
325 * as a linear buffer. All single-page (4K) ABD's can be
326 * represented this way. Some multi-page ABD's can also be
328 * "chunk" (higher-order "page" which represents a power-of-2
330 * case for 2-page (8K) ABD's.
373 struct page *page;
388 while ((page = __page_cache_alloc(gfp)) == NULL) {
394 sg_set_page(sg, page, PAGESIZE, 0);
395 abd_mark_zfs_page(page);
423 struct page *page;
434 page = sg_page(sg);
435 abd_unmark_zfs_page(page);
436 order = compound_order(page);
437 __free_pages(page, order);
445 * Allocate scatter ABD of size SPA_MAXBLOCKSIZE, where each page in
498 ((struct page *)((void *)(pg) + (i) * PAGESIZE))
501 struct page *page;
529 sg_set_page(struct scatterlist *sg, struct page *page, unsigned int len,
534 sg->page = page;
538 static inline struct page *
541 return (sg->page);
565 struct page *p = umem_alloc_aligned(PAGESIZE, 64, KM_SLEEP);
579 struct page *p = nth_page(sg_page(sg), j >> PAGE_SHIFT);
954 struct page *page;
967 page = vmalloc_to_page(buf_ptr);
969 page = virt_to_page(buf_ptr);
973 * doesn't behave well when using 0-count page, this is a
976 ASSERT3S(page_count(page), >, 0);
978 if (bio_add_page(bio, page, size, offset) != size)
1036 struct page *pg;