Home
last modified time | relevance | path

Searched refs:madvise (Results 1 – 25 of 91) sorted by relevance

1234

/linux-6.12.1/tools/testing/selftests/mm/
Dmadv_populate.c40 ret = madvise(addr, pagesize, MADV_POPULATE_READ); in sense_support()
44 ret = madvise(addr, pagesize, MADV_POPULATE_WRITE); in sense_support()
62 ret = madvise(addr, SIZE, MADV_POPULATE_READ); in test_prot_read()
65 ret = madvise(addr, SIZE, MADV_POPULATE_WRITE); in test_prot_read()
83 ret = madvise(addr, SIZE, MADV_POPULATE_READ); in test_prot_write()
87 ret = madvise(addr, SIZE, MADV_POPULATE_WRITE); in test_prot_write()
109 ret = madvise(addr, SIZE, MADV_POPULATE_READ); in test_holes()
112 ret = madvise(addr, SIZE, MADV_POPULATE_WRITE); in test_holes()
117 ret = madvise(addr, 2 * pagesize, MADV_POPULATE_READ); in test_holes()
120 ret = madvise(addr, 2 * pagesize, MADV_POPULATE_WRITE); in test_holes()
[all …]
Dhugetlb-madvise.c117 ret = madvise(addr - base_page_size, NR_HUGE_PAGES * huge_page_size, in main()
126 ret = madvise(addr, (NR_HUGE_PAGES * huge_page_size) + base_page_size, in main()
151 ret = madvise(addr + base_page_size, in main()
161 if (madvise(addr, in main()
188 if (madvise(addr, NR_HUGE_PAGES * huge_page_size, MADV_DONTNEED)) { in main()
220 if (madvise(addr, NR_HUGE_PAGES * huge_page_size, MADV_DONTNEED)) { in main()
231 if (madvise(addr, NR_HUGE_PAGES * huge_page_size, MADV_DONTNEED)) { in main()
279 if (madvise(addr, NR_HUGE_PAGES * huge_page_size, MADV_DONTNEED)) { in main()
290 if (madvise(addr, NR_HUGE_PAGES * huge_page_size, MADV_REMOVE)) { in main()
335 if (madvise(addr, NR_HUGE_PAGES * huge_page_size, MADV_DONTNEED)) { in main()
[all …]
Dksm_functional_tests.c184 if (madvise(map, size, MADV_NOHUGEPAGE) && errno != EINVAL) { in __mmap_and_merge_range()
211 if (madvise(map, size, MADV_MERGEABLE)) { in __mmap_and_merge_range()
269 if (madvise(map, size, MADV_UNMERGEABLE)) { in test_unmerge()
315 if (madvise(map, size / 2, MADV_UNMERGEABLE)) { in test_unmerge_zero_pages()
356 if (madvise(map, size / 2, MADV_DONTNEED)) { in test_unmerge_discarded()
361 if (madvise(map, size, MADV_UNMERGEABLE)) { in test_unmerge_discarded()
420 if (madvise(map, size, MADV_UNMERGEABLE)) { in test_unmerge_uffd_wp()
646 if (madvise(map + size / 2, size / 2, MADV_UNMERGEABLE)) { in test_prot_none()
Dkhugepaged.c292 ret = madvise(p, size, MADV_COLLAPSE); in madvise_collapse_retry()
326 if (madvise(p, hpage_pmd_size, MADV_HUGEPAGE)) { in alloc_hpage()
419 if (madvise(((char *)p) + start, end - start, MADV_POPULATE_READ)) { in file_fault()
513 madvise(p, nr_hpages * hpage_pmd_size, MADV_HUGEPAGE); in __madvise_collapse()
549 madvise(p, nr_hpages * hpage_pmd_size, MADV_HUGEPAGE); in wait_for_scan()
564 madvise(p, nr_hpages * hpage_pmd_size, MADV_NOHUGEPAGE); in wait_for_scan()
634 madvise(p, page_size, MADV_DONTNEED); in alloc_at_fault()
721 if (madvise(p, page_size, MADV_PAGEOUT)) { in collapse_swapin_single_pte()
748 if (madvise(p, (max_ptes_swap + 1) * page_size, MADV_PAGEOUT)) { in collapse_max_ptes_swap()
767 if (madvise(p, max_ptes_swap * page_size, MADV_PAGEOUT)) { in collapse_max_ptes_swap()
[all …]
Dcow.c753 ret = madvise(mem, pagesize, MADV_NOHUGEPAGE); in do_run_with_base_page()
764 madvise(mem, pagesize, MADV_PAGEOUT); in do_run_with_base_page()
817 ret = madvise(mem, thpsize, MADV_HUGEPAGE); in do_run_with_thp()
864 ret = madvise(mem + pagesize, thpsize - pagesize, MADV_DONTNEED); in do_run_with_thp()
897 ret = madvise(mem + pagesize, thpsize - pagesize, MADV_DONTFORK); in do_run_with_thp()
911 ret = madvise(mem + pagesize, thpsize - pagesize, MADV_DOFORK); in do_run_with_thp()
925 madvise(mem, size, MADV_PAGEOUT); in do_run_with_thp()
1251 ret = madvise(mem, size, MADV_COLLAPSE); in do_test_anon_thp_collapse()
1263 ret = madvise(mem + size / 2, size / 2, MADV_DONTFORK); in do_test_anon_thp_collapse()
1271 ret = madvise(mem, size / 2, MADV_DONTFORK); in do_test_anon_thp_collapse()
[all …]
Duffd-unit-tests.c383 if (madvise(area_dst, page_size, MADV_DONTNEED)) in uffd_wp_unpopulated_test()
393 if (madvise(area_dst, page_size, MADV_DONTNEED)) in uffd_wp_unpopulated_test()
400 if (madvise(area_dst, page_size, MADV_DONTNEED)) in uffd_wp_unpopulated_test()
441 if (madvise(area_dst, page_size, MADV_DONTNEED)) in uffd_wp_fork_test_common()
448 madvise(area_dst, page_size, MADV_PAGEOUT); in uffd_wp_fork_test_common()
607 if (madvise(area_dst_alias, nr_pages * page_size, in uffd_minor_test_common()
1131 if (madvise(area_src, nr_pages * page_size, MADV_DONTFORK)) in uffd_move_test_common()
1216 if (madvise(area_dst, nr_pages * page_size, MADV_HUGEPAGE)) in uffd_move_pmd_test()
1224 if (madvise(area_dst, nr_pages * page_size, MADV_NOHUGEPAGE)) in uffd_move_pmd_split_test()
1233 if (madvise(area_src, nr_pages * page_size, MADV_NOHUGEPAGE)) { in prevent_hugepages()
[all …]
Dtranshuge-stress.c82 if (madvise(ptr, len, MADV_HUGEPAGE)) in main()
122 if (madvise(p, HPAGE_SIZE - psize(), MADV_DONTNEED)) in main()
Dsplit_huge_page_test.c98 madvise(result, len, MADV_HUGEPAGE); in allocate_zero_filled_hugepage()
167 madvise(one_page, len, MADV_HUGEPAGE); in split_pmd_thp()
219 madvise(one_page, len, MADV_HUGEPAGE); in split_pte_mapped_thp()
410 madvise(*addr, fd_size, MADV_HUGEPAGE); in create_pagecache_thp_and_fd()
Dgup_test.c241 madvise(p, size, MADV_HUGEPAGE); in main()
243 madvise(p, size, MADV_NOHUGEPAGE); in main()
Dhugetlb_fault_after_madv.c33 madvise(huge_ptr, MMAP_SIZE, MADV_DONTNEED); in madv()
D.gitignore7 hugetlb-madvise
Duffd-common.c45 if (madvise(rel_area, nr_pages * page_size, MADV_DONTNEED)) in anon_release_pages()
67 if (madvise(rel_area, nr_pages * page_size, MADV_DONTNEED)) in hugetlb_release_pages()
70 if (madvise(rel_area, nr_pages * page_size, MADV_REMOVE)) in hugetlb_release_pages()
121 if (madvise(rel_area, nr_pages * page_size, MADV_REMOVE)) in shmem_release_pages()
Dhugetlb_madv_vs_map.c47 madvise(huge_ptr, mmap_size, MADV_DONTNEED); in madv()
/linux-6.12.1/Documentation/translations/zh_CN/admin-guide/mm/
Dksm.rst35madvise控制KSM
38 KSM仅在特定的地址空间区域时运行,即应用程序通过使用如下所示的madvise(2)系统调
41 int madvise(addr, length, MADV_MERGEABLE)
45 int madvise(addr, length, MADV_UNMERGEABLE)
51 如果KSM未被配置到正在运行的内核中,则madvise MADV_MERGEABLE 和 MADV_UNMERGEABLE
58 当该进程将超过 ``vm.max_map_count`` 的设定,则madvise可能返回ENOMEM。(请参阅文档
61 与其他madvise调用一样,它们在用户地址空间的映射区域上使用:如果指定的范围包含未
174 味着不好的madvise-applied策略,所以开发者或管理员必须重新考虑如何改变madvis策
177 的比例在64位CPU上超过64,或者在32位CPU上超过128,那么应用程序的madvise策略应
185 是否或如何使用KSM。例如,如果cow_ksm增加得太快,用户可以减少madvise(, , MADV_MERGEABLE)
/linux-6.12.1/Documentation/translations/zh_TW/admin-guide/mm/
Dksm.rst35madvise控制KSM
38 KSM僅在特定的地址空間區域時運行,即應用程序通過使用如下所示的madvise(2)系統調
41 int madvise(addr, length, MADV_MERGEABLE)
45 int madvise(addr, length, MADV_UNMERGEABLE)
51 如果KSM未被配置到正在運行的內核中,則madvise MADV_MERGEABLE 和 MADV_UNMERGEABLE
58 當該進程將超過 ``vm.max_map_count`` 的設定,則madvise可能返回ENOMEM。(請參閱文檔
61 與其他madvise調用一樣,它們在用戶地址空間的映射區域上使用:如果指定的範圍包含未
174 味着不好的madvise-applied策略,所以開發者或管理員必須重新考慮如何改變madvis策
177 的比例在64位CPU上超過64,或者在32位CPU上超過128,那麼應用程序的madvise策略應
185 是否或如何使用KSM。例如,如果cow_ksm增加得太快,用戶可以減少madvise(, , MADV_MERGEABLE)
/linux-6.12.1/tools/mm/
Dthp_swap_allocator_test.c76 if (madvise(addr, align_size, MADV_DONTNEED) != 0) in random_madvise_dontneed()
138 if (madvise(mem1, MEMSIZE_MTHP, MADV_HUGEPAGE) != 0) { in main()
152 if (madvise(mem2, MEMSIZE_SMALLFOLIO, MADV_NOHUGEPAGE) != 0) { in main()
162 madvise(mem1, MEMSIZE_MTHP, MADV_PAGEOUT); in main()
165 madvise(mem2, MEMSIZE_SMALLFOLIO, MADV_PAGEOUT); in main()
199 if (madvise(mem1, MEMSIZE_MTHP, MADV_PAGEOUT) != 0) { in main()
208 if (madvise(mem2, MEMSIZE_SMALLFOLIO, MADV_PAGEOUT) != 0) { in main()
/linux-6.12.1/Documentation/translations/zh_CN/admin-guide/mm/damon/
Dusage.rst217 - ``willneed``: 对有 ``MADV_WILLNEED`` 的区域调用 ``madvise()`` 。
218 - ``cold``: 对具有 ``MADV_COLD`` 的区域调用 ``madvise()`` 。
219 - ``pageout``: 为具有 ``MADV_PAGEOUT`` 的区域调用 ``madvise()`` 。
220 - ``hugepage``: 为带有 ``MADV_HUGEPAGE`` 的区域调用 ``madvise()`` 。
221 - ``nohugepage``: 为带有 ``MADV_NOHUGEPAGE`` 的区域调用 ``madvise()``。
451 - 0: Call ``madvise()`` for the region with ``MADV_WILLNEED``
452 - 1: Call ``madvise()`` for the region with ``MADV_COLD``
453 - 2: Call ``madvise()`` for the region with ``MADV_PAGEOUT``
454 - 3: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``
455 - 4: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``
/linux-6.12.1/Documentation/translations/zh_TW/admin-guide/mm/damon/
Dusage.rst217 - ``willneed``: 對有 ``MADV_WILLNEED`` 的區域調用 ``madvise()`` 。
218 - ``cold``: 對具有 ``MADV_COLD`` 的區域調用 ``madvise()`` 。
219 - ``pageout``: 爲具有 ``MADV_PAGEOUT`` 的區域調用 ``madvise()`` 。
220 - ``hugepage``: 爲帶有 ``MADV_HUGEPAGE`` 的區域調用 ``madvise()`` 。
221 - ``nohugepage``: 爲帶有 ``MADV_NOHUGEPAGE`` 的區域調用 ``madvise()``。
451 - 0: Call ``madvise()`` for the region with ``MADV_WILLNEED``
452 - 1: Call ``madvise()`` for the region with ``MADV_COLD``
453 - 2: Call ``madvise()`` for the region with ``MADV_PAGEOUT``
454 - 3: Call ``madvise()`` for the region with ``MADV_HUGEPAGE``
455 - 4: Call ``madvise()`` for the region with ``MADV_NOHUGEPAGE``
/linux-6.12.1/Documentation/admin-guide/mm/
Dtranshuge.rst69 interface and using madvise(2) and prctl(2) system calls.
92 MADV_HUGEPAGE madvise regions.
94 Embedded systems should enable hugepages only inside madvise regions
100 madvise(MADV_HUGEPAGE) on their critical mmapped regions.
116 echo madvise >/sys/kernel/mm/transparent_hugepage/hugepages-<size>kB/enabled
139 echo madvise >/sys/kernel/mm/transparent_hugepage/enabled
148 anonymous hugepages in case they're not immediately free to madvise
160 echo defer+madvise >/sys/kernel/mm/transparent_hugepage/defrag
161 echo madvise >/sys/kernel/mm/transparent_hugepage/defrag
177 defer+madvise
[all …]
Dksm.rst30 Controlling KSM with madvise
34 has advised to be likely candidates for merging, by using the madvise(2)
37 int madvise(addr, length, MADV_MERGEABLE)
43 int madvise(addr, length, MADV_UNMERGEABLE)
50 If KSM is not configured into the running kernel, madvise MADV_MERGEABLE
59 or MADV_UNMERGEABLE region, the madvise may return ENOMEM if the process
62 Like other madvise calls, they are intended for use on mapped areas of
227 indicate poor use of madvise MADV_MERGEABLE.
266 ``ksm_merging_pages`` means a bad madvise-applied policy, so developers or
267 administrators have to rethink how to change madvise policy. Giving an example
[all …]
/linux-6.12.1/tools/testing/selftests/powerpc/tm/
Dtm-signal-context-force-tm.c69 ret = madvise(ucp->uc_link, sizeof(ucontext_t), MADV_DONTNEED); in usr_signal_handler()
138 if (madvise(ss.ss_sp, SIGSTKSZ, MADV_DONTNEED)) { in tm_trap_test()
/linux-6.12.1/arch/um/os-Linux/
Dprocess.c183 err = madvise(addr, length, MADV_REMOVE); in os_drop_memory()
210 if (madvise(addr, UM_KERN_PAGE_SIZE, MADV_REMOVE) != 0) { in can_drop_memory()
/linux-6.12.1/tools/testing/selftests/bpf/
Duprobe_multi.c106 madvise(addr, page_sz, MADV_POPULATE_READ); in trigger_uprobe()
108 madvise(addr, page_sz, MADV_PAGEOUT); in trigger_uprobe()
/linux-6.12.1/tools/testing/selftests/kvm/s390x/
Dshared_zeropage_test.c68 madvise(mem, 3 * pagesize, MADV_NOHUGEPAGE); in main()
/linux-6.12.1/Documentation/userspace-api/
Dmseal.rst94 - some destructive madvise behaviors: MADV_DONTNEED, MADV_FREE,
105 Certain destructive madvise behaviors, specifically MADV_DONTNEED,
120 - mprotect, pkey_mprotect, madvise: partial update might happen, e.g.

1234