Message ID | Y4m8Unt6FhWKC6IH@dhcp22.suse.cz |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp722512wrr; Fri, 2 Dec 2022 00:57:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf611Hep1qk97lWgyCNQEE0Os+wmI9o30vfqo4ZxMjIcLiSb8ZAgV9xSkEHRtKWdYkhFvq02 X-Received: by 2002:a17:906:298c:b0:7c0:7d08:bfc with SMTP id x12-20020a170906298c00b007c07d080bfcmr17889857eje.72.1669971463188; Fri, 02 Dec 2022 00:57:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669971463; cv=none; d=google.com; s=arc-20160816; b=b1DP/lv6cFqoAIdsmzxce2yUao5QPmuVC8TG+D+fkfnGujG7QxNO1CjVC+8L5vAh3R YDP8ayMemUDm7zYcj5RHQ2Mbm7O/9sz/+EETx5l3MAU5ku6V2brsWTf22xBwQQrfcRmL Bxw9aeJNBFz1tW4Ch45/pUQOyVO3coliCVlFMrpDHQF33yh+Ffdxu+LEXm4BirZgxB8L GtHwLdBw17/XQewPkLCnzq4fwhANgkRfzI/6kWAlA0XGDuCpN15TdA/28i4mhvBucHud Vh07BNSmpSQ3FclrfcFTa3MoqP508nXLRyWds4n5zWBKWdzafmx6KlcghpsWWjB0NRec ei5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=LZIm84O2bOoJ4U2lQJhS8k8kVVfk2BSguwHQiEl9M5c=; b=txAOPvZykuJHxhNTdztx2j1B1LOKsqDfUdpXvAlkLXSZHat/KWO2qb3Se5ZXQ2gci/ 4nu09+9NTqKgWDGnPw0cKvnAMAFszy5M0nPFx7kiFqMb+IiqPWIBMTcUEkTQnVWXoDrU JHbfxrwifdy47zacATpLx0WLnNYniotEhB5LYS+S0AWyjRcydD2tRFmrQ/TTXlqe3ADX 6WXmFfnLravvaR53JKUCdyQC8y6IviEW79smMNOvPspGfZ90oMpLVkW700L8eMsFadsi GqYqtRX8zBdC3bGUv2odpW3jUuEs9ZBIQfa2SCo8yxeAE4tgSBoQyw7Slzx20ccf2CAJ befA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=bUk3okfz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a056402520700b0046baa297047si6771430edd.361.2022.12.02.00.57.19; Fri, 02 Dec 2022 00:57:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=bUk3okfz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232512AbiLBIud (ORCPT <rfc822;heyuhang3455@gmail.com> + 99 others); Fri, 2 Dec 2022 03:50:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232608AbiLBIua (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 2 Dec 2022 03:50:30 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63C69B0A28 for <linux-kernel@vger.kernel.org>; Fri, 2 Dec 2022 00:50:28 -0800 (PST) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0BC3C1FE16; Fri, 2 Dec 2022 08:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1669971027; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LZIm84O2bOoJ4U2lQJhS8k8kVVfk2BSguwHQiEl9M5c=; b=bUk3okfzs0YoxvvN5f+8+xRn5zpW4Gi8OmvjTDMX8cYsCbH0Vu7ctaHt/1juowu6cw8hR5 11ok1o+tPH4vwlJ/kIIWjQScvYCPvPQjQdw8BoPTom8tZJMJ0GlXr0gWN8dICTztWxDfKY tz0fTw31190RQHEkhH9cA3w4QatgETI= Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id E0DC9133DE; Fri, 2 Dec 2022 08:50:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id c4f6M1K8iWMiMgAAGKfGzw (envelope-from <mhocko@suse.com>); Fri, 02 Dec 2022 08:50:26 +0000 Date: Fri, 2 Dec 2022 09:50:26 +0100 From: Michal Hocko <mhocko@suse.com> To: kernel test robot <yujie.liu@intel.com> Cc: Shakeel Butt <shakeelb@google.com>, oe-lkp@lists.linux.dev, lkp@intel.com, Andrew Morton <akpm@linux-foundation.org>, kernel test robot <oliver.sang@intel.com>, Soheil Hassas Yeganeh <soheil@google.com>, Feng Tang <feng.tang@intel.com>, Roman Gushchin <roman.gushchin@linux.dev>, Muchun Song <songmuchun@bytedance.com>, Eric Dumazet <edumazet@google.com>, Johannes Weiner <hannes@cmpxchg.org>, Michal =?iso-8859-1?q?Koutn=FD?= <mkoutny@suse.com>, linux-kernel@vger.kernel.org Subject: [PATCH] kselftests: cgroup: update kmem test precision tolerance Message-ID: <Y4m8Unt6FhWKC6IH@dhcp22.suse.cz> References: <202212010958.c1053bd3-yujie.liu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202212010958.c1053bd3-yujie.liu@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751091996962968938?= X-GMAIL-MSGID: =?utf-8?q?1751091996962968938?= |
Series |
kselftests: cgroup: update kmem test precision tolerance
|
|
Commit Message
Michal Hocko
Dec. 2, 2022, 8:50 a.m. UTC
OK, so this is a full patch to fix this --- From 7f338ed952ba4a100822004bc8399bf720b42899 Mon Sep 17 00:00:00 2001 From: Michal Hocko <mhocko@suse.com> Date: Fri, 2 Dec 2022 09:45:29 +0100 Subject: [PATCH] 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. Reported-by: kernel test robot <yujie.liu@intel.com> Link: https://lore.kernel.org/oe-lkp/202212010958.c1053bd3-yujie.liu@intel.com Signed-off-by: Michal Hocko <mhocko@suse.com> --- tools/testing/selftests/cgroup/test_kmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Fri, Dec 02, 2022 at 09:50:26AM +0100, Michal Hocko wrote: > OK, so this is a full patch to fix this > --- > From 7f338ed952ba4a100822004bc8399bf720b42899 Mon Sep 17 00:00:00 2001 > From: Michal Hocko <mhocko@suse.com> > Date: Fri, 2 Dec 2022 09:45:29 +0100 > Subject: [PATCH] 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. > > Reported-by: kernel test robot <yujie.liu@intel.com> > Link: https://lore.kernel.org/oe-lkp/202212010958.c1053bd3-yujie.liu@intel.com > Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Shakeel Butt <shakeelb@google.com>
On Fri, Dec 02, 2022 at 09:50:26AM +0100, Michal Hocko wrote: > OK, so this is a full patch to fix this > --- > From 7f338ed952ba4a100822004bc8399bf720b42899 Mon Sep 17 00:00:00 2001 > From: Michal Hocko <mhocko@suse.com> > Date: Fri, 2 Dec 2022 09:45:29 +0100 > Subject: [PATCH] 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. > > Reported-by: kernel test robot <yujie.liu@intel.com> > Link: https://lore.kernel.org/oe-lkp/202212010958.c1053bd3-yujie.liu@intel.com > Signed-off-by: Michal Hocko <mhocko@suse.com> > --- > tools/testing/selftests/cgroup/test_kmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/cgroup/test_kmem.c b/tools/testing/selftests/cgroup/test_kmem.c > index 22b31ebb3513..1d073e28254b 100644 > --- a/tools/testing/selftests/cgroup/test_kmem.c > +++ b/tools/testing/selftests/cgroup/test_kmem.c > @@ -24,7 +24,7 @@ > * the maximum discrepancy between charge and vmstat entries is number > * of cpus multiplied by 32 pages. > */ > -#define MAX_VMSTAT_ERROR (4096 * 32 * get_nprocs()) > +#define MAX_VMSTAT_ERROR (4096 * 64 * get_nprocs()) Hi Michal! You need to update comments above too (it says 32 pages in a couple of places). I actually sent the similar patch to Andrew yesterday, but hit reply and missed adding people to cc. Please, feel free to send your v2 with comments fixed and my acked-by, or we can go with my version. Thanks! -- From 354850a59bb8e000490a23bc768f4d3183faf8e4 Mon Sep 17 00:00:00 2001 From: Roman Gushchin <roman.gushchin@linux.dev> Date: Thu, 1 Dec 2022 18:05:07 -0800 Subject: [PATCH] kselftests/cgroup: adjust memcg charge batch size Commit 1813e51eece0 ("memcg: increase MEMCG_CHARGE_BATCH to 64") doubled the memcg charge batch size, which broke the kmem_memcg_deletion test. Bump the corresponding error margin on the test side to fix the problem. Reported-by: kernel test robot <yujie.liu@intel.com> Link: https://lore.kernel.org/oe-lkp/202212010958.c1053bd3-yujie.liu@intel.com Fixes: 1813e51eece0 ("memcg: increase MEMCG_CHARGE_BATCH to 64") Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev> Cc: Michal Hocko <mhocko@suse.com> Cc: Shakeel Butt <shakeelb@google.com> --- tools/testing/selftests/cgroup/test_kmem.c | 6 +++--- 1 file 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) -- 2.38.1
On Fri, Dec 02, 2022 at 09:50:26AM +0100, Michal Hocko wrote: > OK, so this is a full patch to fix this > --- > From 7f338ed952ba4a100822004bc8399bf720b42899 Mon Sep 17 00:00:00 2001 > From: Michal Hocko <mhocko@suse.com> > Date: Fri, 2 Dec 2022 09:45:29 +0100 > Subject: [PATCH] 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. > > Reported-by: kernel test robot <yujie.liu@intel.com> > Link: https://lore.kernel.org/oe-lkp/202212010958.c1053bd3-yujie.liu@intel.com > Signed-off-by: Michal Hocko <mhocko@suse.com> The failure is gone after applying this patch. Thanks. Tested-by: Yujie Liu <yujie.liu@intel.com> ========================================================================================= compiler/group/kconfig/rootfs/tbox_group/testcase: gcc-11/cgroup/x86_64-rhel-8.3-kselftests/debian-12-x86_64-20220629.cgz/lkp-icl-2sp5/kernel-selftests commit: 1813e51eece0a ("memcg: increase MEMCG_CHARGE_BATCH to 64") 8046f9500f4b7 ("kselftests: cgroup: update kmem test precision tolerance") 1813e51eece0a 8046f9500f4b7 ---------------- ------------- ------------- fail:runs %reproduction fail:runs | | | 3:3 -100% :5 kernel-selftests.cgroup.test_kmem.test_kmem_memcg_deletion.fail > --- > tools/testing/selftests/cgroup/test_kmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/cgroup/test_kmem.c b/tools/testing/selftests/cgroup/test_kmem.c > index 22b31ebb3513..1d073e28254b 100644 > --- a/tools/testing/selftests/cgroup/test_kmem.c > +++ b/tools/testing/selftests/cgroup/test_kmem.c > @@ -24,7 +24,7 @@ > * the maximum discrepancy between charge and vmstat entries is number > * of cpus multiplied by 32 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) > -- > 2.30.2 > > -- > Michal Hocko > SUSE Labs
On Fri 02-12-22 09:16:17, Roman Gushchin wrote: > On Fri, Dec 02, 2022 at 09:50:26AM +0100, Michal Hocko wrote: > > OK, so this is a full patch to fix this > > --- > > From 7f338ed952ba4a100822004bc8399bf720b42899 Mon Sep 17 00:00:00 2001 > > From: Michal Hocko <mhocko@suse.com> > > Date: Fri, 2 Dec 2022 09:45:29 +0100 > > Subject: [PATCH] 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. > > > > Reported-by: kernel test robot <yujie.liu@intel.com> > > Link: https://lore.kernel.org/oe-lkp/202212010958.c1053bd3-yujie.liu@intel.com > > Signed-off-by: Michal Hocko <mhocko@suse.com> > > --- > > tools/testing/selftests/cgroup/test_kmem.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/testing/selftests/cgroup/test_kmem.c b/tools/testing/selftests/cgroup/test_kmem.c > > index 22b31ebb3513..1d073e28254b 100644 > > --- a/tools/testing/selftests/cgroup/test_kmem.c > > +++ b/tools/testing/selftests/cgroup/test_kmem.c > > @@ -24,7 +24,7 @@ > > * the maximum discrepancy between charge and vmstat entries is number > > * of cpus multiplied by 32 pages. > > */ > > -#define MAX_VMSTAT_ERROR (4096 * 32 * get_nprocs()) > > +#define MAX_VMSTAT_ERROR (4096 * 64 * get_nprocs()) > > Hi Michal! > > You need to update comments above too (it says 32 pages in a couple of places). > I actually sent the similar patch to Andrew yesterday, but hit reply and missed > adding people to cc. > > Please, feel free to send your v2 with comments fixed and my acked-by, > or we can go with my version. It seems Andrew has already done all the fixups. Thanks both to you and Andrew!
diff --git a/tools/testing/selftests/cgroup/test_kmem.c b/tools/testing/selftests/cgroup/test_kmem.c index 22b31ebb3513..1d073e28254b 100644 --- a/tools/testing/selftests/cgroup/test_kmem.c +++ b/tools/testing/selftests/cgroup/test_kmem.c @@ -24,7 +24,7 @@ * the maximum discrepancy between charge and vmstat entries is number * of cpus multiplied by 32 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)