mem/oom: fork may fail before test
PATCH 1/1 mem/oom: fork may fail before test
On systems with small RAM and vm.overcommit_memory == 2, the system may already be in state where Committed_AS is larger than CommitLimit due to various backround daemons (NM, tuned, polkitd,...) asking for big allocations.
In such instances oom testcases report TBROK on very first fork. This patch allows this to be a valid outcome (TPASS).
--- testcases/kernel/mem/lib/mem.c | 4 ++++ 1 file changed, 4 insertions(+)
testcases/kernel/mem/lib/mem.c +4 -0
@@ -127,6 +127,10 @@ void oom(int testcase, int lite, int retcode, int allow_sigkill)switch (pid =fork ()) {case -1 : +if (errno == retcode) { +tst_resm (TPASS |TERRNO ,"fork" ); +return ; + }tst_brkm (TBROK |TERRNO , cleanup,"fork" );case 0 : threads =MAX (1 ,tst_ncpus () -1 );
Signature · 1 line
1.8.3.1
PATCH 1/1 mem/oom: fork may fail before test
Hi!
Quoted 7 lines
On systems with small RAM and vm.overcommit_memory == 2, the system may already be in state where
Committed_ASis larger than CommitLimit due to various backround daemons (NM, tuned, polkitd,...) asking for big allocations.In such instances oom testcases report TBROK on very first fork. This patch allows this to be a valid outcome (TPASS).
Looks good to me, acked.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 mem/oom: fork may fail before test
----- Original Message -----
Quoted 12 lines
From: "Cyril Hrubis" <[email protected]>
To: "Jan Stancek" <[email protected]>
Cc: [email protected]
Sent: Monday, 23 May, 2016 4:36:11 PM
Subject: Re: [LTP] [PATCH] mem/oom: fork may fail before testHi!
Quoted 5 lines
On systems with small RAM and vm.overcommit_memory == 2, the system may already be in state where
Committed_ASis larger than CommitLimit due to various backround daemons (NM, tuned, polkitd,...) asking for big allocations.
Quoted 4 lines
Quoted 2 lines
In such instances oom testcases report TBROK on very first fork. This patch allows this to be a valid outcome (TPASS).
Looks good to me, acked.
Pushed.
Regards,
Jan
Quoted 5 lines
--
Cyril Hrubis
[email protected]