aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Hocko <[email protected]>2022-12-02 09:50:26 +0100
committerAndrew Morton <[email protected]>2022-12-09 18:41:16 -0800
commitde16d6e4a9fb13d07c88d0e57754348662f53b23 (patch)
tree3b617ee3b4696d21e767e1ef2ecfbc05e004f35f
parentf5ad5083404bb56c9de777dccb68c6672ef6487e (diff)
kselftests: cgroup: update kmem test precision tolerance
1813e51eece0 ("memcg: increase MEMCG_CHARGE_BATCH to 64") has changed the batch size while this test case has been left behind. This has led to a test failure reported by test bot: not ok 2 selftests: cgroup: test_kmem # exit=1 Update the tolerance for the pcp charges to reflect the MEMCG_CHARGE_BATCH change to fix this. [[email protected]: update comments, per Roman] Link: https://lkml.kernel.org/r/[email protected] Fixes: 1813e51eece0a ("memcg: increase MEMCG_CHARGE_BATCH to 64") Signed-off-by: Michal Hocko <[email protected]> Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/oe-lkp/[email protected] Acked-by: Shakeel Butt <[email protected]> Acked-by: Roman Gushchin <[email protected]> Tested-by: Yujie Liu <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Feng Tang <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: "Michal Koutný" <[email protected]> Cc: Muchun Song <[email protected]> Cc: Soheil Hassas Yeganeh <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--tools/testing/selftests/cgroup/test_kmem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/cgroup/test_kmem.c b/tools/testing/selftests/cgroup/test_kmem.c
index 22b31ebb3513..258ddc565deb 100644
--- a/tools/testing/selftests/cgroup/test_kmem.c
+++ b/tools/testing/selftests/cgroup/test_kmem.c
@@ -19,12 +19,12 @@
/*
- * Memory cgroup charging is performed using percpu batches 32 pages
+ * Memory cgroup charging is performed using percpu batches 64 pages
* big (look at MEMCG_CHARGE_BATCH), whereas memory.stat is exact. So
* the maximum discrepancy between charge and vmstat entries is number
- * of cpus multiplied by 32 pages.
+ * of cpus multiplied by 64 pages.
*/
-#define MAX_VMSTAT_ERROR (4096 * 32 * get_nprocs())
+#define MAX_VMSTAT_ERROR (4096 * 64 * get_nprocs())
static int alloc_dcache(const char *cgroup, void *arg)