aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/internal.h
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.com>2020-04-01 21:10:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-02 09:35:31 -0700
commiteea274d64e6ea8aff2224d33d0851133a84cc7b5 (patch)
tree5d124129147455f68cad8d4379e7a4440c348cc2 /mm/internal.h
parentmm/vmscan.c: do_try_to_free_pages(): clean code by removing unnecessary assignment (diff)
downloadwireguard-linux-eea274d64e6ea8aff2224d33d0851133a84cc7b5.tar.xz
wireguard-linux-eea274d64e6ea8aff2224d33d0851133a84cc7b5.zip
selftests: vm: drop dependencies on page flags from mlock2 tests
It was noticed that mlock2 tests are failing after 9c4e6b1a7027f ("mm, mlock, vmscan: no more skipping pagevecs") because the patch has changed the timing on when the page is added to the unevictable LRU list and thus gains the unevictable page flag. The test was just too dependent on the implementation details which were true at the time when it was introduced. Page flags and the timing when they are set is something no userspace should ever depend on. The test should be testing only for the user observable contract of the tested syscalls. Those are defined pretty well for the mlock and there are other means for testing them. In fact this is already done and testing for page flags can be safely dropped to achieve the aimed purpose. Present bits can be checked by /proc/<pid>/smaps RSS field and the locking state by VmFlags although I would argue that Locked: field would be more appropriate. Drop all the page flag machinery and considerably simplify the test. This should be more robust for future kernel changes while checking the promised contract is still valid. Fixes: 9c4e6b1a7027f ("mm, mlock, vmscan: no more skipping pagevecs") Reported-by: Rafael Aquini <aquini@redhat.com> Signed-off-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Rafael Aquini <aquini@redhat.com> Cc: Shakeel Butt <shakeelb@google.com> Cc: Eric B Munson <emunson@akamai.com> Cc: Shuah Khan <shuah@kernel.org> Cc: <stable@vger.kernel.org> Link: http://lkml.kernel.org/r/20200324154218.GS19542@dhcp22.suse.cz Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/internal.h')
0 files changed, 0 insertions, 0 deletions