Lines Matching +full:shared +full:- +full:pin

1 // SPDX-License-Identifier: GPL-2.0-only
3 * GUP long-term page pinning tests.
54 * R/W long-term pinning. For these filesystems, we can be fairly sure in fs_is_unknown()
91 static void do_test(int fd, size_t size, enum test_type type, bool shared) in do_test() argument
112 shared ? MAP_SHARED : MAP_PRIVATE, fd, 0); in do_test()
114 if (size == pagesize || shared) in do_test()
122 * Fault in the page writable such that GUP-fast can eventually pin in do_test()
143 if (rw && shared && fs_is_unknown(fs_type)) { in do_test()
149 * expected to work. Otherwise, we expect long-term R/W pinning in do_test()
152 should_work = !shared || !rw || in do_test()
175 * TODO: if the kernel ever supports long-term R/W pinning on in do_test()
188 if (shared && fs_is_unknown(fs_type)) { in do_test()
192 should_work = !shared || in do_test()
378 "R/W longterm GUP pin in MAP_SHARED file mapping",
382 "R/W longterm GUP-fast pin in MAP_SHARED file mapping",
386 "R/O longterm GUP pin in MAP_SHARED file mapping",
390 "R/O longterm GUP-fast pin in MAP_SHARED file mapping",
394 "R/W longterm GUP pin in MAP_PRIVATE file mapping",
398 "R/W longterm GUP-fast pin in MAP_PRIVATE file mapping",
402 "R/O longterm GUP pin in MAP_PRIVATE file mapping",
406 "R/O longterm GUP-fast pin in MAP_PRIVATE file mapping",
425 run_with_memfd(test_case->fn, test_case->desc); in run_test_case()
426 run_with_tmpfile(test_case->fn, test_case->desc); in run_test_case()
427 run_with_local_tmpfile(test_case->fn, test_case->desc); in run_test_case()
429 run_with_memfd_hugetlb(test_case->fn, test_case->desc, in run_test_case()