Home
last modified time | relevance | path

Searched refs:nr_pages (Results 1 – 25 of 401) sorted by relevance

12345678910>>...17

/linux/io_uring/
A Dmemmap.c32 for (i = 0; i < nr_pages; i++) in io_mem_alloc_compound()
44 for (i = 0; i < nr_pages; i++) { in io_mem_alloc_single()
64 int nr_pages; in io_pages_map() local
80 *npages = nr_pages; in io_pages_map()
140 nr_pages = end - start; in io_pin_pages()
141 if (WARN_ON_ONCE(!nr_pages)) in io_pin_pages()
151 if (ret == nr_pages) { in io_pin_pages()
152 *npages = nr_pages; in io_pin_pages()
171 unsigned int nr_pages; in __io_uaddr_map() local
179 nr_pages = 0; in __io_uaddr_map()
[all …]
/linux/include/linux/
A Dhugetlb_cgroup.h127 extern int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages,
131 extern void hugetlb_cgroup_commit_charge(int idx, unsigned long nr_pages,
137 extern void hugetlb_cgroup_uncharge_folio(int idx, unsigned long nr_pages,
142 extern void hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages,
152 unsigned long nr_pages,
162 unsigned long nr_pages, in hugetlb_cgroup_uncharge_file_region() argument
214 unsigned long nr_pages, in hugetlb_cgroup_charge_cgroup_rsvd() argument
227 hugetlb_cgroup_commit_charge_rsvd(int idx, unsigned long nr_pages, in hugetlb_cgroup_commit_charge_rsvd() argument
239 unsigned long nr_pages, in hugetlb_cgroup_uncharge_folio_rsvd() argument
244 unsigned long nr_pages, in hugetlb_cgroup_uncharge_cgroup() argument
[all …]
A Dpage_counter.h68 void page_counter_cancel(struct page_counter *counter, unsigned long nr_pages);
69 void page_counter_charge(struct page_counter *counter, unsigned long nr_pages);
71 unsigned long nr_pages,
73 void page_counter_uncharge(struct page_counter *counter, unsigned long nr_pages);
74 void page_counter_set_min(struct page_counter *counter, unsigned long nr_pages);
75 void page_counter_set_low(struct page_counter *counter, unsigned long nr_pages);
78 unsigned long nr_pages) in page_counter_set_high() argument
80 WRITE_ONCE(counter->high, nr_pages); in page_counter_set_high()
83 int page_counter_set_max(struct page_counter *counter, unsigned long nr_pages);
85 unsigned long *nr_pages);
A Dmemory_hotplug.h123 long nr_pages);
128 extern int online_pages(unsigned long pfn, unsigned long nr_pages,
157 extern void __remove_pages(unsigned long start_pfn, unsigned long nr_pages,
166 unsigned long nr_pages, struct mhp_params *params) in add_pages() argument
168 return __add_pages(nid, start_pfn, nr_pages, params); in add_pages()
171 int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
282 extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages,
315 unsigned long nr_pages,
319 unsigned long nr_pages);
321 unsigned long nr_pages, struct vmem_altmap *altmap,
[all …]
A Drmap.h198 struct page *page, int nr_pages, enum rmap_level level) in __folio_rmap_sanity_checks() argument
215 VM_WARN_ON_ONCE(nr_pages <= 0); in __folio_rmap_sanity_checks()
229 VM_WARN_ON_FOLIO(nr_pages != HPAGE_PMD_NR, folio); in __folio_rmap_sanity_checks()
327 const int orig_nr_pages = nr_pages; in __folio_dup_file_rmap()
340 } while (page++, --nr_pages > 0); in __folio_dup_file_rmap()
361 struct page *page, int nr_pages) in folio_dup_file_rmap_ptes() argument
395 const int orig_nr_pages = nr_pages; in __folio_try_dup_anon_rmap()
420 for (i = 0; i < nr_pages; i++) in __folio_try_dup_anon_rmap()
436 } while (page++, --nr_pages > 0); in __folio_try_dup_anon_rmap()
677 unsigned long nr_pages; member
[all …]
/linux/mm/
A Dmemory_hotplug.c69 return nr_pages; in memory_block_memmap_on_memory_pages()
700 unsigned long nr_pages) in resize_zone_range() argument
883 movable_pages += nr_pages; in auto_movable_can_online_movable()
893 unsigned long nr_pages) in default_kernel_zone_for_pfn() argument
977 max_pages = nr_pages; in auto_movable_zone_for_pfn()
1020 unsigned long nr_pages) in default_zone_for_pfn() argument
1023 nr_pages); in default_zone_for_pfn()
1045 unsigned long nr_pages) in zone_for_pfn_range() argument
1064 long nr_pages) in adjust_present_page_count() argument
1171 arg.nr_pages = nr_pages; in online_pages()
[all …]
A Dpage_counter.c61 new, nr_pages)) { in page_counter_cancel()
119 unsigned long nr_pages, in page_counter_try_charge() argument
143 atomic_long_sub(nr_pages, &c->usage); in page_counter_try_charge()
167 page_counter_cancel(c, nr_pages); in page_counter_try_charge()
182 page_counter_cancel(c, nr_pages); in page_counter_uncharge()
214 if (usage > nr_pages) in page_counter_set_max()
217 old = xchg(&counter->max, nr_pages); in page_counter_set_max()
238 WRITE_ONCE(counter->min, nr_pages); in page_counter_set_min()
255 WRITE_ONCE(counter->low, nr_pages); in page_counter_set_low()
271 unsigned long *nr_pages) in page_counter_memparse() argument
[all …]
A Dpercpu-km.c55 const int nr_pages = pcpu_group_sizes[0] >> PAGE_SHIFT; in pcpu_create_chunk() local
65 pages = alloc_pages(gfp, order_base_2(nr_pages)); in pcpu_create_chunk()
71 for (i = 0; i < nr_pages; i++) in pcpu_create_chunk()
78 pcpu_chunk_populated(chunk, 0, nr_pages); in pcpu_create_chunk()
89 const int nr_pages = pcpu_group_sizes[0] >> PAGE_SHIFT; in pcpu_destroy_chunk() local
98 __free_pages(chunk->data, order_base_2(nr_pages)); in pcpu_destroy_chunk()
109 size_t nr_pages, alloc_pages; in pcpu_verify_alloc_info() local
117 nr_pages = (ai->groups[0].nr_units * ai->unit_size) >> PAGE_SHIFT; in pcpu_verify_alloc_info()
118 alloc_pages = roundup_pow_of_two(nr_pages); in pcpu_verify_alloc_info()
120 if (alloc_pages > nr_pages) in pcpu_verify_alloc_info()
[all …]
A Dsparse.c185 unsigned long nr_pages) in subsection_mask_set() argument
202 pfns = min(nr_pages, PAGES_PER_SECTION in subsection_map_init()
212 nr_pages -= pfns; in subsection_map_init()
665 subsection_mask_set(map, pfn, nr_pages); in clear_subsection_map()
671 pfn, nr_pages)) in clear_subsection_map()
691 subsection_mask_set(map, pfn, nr_pages); in fill_subsection_map()
723 unsigned long magic, nr_pages; in free_map_bootmem() local
729 for (i = 0; i < nr_pages; i++, page++) { in free_map_bootmem()
790 if (clear_subsection_map(pfn, nr_pages)) in section_deactivate()
847 rc = fill_subsection_map(pfn, nr_pages); in section_activate()
[all …]
A Dgup_test.c18 for (i = 0; i < nr_pages; i++) in put_back_pages()
25 unpin_user_pages(pages, nr_pages); in put_back_pages()
29 unpin_user_pages(pages, nr_pages); in put_back_pages()
31 for (i = 0; i < nr_pages; i++) in put_back_pages()
40 unsigned long nr_pages) in verify_dma_pinned() argument
49 for (i = 0; i < nr_pages; i++) { in verify_dma_pinned()
70 unsigned long nr_pages) in dump_pages_test() argument
114 nr_pages = gup->size / PAGE_SIZE; in __gup_test_ioctl()
177 nr_pages = i; in __gup_test_ioctl()
244 nr_pages = args.size / PAGE_SIZE; in pin_longterm_test_start()
[all …]
A Dhugetlb_cgroup.c200 unsigned int nr_pages; in hugetlb_cgroup_move_parent() local
215 nr_pages = compound_nr(page); in hugetlb_cgroup_move_parent()
286 nr_pages, &counter)) { in __hugetlb_cgroup_charge_cgroup()
332 usage + nr_pages); in __hugetlb_cgroup_commit_charge()
368 nr_pages); in __hugetlb_cgroup_uncharge_folio()
381 usage - nr_pages); in __hugetlb_cgroup_uncharge_folio()
406 nr_pages); in __hugetlb_cgroup_uncharge_cgroup()
438 unsigned long nr_pages, in hugetlb_cgroup_uncharge_file_region() argument
600 unsigned long nr_pages; in hugetlb_cgroup_write() local
613 nr_pages = round_down(nr_pages, pages_per_huge_page(&hstates[idx])); in hugetlb_cgroup_write()
[all …]
A Dmemcontrol-v1.h11 unsigned int nr_pages);
14 unsigned int nr_pages) in try_charge() argument
19 return try_charge_memcg(memcg, gfp_mask, nr_pages); in try_charge()
110 void memcg1_account_kmem(struct mem_cgroup *memcg, int nr_pages);
115 bool memcg1_charge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages,
117 static inline void memcg1_uncharge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages) in memcg1_uncharge_skmem() argument
119 page_counter_uncharge(&memcg->tcpmem, nr_pages); in memcg1_uncharge_skmem()
151 static inline void memcg1_account_kmem(struct mem_cgroup *memcg, int nr_pages) {} in memcg1_account_kmem() argument
153 static inline bool memcg1_charge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages, in memcg1_charge_skmem() argument
155 static inline void memcg1_uncharge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages) {} in memcg1_uncharge_skmem() argument
A Dmmu_gather.c60 unsigned int nr_pages = 1; in tlb_flush_rmap_batch() local
64 nr_pages = encoded_nr_pages(pages[++i]); in tlb_flush_rmap_batch()
66 folio_remove_rmap_ptes(page_folio(page), page, nr_pages, in tlb_flush_rmap_batch()
104 unsigned int nr, nr_pages; in __tlb_batch_free_encoded_pages() local
125 for (nr = 0, nr_pages = 0; in __tlb_batch_free_encoded_pages()
126 nr < batch->nr && nr_pages < MAX_NR_FOLIOS_PER_FREE; in __tlb_batch_free_encoded_pages()
130 nr_pages += encoded_nr_pages(pages[++nr]); in __tlb_batch_free_encoded_pages()
132 nr_pages++; in __tlb_batch_free_encoded_pages()
175 VM_WARN_ON_ONCE(nr_pages != 1 && page_size != PAGE_SIZE); in __tlb_remove_folio_pages_size()
184 if (likely(nr_pages == 1)) { in __tlb_remove_folio_pages_size()
[all …]
A Dcma.h47 void cma_sysfs_account_success_pages(struct cma *cma, unsigned long nr_pages);
48 void cma_sysfs_account_fail_pages(struct cma *cma, unsigned long nr_pages);
49 void cma_sysfs_account_release_pages(struct cma *cma, unsigned long nr_pages);
52 unsigned long nr_pages) {}; in cma_sysfs_account_success_pages() argument
54 unsigned long nr_pages) {}; in cma_sysfs_account_fail_pages() argument
56 unsigned long nr_pages) {}; in cma_sysfs_account_release_pages() argument
A Dprocess_vm_access.c83 unsigned long nr_pages; in process_vm_rw_single_vec() local
90 nr_pages = (addr + len - 1) / PAGE_SIZE - addr / PAGE_SIZE + 1; in process_vm_rw_single_vec()
95 while (!rc && nr_pages && iov_iter_count(iter)) { in process_vm_rw_single_vec()
96 int pinned_pages = min_t(unsigned long, nr_pages, PVM_MAX_USER_PAGES); in process_vm_rw_single_vec()
123 nr_pages -= pinned_pages; in process_vm_rw_single_vec()
162 unsigned long nr_pages = 0; in process_vm_rw_core() local
178 nr_pages = max(nr_pages, nr_pages_iov); in process_vm_rw_core()
182 if (nr_pages == 0) in process_vm_rw_core()
185 if (nr_pages > PVM_MAX_PP_ARRAY_COUNT) { in process_vm_rw_core()
189 sizeof(struct page *)*nr_pages), in process_vm_rw_core()
A Dmemcontrol.c161 if (nr_pages) in obj_cgroup_release()
1270 if (nr_pages < 0) in mem_cgroup_update_lru_size()
1281 if (nr_pages > 0) in mem_cgroup_update_lru_size()
1747 WRITE_ONCE(stock->nr_pages, stock_pages - nr_pages); in consume_stock()
1816 stock_pages = READ_ONCE(stock->nr_pages) + nr_pages; in __refill_stock()
2780 if (nr_pages) { in drain_obj_stock()
2877 if (nr_pages) in refill_obj_stock()
2916 nr_pages += 1; in obj_cgroup_charge()
4511 long nr_pages) in mem_cgroup_hugetlb_try_charge() argument
4631 long nr_pages; in uncharge_folio() local
[all …]
/linux/fs/iomap/
A Dswapfile.c33 unsigned long nr_pages; in iomap_swapfile_add_extent() local
40 if (unlikely(isi->nr_pages >= isi->sis->max)) in iomap_swapfile_add_extent()
42 max_pages = isi->sis->max - isi->nr_pages; in iomap_swapfile_add_extent()
55 nr_pages = next_ppage - first_ppage; in iomap_swapfile_add_extent()
56 nr_pages = min(nr_pages, max_pages); in iomap_swapfile_add_extent()
72 error = add_swap_extent(isi->sis, isi->nr_pages, nr_pages, first_ppage); in iomap_swapfile_add_extent()
76 isi->nr_pages += nr_pages; in iomap_swapfile_add_extent()
184 if (isi.nr_pages == 0) { in iomap_swapfile_activate()
190 sis->max = isi.nr_pages; in iomap_swapfile_activate()
191 sis->pages = isi.nr_pages - 1; in iomap_swapfile_activate()
[all …]
/linux/drivers/xen/
A Dballoon.c392 if (nr_pages > ARRAY_SIZE(frame_list)) in increase_reservation()
393 nr_pages = ARRAY_SIZE(frame_list); in increase_reservation()
396 for (i = 0; i < nr_pages; i++) { in increase_reservation()
398 nr_pages = i; in increase_reservation()
438 nr_pages = ARRAY_SIZE(frame_list); in decrease_reservation()
440 for (i = 0; i < nr_pages; i++) { in decrease_reservation()
443 nr_pages = i; in decrease_reservation()
479 BUG_ON(ret != nr_pages); in decrease_reservation()
588 if (si_mem_available() < nr_pages) in add_ballooned_pages()
614 while (pgno < nr_pages) { in xen_alloc_ballooned_pages()
[all …]
A Dunpopulated-alloc.c34 static int fill_list(unsigned int nr_pages) in fill_list() argument
39 unsigned int i, alloc_pages = round_up(nr_pages, PAGES_PER_SECTION); in fill_list()
158 int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages) in xen_alloc_unpopulated_pages() argument
169 return xen_alloc_ballooned_pages(nr_pages, pages); in xen_alloc_unpopulated_pages()
172 if (list_count < nr_pages) { in xen_alloc_unpopulated_pages()
173 ret = fill_list(nr_pages - list_count); in xen_alloc_unpopulated_pages()
178 for (i = 0; i < nr_pages; i++) { in xen_alloc_unpopulated_pages()
214 void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages) in xen_free_unpopulated_pages() argument
219 xen_free_ballooned_pages(nr_pages, pages); in xen_free_unpopulated_pages()
224 for (i = 0; i < nr_pages; i++) { in xen_free_unpopulated_pages()
/linux/arch/arm64/kvm/hyp/nvhe/
A Dsetup.c38 unsigned long nr_pages; in divide_memory_pool() local
43 vmemmap_base = hyp_early_alloc_contig(nr_pages); in divide_memory_pool()
47 nr_pages = hyp_vm_table_pages(); in divide_memory_pool()
48 vm_table_base = hyp_early_alloc_contig(nr_pages); in divide_memory_pool()
52 nr_pages = hyp_s1_pgtable_pages(); in divide_memory_pool()
53 hyp_pgt_base = hyp_early_alloc_contig(nr_pages); in divide_memory_pool()
57 nr_pages = host_s2_pgtable_pages(); in divide_memory_pool()
62 nr_pages = hyp_ffa_proxy_pages(); in divide_memory_pool()
63 ffa_proxy_pages = hyp_early_alloc_contig(nr_pages); in divide_memory_pool()
285 unsigned long nr_pages, reserved_pages, pfn; in __pkvm_init_finalise() local
[all …]
A Dmem_protect.c101 unsigned long nr_pages, pfn; in prepare_s2_pool() local
105 nr_pages = host_s2_pgtable_pages(); in prepare_s2_pool()
235 unsigned long nr_pages; in kvm_guest_prepare_stage2() local
550 u64 nr_pages; member
641 u64 size = tx->nr_pages * PAGE_SIZE; in host_request_owned_transition()
1099 .nr_pages = 1, in __pkvm_host_share_hyp()
1132 .nr_pages = 1, in __pkvm_host_unshare_hyp()
1165 .nr_pages = nr_pages, in __pkvm_host_donate_hyp()
1197 .nr_pages = nr_pages, in __pkvm_hyp_donate_host()
1272 .nr_pages = nr_pages, in __pkvm_host_share_ffa()
[all …]
/linux/include/xen/
A Dxen.h65 int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages);
66 void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages);
71 static inline int xen_alloc_unpopulated_pages(unsigned int nr_pages, in xen_alloc_unpopulated_pages() argument
74 return xen_alloc_ballooned_pages(nr_pages, pages); in xen_alloc_unpopulated_pages()
76 static inline void xen_free_unpopulated_pages(unsigned int nr_pages, in xen_free_unpopulated_pages() argument
79 xen_free_ballooned_pages(nr_pages, pages); in xen_free_unpopulated_pages()
/linux/drivers/firmware/efi/libstub/
A Drelocate.c28 unsigned long nr_pages; in efi_low_alloc_above() local
45 nr_pages = size / EFI_PAGE_SIZE; in efi_low_alloc_above()
60 if (desc->num_pages < nr_pages) in efi_low_alloc_above()
74 EFI_LOADER_DATA, nr_pages, &start); in efi_low_alloc_above()
120 unsigned long nr_pages; in efi_relocate_kernel() local
138 nr_pages = round_up(alloc_size, EFI_ALLOC_ALIGN) / EFI_PAGE_SIZE; in efi_relocate_kernel()
140 EFI_LOADER_DATA, nr_pages, &efi_addr); in efi_relocate_kernel()
/linux/net/rds/
A Dinfo.c163 unsigned long nr_pages = 0; in rds_info_getsockopt() local
187 nr_pages = (PAGE_ALIGN(start + len) - (start & PAGE_MASK)) in rds_info_getsockopt()
190 pages = kmalloc_array(nr_pages, sizeof(struct page *), GFP_KERNEL); in rds_info_getsockopt()
195 ret = pin_user_pages_fast(start, nr_pages, FOLL_WRITE, pages); in rds_info_getsockopt()
196 if (ret != nr_pages) { in rds_info_getsockopt()
198 nr_pages = ret; in rds_info_getsockopt()
200 nr_pages = 0; in rds_info_getsockopt()
205 rdsdebug("len %d nr_pages %lu\n", len, nr_pages); in rds_info_getsockopt()
238 unpin_user_pages(pages, nr_pages); in rds_info_getsockopt()
/linux/kernel/events/
A Dring_buffer.c179 if (rb->nr_pages) { in __perf_output_begin()
338 if (!rb->nr_pages) in ring_buffer_init()
687 if (nr_pages <= 0) in rb_alloc_aux()
710 max_order = ilog2(nr_pages); in rb_alloc_aux()
796 if (pgoff > rb->nr_pages) in __perf_mmap_to_page()
833 size += nr_pages * sizeof(void *); in rb_alloc()
847 for (i = 0; i < nr_pages; i++) { in rb_alloc()
853 rb->nr_pages = nr_pages; in rb_alloc()
877 for (i = 0; i < rb->nr_pages; i++) in rb_free()
946 if (nr_pages) { in rb_alloc()
[all …]

Completed in 70 milliseconds

12345678910>>...17