[Devel] [PATCH RHEL7 COMMIT] ub: do not check overcommit for ub0

Konstantin Khorenko khorenko at virtuozzo.com
Tue May 17 09:36:09 PDT 2016


The commit is pushed to "branch-rh7-3.10.0-327.18.2.vz7.14.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.18.2.vz7.14.3
------>
commit 15bb4bcd006159ff6495e6669515e388c52de01a
Author: Vladimir Davydov <vdavydov at virtuozzo.com>
Date:   Tue May 17 20:36:09 2016 +0400

    ub: do not check overcommit for ub0
    
    It's just a waste of time. There's global vm.overcommit_memory parameter
    for handling ub0 case anyway.
    
    Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
---
 kernel/bc/vm_pages.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/bc/vm_pages.c b/kernel/bc/vm_pages.c
index b04ea13..4c02d4f 100644
--- a/kernel/bc/vm_pages.c
+++ b/kernel/bc/vm_pages.c
@@ -138,7 +138,7 @@ int ub_enough_memory(struct mm_struct *mm, long pages)
 	    ub->ub_parms[UB_PRIVVMPAGES].barrier)
 		return -ENOMEM;
 
-	if (ub_overcommit_memory)
+	if (ub == get_ub0() || ub_overcommit_memory)
 		return 0;
 
 	css = ub_get_mem_css(ub);


More information about the Devel mailing list