Home
last modified time | relevance | path

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

12345678910>>...14

/linux/io_uring/
H A Dmemmap.c17 static void *io_mem_alloc_compound(struct page **pages, int nr_pages, in io_mem_alloc_compound() argument
33 for (i = 0; i < nr_pages; i++) in io_mem_alloc_compound()
39 static void *io_mem_alloc_single(struct page **pages, int nr_pages, size_t size, in io_mem_alloc_single() argument
45 for (i = 0; i < nr_pages; i++) { in io_mem_alloc_single()
51 ret = vmap(pages, nr_pages, VM_MAP, PAGE_KERNEL); in io_mem_alloc_single()
65 int nr_pages; in io_pages_map() local
68 nr_pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; in io_pages_map()
69 pages = kvmalloc_array(nr_pages, sizeof(struct page *), gfp); in io_pages_map()
73 ret = io_mem_alloc_compound(pages, nr_pages, size, gfp); in io_pages_map()
76 if (nr_pages == 1) in io_pages_map()
[all …]
/linux/mm/
H A Dmemory_hotplug.c59 unsigned long nr_pages = PFN_UP(memory_block_memmap_size()); in memory_block_memmap_on_memory_pages() local
68 return pageblock_align(nr_pages); in memory_block_memmap_on_memory_pages()
69 return nr_pages; in memory_block_memmap_on_memory_pages()
299 static int check_pfn_span(unsigned long pfn, unsigned long nr_pages) in check_pfn_span() argument
316 if (!IS_ALIGNED(pfn | nr_pages, min_align)) in check_pfn_span()
369 int __add_pages(int nid, unsigned long pfn, unsigned long nr_pages, in __add_pages() argument
372 const unsigned long end_pfn = pfn + nr_pages; in __add_pages()
380 VM_BUG_ON(!mhp_range_allowed(PFN_PHYS(pfn), nr_pages * PAGE_SIZE, false)); in __add_pages()
387 || vmem_altmap_offset(altmap) > nr_pages) { in __add_pages()
394 if (check_pfn_span(pfn, nr_pages)) { in __add_pages()
529 remove_pfn_range_from_zone(struct zone * zone,unsigned long start_pfn,unsigned long nr_pages) remove_pfn_range_from_zone() argument
573 __remove_pages(unsigned long pfn,unsigned long nr_pages,struct vmem_altmap * altmap) __remove_pages() argument
638 online_pages_range(unsigned long start_pfn,unsigned long nr_pages) online_pages_range() argument
676 node_states_check_changes_online(unsigned long nr_pages,struct zone * zone,struct memory_notify * arg) node_states_check_changes_online() argument
700 resize_zone_range(struct zone * zone,unsigned long start_pfn,unsigned long nr_pages) resize_zone_range() argument
711 resize_pgdat_range(struct pglist_data * pgdat,unsigned long start_pfn,unsigned long nr_pages) resize_pgdat_range() argument
745 move_pfn_range_to_zone(struct zone * zone,unsigned long start_pfn,unsigned long nr_pages,struct vmem_altmap * altmap,int migratetype) move_pfn_range_to_zone() argument
838 auto_movable_can_online_movable(int nid,struct memory_group * group,unsigned long nr_pages) auto_movable_can_online_movable() argument
893 default_kernel_zone_for_pfn(int nid,unsigned long start_pfn,unsigned long nr_pages) default_kernel_zone_for_pfn() argument
961 auto_movable_zone_for_pfn(int nid,struct memory_group * group,unsigned long pfn,unsigned long nr_pages) auto_movable_zone_for_pfn() argument
1020 default_zone_for_pfn(int nid,unsigned long start_pfn,unsigned long nr_pages) default_zone_for_pfn() argument
1045 zone_for_pfn_range(int online_type,int nid,struct memory_group * group,unsigned long start_pfn,unsigned long nr_pages) zone_for_pfn_range() argument
1064 adjust_present_page_count(struct page * page,struct memory_group * group,long nr_pages) adjust_present_page_count() argument
1084 mhp_init_memmap_on_memory(unsigned long pfn,unsigned long nr_pages,struct zone * zone,bool mhp_off_inaccessible) mhp_init_memmap_on_memory() argument
1123 mhp_deinit_memmap_on_memory(unsigned long pfn,unsigned long nr_pages) mhp_deinit_memmap_on_memory() argument
1146 online_pages(unsigned long pfn,unsigned long nr_pages,struct zone * zone,struct memory_group * group) online_pages() argument
1876 node_states_check_changes_offline(unsigned long nr_pages,struct zone * zone,struct memory_notify * arg) node_states_check_changes_offline() argument
1924 count_system_ram_pages_cb(unsigned long start_pfn,unsigned long nr_pages,void * data) count_system_ram_pages_cb() argument
1935 offline_pages(unsigned long start_pfn,unsigned long nr_pages,struct zone * zone,struct memory_group * group) offline_pages() argument
[all...]
H A Dpage_counter.c54 void page_counter_cancel(struct page_counter *counter, unsigned long nr_pages) in page_counter_cancel() argument
58 new = atomic_long_sub_return(nr_pages, &counter->usage); in page_counter_cancel()
61 new, nr_pages)) { in page_counter_cancel()
76 void page_counter_charge(struct page_counter *counter, unsigned long nr_pages) in page_counter_charge() argument
84 new = atomic_long_add_return(nr_pages, &c->usage); in page_counter_charge()
119 unsigned long nr_pages, in page_counter_try_charge() argument
141 new = atomic_long_add_return(nr_pages, &c->usage); in page_counter_try_charge()
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()
177 void page_counter_uncharge(struct page_counter *counter, unsigned long nr_pages) in page_counter_uncharge() argument
[all …]
H A Dsparse.c185 unsigned long nr_pages) in subsection_mask_set() argument
188 int end = subsection_map_index(pfn + nr_pages - 1); in subsection_mask_set()
193 void __init subsection_map_init(unsigned long pfn, unsigned long nr_pages) in subsection_map_init() argument
195 int end_sec_nr = pfn_to_section_nr(pfn + nr_pages - 1); in subsection_map_init()
202 pfns = min(nr_pages, PAGES_PER_SECTION in subsection_map_init()
212 nr_pages -= pfns; in subsection_map_init()
216 void __init subsection_map_init(unsigned long pfn, unsigned long nr_pages) in subsection_map_init() argument
426 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in __populate_section_memmap() argument
634 unsigned long nr_pages, int nid, struct vmem_altmap *altmap, in populate_section_memmap() argument
637 return __populate_section_memmap(pfn, nr_pages, ni in populate_section_memmap()
640 depopulate_section_memmap(unsigned long pfn,unsigned long nr_pages,struct vmem_altmap * altmap) depopulate_section_memmap() argument
657 clear_subsection_map(unsigned long pfn,unsigned long nr_pages) clear_subsection_map() argument
684 fill_subsection_map(unsigned long pfn,unsigned long nr_pages) fill_subsection_map() argument
707 populate_section_memmap(unsigned long pfn,unsigned long nr_pages,int nid,struct vmem_altmap * altmap,struct dev_pagemap * pgmap) populate_section_memmap() argument
714 depopulate_section_memmap(unsigned long pfn,unsigned long nr_pages,struct vmem_altmap * altmap) depopulate_section_memmap() argument
723 unsigned long magic, nr_pages; free_map_bootmem() local
750 clear_subsection_map(unsigned long pfn,unsigned long nr_pages) clear_subsection_map() argument
760 fill_subsection_map(unsigned long pfn,unsigned long nr_pages) fill_subsection_map() argument
782 section_deactivate(unsigned long pfn,unsigned long nr_pages,struct vmem_altmap * altmap) section_deactivate() argument
832 section_activate(int nid,unsigned long pfn,unsigned long nr_pages,struct vmem_altmap * altmap,struct dev_pagemap * pgmap) section_activate() argument
894 sparse_add_section(int nid,unsigned long start_pfn,unsigned long nr_pages,struct vmem_altmap * altmap,struct dev_pagemap * pgmap) sparse_add_section() argument
929 sparse_remove_section(unsigned long pfn,unsigned long nr_pages,struct vmem_altmap * altmap) sparse_remove_section() argument
[all...]
H 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 …]
H A Dgup_test.c11 unsigned long nr_pages, unsigned int gup_test_flags) in put_back_pages() argument
18 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
80 if (gup->which_pages[i] > nr_pages) { in dump_pages_test()
104 unsigned long i, nr_pages, addr, next; in __gup_test_ioctl() local
[all …]
H 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()
219 page_counter_charge(&parent->hugepage[idx], nr_pages); in hugetlb_cgroup_move_parent()
223 page_counter_cancel(counter, nr_pages); in hugetlb_cgroup_move_parent()
265 static int __hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, in __hugetlb_cgroup_charge_cgroup() argument
286 nr_pages, &counter)) { in __hugetlb_cgroup_charge_cgroup()
302 int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, in hugetlb_cgroup_charge_cgroup() argument
305 return __hugetlb_cgroup_charge_cgroup(idx, nr_pages, ptr, false); in hugetlb_cgroup_charge_cgroup()
308 int hugetlb_cgroup_charge_cgroup_rsvd(int idx, unsigned long nr_pages, in hugetlb_cgroup_charge_cgroup_rsvd() argument
311 return __hugetlb_cgroup_charge_cgroup(idx, nr_pages, ptr, true); in hugetlb_cgroup_charge_cgroup_rsvd()
[all …]
H 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()
105 void memcg1_account_kmem(struct mem_cgroup *memcg, int nr_pages);
110 bool memcg1_charge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages,
112 static inline void memcg1_uncharge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages) in memcg1_uncharge_skmem() argument
114 page_counter_uncharge(&memcg->tcpmem, nr_pages); in memcg1_uncharge_skmem()
145 static inline void memcg1_account_kmem(struct mem_cgroup *memcg, int nr_pages) {} in memcg1_account_kmem() argument
147 static inline bool memcg1_charge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages, in memcg1_charge_skmem() argument
149 static inline void memcg1_uncharge_skmem(struct mem_cgroup *memcg, unsigned int nr_pages) {} in memcg1_uncharge_skmem() argument
H 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()
165 struct page *page, unsigned int nr_pages, bool delay_rmap, in __tlb_remove_folio_pages_size() argument
175 VM_WARN_ON_ONCE(nr_pages != 1 && page_size != PAGE_SIZE); in __tlb_remove_folio_pages_size()
[all …]
H 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
H A Dmemcontrol.c133 unsigned int nr_pages); in obj_cgroup_release()
139 unsigned int nr_pages; in obj_cgroup_release()
164 nr_pages = nr_bytes >> PAGE_SHIFT; in obj_cgroup_release()
166 if (nr_pages) in obj_cgroup_release()
167 obj_cgroup_uncharge_pages(objcg, nr_pages); in obj_cgroup_release()
1271 * @nr_pages: positive when adding or negative when removing in mem_cgroup_update_lru_size()
1277 int zid, int nr_pages) in mem_cgroup_update_lru_size()
1289 if (nr_pages < 0)
1290 *lru_size += nr_pages;
1295 __func__, lruvec, lru, nr_pages, siz in mem_cgroup_margin()
134 unsigned int nr_pages; obj_cgroup_release() local
1258 mem_cgroup_update_lru_size(struct lruvec * lruvec,enum lru_list lru,int zid,int nr_pages) mem_cgroup_update_lru_size() argument
1700 unsigned int nr_pages; global() member
1732 consume_stock(struct mem_cgroup * memcg,unsigned int nr_pages) consume_stock() argument
1805 __refill_stock(struct mem_cgroup * memcg,unsigned int nr_pages) __refill_stock() argument
1823 refill_stock(struct mem_cgroup * memcg,unsigned int nr_pages) refill_stock() argument
1888 reclaim_high(struct mem_cgroup * memcg,unsigned int nr_pages,gfp_t gfp_mask) reclaim_high() argument
2028 calculate_high_delay(struct mem_cgroup * memcg,unsigned int nr_pages,u64 max_overage) calculate_high_delay() argument
2069 unsigned int nr_pages = current->memcg_nr_pages_over_high; mem_cgroup_handle_over_high() local
2158 try_charge_memcg(struct mem_cgroup * memcg,gfp_t gfp_mask,unsigned int nr_pages) try_charge_memcg() argument
2358 mem_cgroup_cancel_charge(struct mem_cgroup * memcg,unsigned int nr_pages) mem_cgroup_cancel_charge() argument
2598 obj_cgroup_uncharge_pages(struct obj_cgroup * objcg,unsigned int nr_pages) obj_cgroup_uncharge_pages() argument
2620 obj_cgroup_charge_pages(struct obj_cgroup * objcg,gfp_t gfp,unsigned int nr_pages) obj_cgroup_charge_pages() argument
2674 unsigned int nr_pages = 1 << order; __memcg_kmem_uncharge_page() local
2777 unsigned int nr_pages = stock->nr_bytes >> PAGE_SHIFT; drain_obj_stock() local
2854 unsigned int nr_pages = 0; refill_obj_stock() local
2883 unsigned int nr_pages, nr_bytes; obj_cgroup_charge() local
4078 unsigned long nr_pages = page_counter_read(&memcg->memory); memory_high_write() local
4127 unsigned long nr_pages = page_counter_read(&memcg->memory); memory_max_write() local
4511 mem_cgroup_hugetlb_try_charge(struct mem_cgroup * memcg,gfp_t gfp,long nr_pages) mem_cgroup_hugetlb_try_charge() argument
4573 mem_cgroup_swapin_uncharge_swap(swp_entry_t entry,unsigned int nr_pages) mem_cgroup_swapin_uncharge_swap() argument
4631 long nr_pages; uncharge_folio() local
4727 long nr_pages = folio_nr_pages(new); mem_cgroup_replace_folio() local
4841 mem_cgroup_charge_skmem(struct mem_cgroup * memcg,unsigned int nr_pages,gfp_t gfp_mask) mem_cgroup_charge_skmem() argument
4860 mem_cgroup_uncharge_skmem(struct mem_cgroup * memcg,unsigned int nr_pages) mem_cgroup_uncharge_skmem() argument
5010 unsigned int nr_pages = folio_nr_pages(folio); __mem_cgroup_try_charge_swap() local
5054 __mem_cgroup_uncharge_swap(swp_entry_t entry,unsigned int nr_pages) __mem_cgroup_uncharge_swap() argument
[all...]
H 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_COUN in process_vm_rw_core()
[all...]
/linux/include/linux/
H A Dhugetlb_cgroup.h127 extern int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages,
129 extern int hugetlb_cgroup_charge_cgroup_rsvd(int idx, unsigned long nr_pages,
131 extern void hugetlb_cgroup_commit_charge(int idx, unsigned long nr_pages,
134 extern void hugetlb_cgroup_commit_charge_rsvd(int idx, unsigned long nr_pages,
137 extern void hugetlb_cgroup_uncharge_folio(int idx, unsigned long nr_pages,
139 extern void hugetlb_cgroup_uncharge_folio_rsvd(int idx, unsigned long nr_pages,
142 extern void hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages,
144 extern void hugetlb_cgroup_uncharge_cgroup_rsvd(int idx, unsigned long nr_pages,
152 unsigned long nr_pages,
162 unsigned long nr_pages, in hugetlb_cgroup_uncharge_file_region() argument
[all …]
H 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);
H A Dmemory_hotplug.h123 long nr_pages);
125 extern int mhp_init_memmap_on_memory(unsigned long pfn, unsigned long nr_pages,
127 extern void mhp_deinit_memmap_on_memory(unsigned long pfn, unsigned 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,
161 extern int __add_pages(int nid, 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,
[all …]
/linux/fs/iomap/
H A Dswapfile.c19 unsigned long nr_pages; /* number of pages collected */ member
33 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()
[all …]
/linux/drivers/xen/
H A Dballoon.c386 static enum bp_state increase_reservation(unsigned long nr_pages) in increase_reservation() argument
392 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()
406 rc = xenmem_reservation_increase(nr_pages, frame_list); in increase_reservation()
429 static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) in decrease_reservation() argument
437 if (nr_pages > ARRAY_SIZE(frame_list)) in decrease_reservation()
438 nr_pages = ARRAY_SIZE(frame_list); in decrease_reservation()
440 for (i = 0; i < nr_pages; i++) { in decrease_reservation()
[all …]
H 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/
H 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()
106 ret = hyp_pool_init(&host_s2_pool, pfn, nr_pages, 0); in prepare_s2_pool()
235 unsigned long nr_pages; in kvm_guest_prepare_stage2() local
238 nr_pages = kvm_pgtable_stage2_pgd_size(mmu->vtcr) >> PAGE_SHIFT; in kvm_guest_prepare_stage2()
239 ret = hyp_pool_init(&vm->pool, hyp_virt_to_pfn(pgd), nr_pages, 0); in kvm_guest_prepare_stage2()
550 u64 nr_pages; member
641 u64 size = tx->nr_pages * PAGE_SIZE; in host_request_owned_transition()
651 u64 size = tx->nr_pages * PAGE_SIZE; in host_request_unshare()
661 u64 size = tx->nr_pages * PAGE_SIZE; in host_initiate_share()
[all …]
/linux/include/xen/
H 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/net/rds/
H 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()
H A Drdma.c154 static int rds_pin_pages(unsigned long user_addr, unsigned int nr_pages, in rds_pin_pages() argument
163 ret = pin_user_pages_fast(user_addr, nr_pages, gup_flags, pages); in rds_pin_pages()
164 if (ret >= 0 && ret < nr_pages) { in rds_pin_pages()
178 unsigned int nr_pages; in __rds_rdma_map() local
213 nr_pages = rds_pages_in_vec(&args->vec); in __rds_rdma_map()
214 if (nr_pages == 0) { in __rds_rdma_map()
222 if ((nr_pages - 1) > (RDS_MAX_MSG_SIZE >> PAGE_SHIFT)) { in __rds_rdma_map()
228 args->vec.addr, args->vec.bytes, nr_pages); in __rds_rdma_map()
231 pages = kcalloc(nr_pages, sizeof(struct page *), GFP_KERNEL); in __rds_rdma_map()
265 ret = rds_pin_pages(args->vec.addr, nr_pages, pages, 1); in __rds_rdma_map()
[all …]
/linux/drivers/firmware/efi/libstub/
H 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/kernel/events/
H A Dring_buffer.c179 if (rb->nr_pages) { in __perf_output_begin()
242 handle->page = (offset >> page_shift) & (rb->nr_pages - 1); in __perf_output_begin()
338 if (!rb->nr_pages) in ring_buffer_init()
678 pgoff_t pgoff, int nr_pages, long watermark, int flags) in rb_alloc_aux() argument
687 if (nr_pages <= 0) in rb_alloc_aux()
698 (unsigned long)nr_pages << (PAGE_SHIFT - 1)); in rb_alloc_aux()
710 max_order = ilog2(nr_pages); in rb_alloc_aux()
718 if (get_order((unsigned long)nr_pages * sizeof(void *)) > MAX_PAGE_ORDER) in rb_alloc_aux()
720 rb->aux_pages = kcalloc_node(nr_pages, sizeof(void *), GFP_KERNEL, in rb_alloc_aux()
726 for (rb->aux_nr_pages = 0; rb->aux_nr_pages < nr_pages;) { in rb_alloc_aux()
[all …]
/linux/fs/crypto/
H A Dbio.c123 unsigned int nr_pages; in fscrypt_zeroout_range() local
137 nr_pages = min_t(u64, ARRAY_SIZE(pages), in fscrypt_zeroout_range()
147 for (i = 0; i < nr_pages; i++) { in fscrypt_zeroout_range()
153 nr_pages = i; in fscrypt_zeroout_range()
154 if (WARN_ON_ONCE(nr_pages <= 0)) in fscrypt_zeroout_range()
158 bio = bio_alloc(inode->i_sb->s_bdev, nr_pages, REQ_OP_WRITE, GFP_NOFS); in fscrypt_zeroout_range()
184 } while (i != nr_pages && du_remaining != 0); in fscrypt_zeroout_range()
194 for (i = 0; i < nr_pages; i++) in fscrypt_zeroout_range()

12345678910>>...14