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

Vladimir Davydov vdavydov at virtuozzo.com
Mon May 16 03:06:12 PDT 2016


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 b04ea13d9fad..4c02d4f739ee 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);
-- 
2.1.4



More information about the Devel mailing list