Skip to content

Commit de16d6e

Browse files
Michal Hockoakpm00
authored andcommitted
kselftests: cgroup: update kmem test precision tolerance
1813e51 ("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: 1813e51 ("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]>
1 parent f5ad508 commit de16d6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/testing/selftests/cgroup/test_kmem.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919

2020

2121
/*
22-
* Memory cgroup charging is performed using percpu batches 32 pages
22+
* Memory cgroup charging is performed using percpu batches 64 pages
2323
* big (look at MEMCG_CHARGE_BATCH), whereas memory.stat is exact. So
2424
* the maximum discrepancy between charge and vmstat entries is number
25-
* of cpus multiplied by 32 pages.
25+
* of cpus multiplied by 64 pages.
2626
*/
27-
#define MAX_VMSTAT_ERROR (4096 * 32 * get_nprocs())
27+
#define MAX_VMSTAT_ERROR (4096 * 64 * get_nprocs())
2828

2929

3030
static int alloc_dcache(const char *cgroup, void *arg)

0 commit comments

Comments
 (0)