• Eric B Munson's avatar
    selftests: vm: add tests for lock on fault · b3b0d09c
    Eric B Munson authored
    Test the mmap() flag, and the mlockall() flag.  These tests ensure that
    pages are not faulted in until they are accessed, that the pages are
    unevictable once faulted in, and that VMA splitting and merging works with
    the new VM flag.  The second test ensures that mlock limits are respected.
     Note that the limit test needs to be run a normal user.
    
    Also add tests to use the new mlock2 family of system calls.
    
    [treding@nvidia.com: : Fix mlock2-tests for 32-bit architectures]
    [treding@nvidia.com: ensure the mlock2 syscall number can be found]
    [treding@nvidia.com: use the right arguments for main()]
    Signed-off-by: default avatarEric B Munson <emunson@akamai.com>
    Cc: Shuah Khan <shuahkh@osg.samsung.com>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Geert Uytterhoeven <geert@linux-m68k.org>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Cc: Michael Kerrisk <mtk.manpages@gmail.com>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b3b0d09c
on-fault-limit.c 819 Bytes