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()
121 /* Fault in the page such that GUP-fast can pin it directly. */ in do_test()
129 * long-term R/O pinning by mapping the page R/O. in do_test()
150 if (rw && shared && fs_is_unknown(fs_type)) { in do_test()
156 * expected to work. Otherwise, we expect long-term R/W pinning in do_test()
159 should_work = !shared || !rw || in do_test()
182 * TODO: if the kernel ever supports long-term R/W pinning on in do_test()
195 if (shared && fs_is_unknown(fs_type)) { in do_test()
199 should_work = !shared || in do_test()
387 "R/W longterm GUP pin in MAP_SHARED file mapping",
391 "R/W longterm GUP-fast pin in MAP_SHARED file mapping",
395 "R/O longterm GUP pin in MAP_SHARED file mapping",
399 "R/O longterm GUP-fast pin in MAP_SHARED file mapping",
403 "R/W longterm GUP pin in MAP_PRIVATE file mapping",
407 "R/W longterm GUP-fast pin in MAP_PRIVATE file mapping",
411 "R/O longterm GUP pin in MAP_PRIVATE file mapping",
415 "R/O longterm GUP-fast pin in MAP_PRIVATE file mapping",
434 run_with_memfd(test_case->fn, test_case->desc); in run_test_case()
435 run_with_tmpfile(test_case->fn, test_case->desc); in run_test_case()
436 run_with_local_tmpfile(test_case->fn, test_case->desc); in run_test_case()
438 run_with_memfd_hugetlb(test_case->fn, test_case->desc, in run_test_case()