[LTP] [PATCH] mem/oom: remove non-existent case OVERCOMMIT from oom()

Han Pingtian hanpt@linux.vnet.ibm.com
Fri Jan 8 07:59:41 CET 2016


On Thu, Jan 07, 2016 at 06:57:20AM -0500, Jan Stancek wrote:
> 
> 
> ----- Original Message -----
> > From: "Han Pingtian" <hanpt@linux.vnet.ibm.com>
> > To: ltp@lists.linux.it
> > Sent: Monday, 28 December, 2015 8:49:19 AM
> > Subject: [LTP] [PATCH] mem/oom: remove non-existent case OVERCOMMIT from	oom()
> > 
> > Looks like there is no such a case "OVERCOMMIT" in oom(), so we can just
> > remove it.
> > 
> > Signed-off-by: Han Pingtian <hanpt@linux.vnet.ibm.com>
> 
> Reviewed-by: Jan Stancek <jstancek@redhat.com>
> 
> Looks good to me, regards,
> Jan
> 
Hi Jan,

Thanks for reviewing! I have another question: I think when
"overcommit_memory" being set to 1, mmap() will always succeed. It's
that correct? I read the code of kernel, looks like in
__vm_enough_memory(), if sysctl_overcommit_memory == OVERCOMMIT_ALWAYS,
it will always return 0. So I think in oom01.c, we should call the
testoom() as testoom(0, 0, 0, 1).


Thanks.



More information about the Ltp mailing list