Home
last modified time | relevance | path

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

12345678910>>...16

/linux/mm/
A Dpage_counter.c57 new, nr_pages)) { in page_counter_cancel()
99 unsigned long nr_pages, in page_counter_try_charge() argument
122 atomic_long_sub(nr_pages, &c->usage); in page_counter_try_charge()
145 page_counter_cancel(c, nr_pages); in page_counter_try_charge()
160 page_counter_cancel(c, nr_pages); in page_counter_uncharge()
192 if (usage > nr_pages) in page_counter_set_max()
195 old = xchg(&counter->max, nr_pages); in page_counter_set_max()
216 WRITE_ONCE(counter->min, nr_pages); in page_counter_set_min()
233 WRITE_ONCE(counter->low, nr_pages); in page_counter_set_low()
249 unsigned long *nr_pages) in page_counter_memparse() argument
[all …]
A Dmemory_hotplug.c641 unsigned long nr_pages) in resize_zone_range() argument
680 unsigned long nr_pages, in move_pfn_range_to_zone() argument
817 movable_pages += nr_pages; in auto_movable_can_online_movable()
827 unsigned long nr_pages) in default_kernel_zone_for_pfn() argument
911 max_pages = nr_pages; in auto_movable_zone_for_pfn()
954 unsigned long nr_pages) in default_zone_for_pfn() argument
957 nr_pages); in default_zone_for_pfn()
979 unsigned long nr_pages) in zone_for_pfn_range() argument
998 long nr_pages) in adjust_present_page_count() argument
1088 arg.nr_pages = nr_pages; in online_pages()
[all …]
A Dsparse.c186 unsigned long nr_pages) in subsection_mask_set() argument
199 if (!nr_pages) in subsection_map_init()
206 pfns = min(nr_pages, PAGES_PER_SECTION in subsection_map_init()
216 nr_pages -= pfns; in subsection_map_init()
661 subsection_mask_set(map, pfn, nr_pages); in clear_subsection_map()
667 pfn, nr_pages)) in clear_subsection_map()
687 subsection_mask_set(map, pfn, nr_pages); in fill_subsection_map()
718 unsigned long magic, nr_pages; in free_map_bootmem() local
724 for (i = 0; i < nr_pages; i++, page++) { in free_map_bootmem()
933 for (i = 0; i < nr_pages; i++) { in clear_hwpoisoned_pages()
[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 Dgup_test.c17 for (i = 0; i < nr_pages; i++) in put_back_pages()
24 unpin_user_pages(pages, nr_pages); in put_back_pages()
28 unpin_user_pages(pages, nr_pages); in put_back_pages()
30 for (i = 0; i < nr_pages; i++) in put_back_pages()
39 unsigned long nr_pages) in verify_dma_pinned() argument
48 for (i = 0; i < nr_pages; i++) { in verify_dma_pinned()
68 unsigned long nr_pages) in dump_pages_test() argument
78 if (gup->which_pages[i] > nr_pages) { in dump_pages_test()
102 unsigned long i, nr_pages, addr, next; in __gup_test_ioctl() local
112 nr_pages = gup->size / PAGE_SIZE; in __gup_test_ioctl()
[all …]
A Dhugetlb_cgroup.c161 unsigned int nr_pages; in hugetlb_cgroup_move_parent() local
175 nr_pages = compound_nr(page); in hugetlb_cgroup_move_parent()
183 page_counter_cancel(counter, nr_pages); in hugetlb_cgroup_move_parent()
255 nr_pages, &counter)) { in __hugetlb_cgroup_charge_cgroup()
327 nr_pages); in __hugetlb_cgroup_uncharge_page()
359 nr_pages); in __hugetlb_cgroup_uncharge_cgroup()
391 unsigned long nr_pages, in hugetlb_cgroup_uncharge_file_region() argument
400 nr_pages * resv->pages_per_hpage); in hugetlb_cgroup_uncharge_file_region()
500 unsigned long nr_pages; in hugetlb_cgroup_write() local
513 nr_pages = round_down(nr_pages, pages_per_huge_page(&hstates[idx])); in hugetlb_cgroup_write()
[all …]
A Dgup.c1090 if (!nr_pages) in __get_user_pages()
1198 page_increm = nr_pages; in __get_user_pages()
1202 } while (nr_pages); in __get_user_pages()
1358 nr_pages -= ret; in __get_user_pages_locked()
1360 if (!nr_pages) in __get_user_pages_locked()
1418 nr_pages--; in __get_user_pages_locked()
1420 if (!nr_pages) in __get_user_pages_locked()
1727 unsigned long nr_pages; in fault_in_safe_writeable() local
1888 return nr_pages; in check_and_migrate_movable_pages()
1911 return nr_pages; in check_and_migrate_movable_pages()
[all …]
A Dmemcontrol.c298 if (nr_pages) in obj_cgroup_release()
814 if (nr_pages > 0) in mem_cgroup_charge_statistics()
818 nr_pages = -nr_pages; /* for event */ in mem_cgroup_charge_statistics()
1270 if (nr_pages < 0) in mem_cgroup_update_lru_size()
2145 if (memcg == stock->cached && stock->nr_pages >= nr_pages) { in consume_stock()
2146 stock->nr_pages -= nr_pages; in consume_stock()
2215 stock->nr_pages += nr_pages; in refill_stock()
3150 if (nr_pages) in drain_obj_stock()
3233 if (nr_pages) in refill_obj_stock()
3272 nr_pages += 1; in obj_cgroup_charge()
[all …]
A Dprocess_vm_access.c80 unsigned long nr_pages; in process_vm_rw_single_vec() local
89 nr_pages = (addr + len - 1) / PAGE_SIZE - addr / PAGE_SIZE + 1; in process_vm_rw_single_vec()
94 while (!rc && nr_pages && iov_iter_count(iter)) { in process_vm_rw_single_vec()
95 int pinned_pages = min(nr_pages, max_pages_per_loop); in process_vm_rw_single_vec()
122 nr_pages -= pinned_pages; in process_vm_rw_single_vec()
161 unsigned long nr_pages = 0; in process_vm_rw_core() local
177 nr_pages = max(nr_pages, nr_pages_iov); in process_vm_rw_core()
181 if (nr_pages == 0) in process_vm_rw_core()
184 if (nr_pages > PVM_MAX_PP_ARRAY_COUNT) { in process_vm_rw_core()
188 sizeof(struct pages *)*nr_pages), in process_vm_rw_core()
A Dmlock.c62 int nr_pages; in clear_page_mlock() local
67 nr_pages = thp_nr_pages(page); in clear_page_mlock()
100 int nr_pages = thp_nr_pages(page); in mlock_vma_page() local
142 int nr_pages = thp_nr_pages(page); in __munlock_isolation_failed() local
170 int nr_pages; in munlock_vma_page() local
181 nr_pages = thp_nr_pages(page); in munlock_vma_page()
189 return nr_pages - 1; in munlock_vma_page()
501 int nr_pages; in mlock_fixup() local
539 nr_pages = -nr_pages; in mlock_fixup()
541 nr_pages = 0; in mlock_fixup()
[all …]
A Dpage_ext.c156 unsigned long nr_pages; in alloc_node_page_ext() local
158 nr_pages = NODE_DATA(nid)->node_spanned_pages; in alloc_node_page_ext()
159 if (!nr_pages) in alloc_node_page_ext()
169 nr_pages += MAX_ORDER_NR_PAGES; in alloc_node_page_ext()
171 table_size = page_ext_size * nr_pages; in alloc_node_page_ext()
303 unsigned long nr_pages, in online_page_ext() argument
310 end = SECTION_ALIGN_UP(start_pfn + nr_pages); in online_page_ext()
335 unsigned long nr_pages, int nid) in offline_page_ext() argument
357 mn->nr_pages, mn->status_change_nid); in page_ext_callback()
361 mn->nr_pages, mn->status_change_nid); in page_ext_callback()
[all …]
A Dswap.c281 lruvec->file_cost += nr_pages; in lru_note_cost()
283 lruvec->anon_cost += nr_pages; in lru_note_cost()
315 long nr_pages = folio_nr_pages(folio); in __folio_activate() local
324 nr_pages); in __folio_activate()
491 int nr_pages = thp_nr_pages(page); in lru_cache_add_inactive_or_unevictable() local
527 int nr_pages = thp_nr_pages(page); in lru_deactivate_file_fn() local
560 nr_pages); in lru_deactivate_file_fn()
567 int nr_pages = thp_nr_pages(page); in lru_deactivate_fn() local
576 nr_pages); in lru_deactivate_fn()
584 int nr_pages = thp_nr_pages(page); in lru_lazyfree_fn() local
[all …]
/linux/include/linux/
A Dhugetlb_cgroup.h138 extern int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages,
142 extern void hugetlb_cgroup_commit_charge(int idx, unsigned long nr_pages,
148 extern void hugetlb_cgroup_uncharge_page(int idx, unsigned long nr_pages,
153 extern void hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages,
163 unsigned long nr_pages,
173 unsigned long nr_pages, in hugetlb_cgroup_uncharge_file_region() argument
233 unsigned long nr_pages, in hugetlb_cgroup_charge_cgroup_rsvd() argument
246 hugetlb_cgroup_commit_charge_rsvd(int idx, unsigned long nr_pages, in hugetlb_cgroup_commit_charge_rsvd() argument
258 unsigned long nr_pages, in hugetlb_cgroup_uncharge_page_rsvd() argument
263 unsigned long nr_pages, in hugetlb_cgroup_uncharge_cgroup() argument
[all …]
A Dpage_counter.h58 void page_counter_cancel(struct page_counter *counter, unsigned long nr_pages);
59 void page_counter_charge(struct page_counter *counter, unsigned long nr_pages);
61 unsigned long nr_pages,
63 void page_counter_uncharge(struct page_counter *counter, unsigned long nr_pages);
64 void page_counter_set_min(struct page_counter *counter, unsigned long nr_pages);
65 void page_counter_set_low(struct page_counter *counter, unsigned long nr_pages);
68 unsigned long nr_pages) in page_counter_set_high() argument
70 WRITE_ONCE(counter->high, nr_pages); in page_counter_set_high()
73 int page_counter_set_max(struct page_counter *counter, unsigned long nr_pages);
75 unsigned long *nr_pages);
A Dmemory_hotplug.h103 long nr_pages);
108 extern int online_pages(unsigned long pfn, unsigned long nr_pages,
148 unsigned long nr_pages, struct mhp_params *params) in add_pages() argument
150 return __add_pages(nid, start_pfn, nr_pages, params); in add_pages()
153 int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
299 extern int offline_pages(unsigned long start_pfn, unsigned long nr_pages,
335 unsigned long nr_pages,
339 unsigned long nr_pages);
342 unsigned long nr_pages, struct vmem_altmap *altmap);
344 unsigned long pfn, unsigned long nr_pages,
[all …]
/linux/drivers/media/v4l2-core/
A Dvideobuf-dma-sg.c63 int nr_pages) in videobuf_vmalloc_to_sg() argument
72 sg_init_table(sglist, nr_pages); in videobuf_vmalloc_to_sg()
174 dma->nr_pages = last-first+1; in videobuf_dma_init_user_locked()
184 data, size, dma->nr_pages); in videobuf_dma_init_user_locked()
189 if (err != dma->nr_pages) { in videobuf_dma_init_user_locked()
192 dma->nr_pages); in videobuf_dma_init_user_locked()
211 unsigned long nr_pages) in videobuf_dma_init_kernel() argument
249 dma->nr_pages = nr_pages; in videobuf_dma_init_kernel()
280 dma->nr_pages = nr_pages; in videobuf_dma_init_overlay()
288 BUG_ON(0 == dma->nr_pages); in videobuf_dma_map()
[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/arch/arm64/kvm/hyp/
A Dreserved_mem.c57 u64 nr_pages, prev, hyp_mem_pages = 0; in kvm_hyp_reserve() local
81 nr_pages = 0; in kvm_hyp_reserve()
83 prev = nr_pages; in kvm_hyp_reserve()
84 nr_pages = hyp_mem_pages + prev; in kvm_hyp_reserve()
85 nr_pages = DIV_ROUND_UP(nr_pages * sizeof(struct hyp_page), PAGE_SIZE); in kvm_hyp_reserve()
86 nr_pages += __hyp_pgtable_max_pages(nr_pages); in kvm_hyp_reserve()
87 } while (nr_pages != prev); in kvm_hyp_reserve()
88 hyp_mem_pages += nr_pages; in kvm_hyp_reserve()
/linux/drivers/xen/
A Dballoon.c409 if (nr_pages > ARRAY_SIZE(frame_list)) in increase_reservation()
410 nr_pages = ARRAY_SIZE(frame_list); in increase_reservation()
413 for (i = 0; i < nr_pages; i++) { in increase_reservation()
415 nr_pages = i; in increase_reservation()
451 nr_pages = ARRAY_SIZE(frame_list); in decrease_reservation()
453 for (i = 0; i < nr_pages; i++) { in decrease_reservation()
456 nr_pages = i; in decrease_reservation()
492 BUG_ON(ret != nr_pages); in decrease_reservation()
602 if (si_mem_available() < nr_pages) in add_ballooned_pages()
628 while (pgno < nr_pages) { in xen_alloc_unpopulated_pages()
[all …]
A Dunpopulated-alloc.c18 static int fill_list(unsigned int nr_pages) in fill_list() argument
23 unsigned int i, alloc_pages = round_up(nr_pages, PAGES_PER_SECTION); in fill_list()
111 int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages) in xen_alloc_unpopulated_pages() argument
117 if (list_count < nr_pages) { in xen_alloc_unpopulated_pages()
118 ret = fill_list(nr_pages - list_count); in xen_alloc_unpopulated_pages()
123 for (i = 0; i < nr_pages; i++) { in xen_alloc_unpopulated_pages()
159 void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages) in xen_free_unpopulated_pages() argument
164 for (i = 0; i < nr_pages; i++) { in xen_free_unpopulated_pages()
/linux/tools/testing/selftests/vm/
A Duserfaultfd.c231 nr_pages * page_size)) in hugetlb_release_pages()
253 nr_pages * page_size); in hugetlb_allocate_area()
452 for (nr = 0; nr < nr_pages; nr++) { in uffd_test_ctx_init()
560 page_nr %= nr_pages; in locking_thread()
928 split_nr_pages = nr_pages; in faulting_process()
988 area_dst = mremap(area_dst, nr_pages * page_size, nr_pages * page_size, in faulting_process()
995 for (; nr < nr_pages; nr++) { in faulting_process()
1010 for (nr = 0; nr < nr_pages; nr++) in faulting_process()
1247 for (p = 0; p < nr_pages; ++p) { in userfaultfd_minor_test()
1265 for (p = 0; p < nr_pages; ++p) { in userfaultfd_minor_test()
[all …]
/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()
A Drdma.c178 unsigned int nr_pages; in __rds_rdma_map() local
214 if (nr_pages == 0) { in __rds_rdma_map()
532 unsigned int nr_pages; in rds_rdma_pages() local
538 if (nr_pages == 0) in rds_rdma_pages()
541 tot_pages += nr_pages; in rds_rdma_pages()
560 unsigned int nr_pages; in rds_rdma_extra_size() local
588 if (nr_pages == 0) in rds_rdma_extra_size()
591 tot_pages += nr_pages; in rds_rdma_extra_size()
614 int nr_pages; in rds_cmsg_rdma_args() local
649 if (nr_pages < 0) { in rds_cmsg_rdma_args()
[all …]
/linux/kernel/events/
A Dring_buffer.c175 if (rb->nr_pages) in __perf_output_begin()
330 if (!rb->nr_pages) in ring_buffer_init()
695 max_order = ilog2(nr_pages); in rb_alloc_aux()
775 if (pgoff > rb->nr_pages) in __perf_mmap_to_page()
812 size += nr_pages * sizeof(void *); in rb_alloc()
826 for (i = 0; i < nr_pages; i++) { in rb_alloc()
832 rb->nr_pages = nr_pages; in rb_alloc()
856 for (i = 0; i < rb->nr_pages; i++) in rb_free()
930 if (nr_pages) { in rb_alloc()
931 rb->nr_pages = 1; in rb_alloc()
[all …]
/linux/drivers/firmware/efi/libstub/
A Drelocate.c29 unsigned long nr_pages; in efi_low_alloc_above() local
54 nr_pages = size / EFI_PAGE_SIZE; in efi_low_alloc_above()
69 if (desc->num_pages < nr_pages) in efi_low_alloc_above()
83 EFI_LOADER_DATA, nr_pages, &start); in efi_low_alloc_above()
129 unsigned long nr_pages; in efi_relocate_kernel() local
147 nr_pages = round_up(alloc_size, EFI_ALLOC_ALIGN) / EFI_PAGE_SIZE; in efi_relocate_kernel()
149 EFI_LOADER_DATA, nr_pages, &efi_addr); in efi_relocate_kernel()

Completed in 56 milliseconds

12345678910>>...16