Patch "kselftest: fix OOM in memory compaction test" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
kselftest: fix OOM in memory compaction test
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
kselftest-fix-oom-in-memory-compaction-test.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
4c1baad223906943b595a887305f2e8124821dadMon Sep 17 00:00:00 2001
From: Arnd Bergmann <[email protected]>
Date: Tue, 9 Jan 2018 17:26:24 +0100
Subject: kselftest: fix OOM in memory compaction test
From: Arnd Bergmann <[email protected]>
commit 4c1baad223906943b595a887305f2e8124821dad upstream.
Running the compaction_test sometimes results in out-of-memory failures. When I debugged this, it turned out that the code to reset the number of hugepages to the initial value is simply broken since we write into an open sysctl file descriptor multiple times without seeking back to the start.
Adding the lseek here fixes the problem.
--- tools/testing/selftests/vm/compaction_test.c | 2 ++ 1 file changed, 2 insertions(+)
tools/testing/selftests/vm/compaction_test.c +2 -0
@@ -137,6 +137,8 @@ int check_compaction(unsigned long mem_fprintf ("No of huge pages allocated = %d\n" , (atoi (nr_hugepages))); +lseek (fd,0 ,SEEK_SET ); +if (write (fd, initial_nr_hugepages,strlen (initial_nr_hugepages)) !=strlen (initial_nr_hugepages)) {perror ("Failed to write value to /proc/sys/vm/nr_hugepages\n" );
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/kselftest-fix-oom-in-memory-compaction-test.patch queue-4.14/tracing-prevent-profile_all_branches-when-fortify_source-y.patch