Skip to content

Commit de16d6e

Browse files
Michal Hockoakpm00
Michal Hocko
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. [akpm@linux-foundation.org: update comments, per Roman] Link: https://lkml.kernel.org/r/Y4m8Unt6FhWKC6IH@dhcp22.suse.cz Fixes: 1813e51 ("memcg: increase MEMCG_CHARGE_BATCH to 64") Signed-off-by: Michal Hocko <mhocko@suse.com> Reported-by: kernel test robot <yujie.liu@intel.com> Link: https://lore.kernel.org/oe-lkp/202212010958.c1053bd3-yujie.liu@intel.com Acked-by: Shakeel Butt <shakeelb@google.com> Acked-by: Roman Gushchin <roman.gushchin@linux.dev> Tested-by: Yujie Liu <yujie.liu@intel.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Feng Tang <feng.tang@intel.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: "Michal Koutný" <mkoutny@suse.com> Cc: Muchun Song <songmuchun@bytedance.com> Cc: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
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)