Re: [PATCH 1/1] selftests/mm: new test that steals pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 09, 2024 at 09:47:31PM -0800, Andrew Morton wrote:
> On Fri,  5 Jan 2024 07:54:19 -0800 Breno Leitao <leitao@xxxxxxxxxx> wrote:
> 
> > This test stresses the race between of madvise(DONTNEED), a page fault
> > and a parallel huge page mmap, which should fail due to lack of
> > available page available for mapping.
> > 
> > This test case must run on a system with one and only one huge page
> > available.
> > 
> > 	# echo 1 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
> 
> Can't the test framework perform this configuration prior to running
> the test?

We have this infrastructure already set in the run_vmtest.sh.
The "hugetlb_fault_after_madv" selftest needs the same configuration,
so, once the fix is ready, we will just add something as:

	--- a/tools/testing/selftests/mm/run_vmtests.sh
	+++ b/tools/testing/selftests/mm/run_vmtests.sh
	@@ -227,6 +227,7 @@ nr_hugepages_tmp=$(cat /proc/sys/vm/nr_hugepages)
	 # For this test, we need one and just one huge page
	 echo 1 > /proc/sys/vm/nr_hugepages
	 CATEGORY="hugetlb" run_test ./hugetlb_fault_after_madv
	+CATEGORY="hugetlb" run_test ./hugetlb_madv_vs_map
	 # Restore the previous number of huge pages, since further tests rely on it
	 echo "$nr_hugepages_tmp" > /proc/sys/vm/nr_hugepages




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux