[Devel] [PATCH rh7] ub: reset UB_OOMGUARPAGES.held on css free

Vladimir Davydov vdavydov at parallels.com
Thu May 21 05:06:23 PDT 2015


This resource is now accounted by memcg, so it may be non-zero on
beancounter removal, which will result in a warning:

  Ub 101 helds 467137 in oomguarpages on put
  UB: leaked beancounter 101 (ffff8801083a0000)

Reset this resource on css free, just like we reset UB_PHYSPAGES,
UB_SWAPPAGES, and UB_KMEMSIZE.

Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
 kernel/bc/beancounter.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/bc/beancounter.c b/kernel/bc/beancounter.c
index 1b765e029c81..498d1d33db58 100644
--- a/kernel/bc/beancounter.c
+++ b/kernel/bc/beancounter.c
@@ -398,6 +398,7 @@ static inline int bc_verify_held(struct user_beancounter *ub)
 	ub->ub_parms[UB_KMEMSIZE].held = 0;
 	ub->ub_parms[UB_PHYSPAGES].held = 0;
 	ub->ub_parms[UB_SWAPPAGES].held = 0;
+	ub->ub_parms[UB_OOMGUARPAGES].held = 0;
 
 	clean = 1;
 	for (i = 0; i < UB_RESOURCES; i++)
-- 
1.7.10.4




More information about the Devel mailing list