[Devel] [PATCH rh7] ub: hide dcachesize and oomguarpages in ub cgroup

Vladimir Davydov vdavydov at parallels.com
Wed Jun 10 02:47:16 PDT 2015


The knobs for dcachesize and oomguarpages are useless, just like for
physpages, swappages, and kmemsize, because the underlying resources are
managed by memcg.

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

diff --git a/kernel/bc/beancounter.c b/kernel/bc/beancounter.c
index 61a0b5528af0..02ff31f6514a 100644
--- a/kernel/bc/beancounter.c
+++ b/kernel/bc/beancounter.c
@@ -761,9 +761,12 @@ static __init int ub_cgroup_init(void)
 		if (!strcmp(ub_rnames[i], "dummy"))
 			continue;
 
+		/* accounted by memcg */
 		if (i == UB_PHYSPAGES ||
 		    i == UB_SWAPPAGES ||
-		    i == UB_KMEMSIZE)
+		    i == UB_OOMGUARPAGES ||
+		    i == UB_KMEMSIZE ||
+		    i == UB_DCACHESIZE)
 			continue;
 
 		cft = &cgroup_files[j * UB_CGROUP_NR_ATTRS];
-- 
2.1.4




More information about the Devel mailing list