Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp788669rdg; Wed, 11 Oct 2023 05:46:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmN0GBYLqIFgFrA5PQ21wIrRE5ouDagggjetvHIfIosYnSx14qfLIujTMHrT+30GrPqqTG X-Received: by 2002:a05:6a21:6d98:b0:138:92ef:78f9 with SMTP id wl24-20020a056a216d9800b0013892ef78f9mr22339846pzb.6.1697028388867; Wed, 11 Oct 2023 05:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697028388; cv=none; d=google.com; s=arc-20160816; b=vC+XqEU8LNcxOmEmS9S7+SLbq+iEVOH5XC3d0D7slM3eESJKvPEk0VV9TozAcCNKch qQDC4wRfdu6ZIeHrZWIRybU4ID2slVOmhK0w/q9lqyFpXURx+uj9yAMOhrw/7M/Fyguw TscID+cltsx2/gfon0EZW98Mf9PGZ8vLhgoK4bDh9XIwQv/Q73nu18ewZK9v4hw8nbXl 5kB1QkIjyAcKilLS4K1H+h+sN4gy6NcVrtjW8pUmHRs82+8MTyW1GpbHGhKQuIPKO8ei FqGix+6gzHRW4uzkky+twGt0tPRz0lArbt9/1EWA53WZMrGsxLPrjKtKXXHhSlqzQ1qR /pTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=vRxnYW++U+8TlQsWmKaGw4xOnyl04ESkzrCSiOYHMOw=; fh=FliBBm5o+YgmQVfOIrBzy/uWPpKZJLxbs5bNc203T7I=; b=KYeb6FVp38cUhfsuFi/P98DixUSraPM1aKloTU4ZmsG/wtUICeJlNC+n3DFPpjOUbj Tn7HN4S1buZGsOCwJn+E57i6s5p94xbyVELcM1nvh4vxm72nFmF7WQPXxwuc0QRNQFlA FJvnt0eBRH3q/Ym0Y8ncjVzYus2Bz6Y01iZtbxZ+CaQ6dqp9LyCu8n2EVtmaqAoEdD5q vww92TIix3bXrBqIoZXwF+Fcd1ftQi3VnycMbL2XCBBAk3TqQ3AihJmqimMnZqdc2sEh lJ8xBrjBDYMWSIuQcnlDkoZ/Cu2ymTzQbCoucHUFuGDQHrtdDXnAMa3qmK29Zs74s3b0 C38w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=qAp+K8S1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id m9-20020a654389000000b0059c36d79520si3515019pgp.772.2023.10.11.05.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 05:46:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=qAp+K8S1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id F29F7801B394; Wed, 11 Oct 2023 05:46:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346422AbjJKMqP (ORCPT + 99 others); Wed, 11 Oct 2023 08:46:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234887AbjJKMqO (ORCPT ); Wed, 11 Oct 2023 08:46:14 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17F5AAF for ; Wed, 11 Oct 2023 05:46:11 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1c9d4f08d7cso37045ad.0 for ; Wed, 11 Oct 2023 05:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697028370; x=1697633170; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vRxnYW++U+8TlQsWmKaGw4xOnyl04ESkzrCSiOYHMOw=; b=qAp+K8S1JOrv4Vc471JGQA+DzbmURcp2VnW7zVvKSnLxZcsqjnvD1EyFbYWy1yQvcJ cC/z2Gw/e7ugaCWm7gjfZbQq8y6s9fcVGTPFdmA3pZnXuKwoVue/Pr6fGZugZM1pbCOA BCS7SB0cbmfxRkcoB3pmxGYZh0BMHry3B4igIIPD8A23wjI+Kagc5TbzRRrhXBPgj0v6 OgfH9rmczoqwjJhdQwQ83Zy0/Fqcmb5L9QumXCStW6VyUDmlYu7+ig0uC6AI+p7Lxy5v aU+UOtCe6vztHNA/UZfIsVQiTrp5GG80RnnsYi70iuwcRsh+/UVg+1iuMnliz8oT9+RW jx3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697028370; x=1697633170; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vRxnYW++U+8TlQsWmKaGw4xOnyl04ESkzrCSiOYHMOw=; b=oz6PqrIjOMF3feuK9v5xXHig/QReH08COXeecbkFGlPO31S2im/TR6ewpN2fzgQ6lY ITb2mKsV6qO/oiYL+XtYPLkjNovgp5bg0bn/kXct6nqK+oc7P735H3c1sKhPWDkvaSmn GxQbX/yvvhszGwKnDjp23LJzwsg4SUK0mYmcZE02DhIxF4ZhEWJpF5PbGURTAcOaxyyJ ZKmF8i+n/rxmViCK6m9Wc3R59GlTTNxDuSU5n0FX+ksNB+H2iOnnhnQTF+21AZOnPyRK rGfa6868HwswrlzriUVhtQkdyL+Ub13KzyMBYOB6+AtCAywF/j926Fu3V+RkSA58emvL li+A== X-Gm-Message-State: AOJu0YzleN+w+2OQ4ksLjCI1bs8E5MkDPWCoXm/qbOXqesc6RXhvku+j CiuokIVtKrT5OLqDZceJVg7Wecw9l8YBJT0Oajpoug== X-Received: by 2002:a17:902:ecc9:b0:1c6:212f:c8e5 with SMTP id a9-20020a170902ecc900b001c6212fc8e5mr218432plh.26.1697028370195; Wed, 11 Oct 2023 05:46:10 -0700 (PDT) MIME-Version: 1.0 References: <20231010032117.1577496-1-yosryahmed@google.com> <20231010032117.1577496-4-yosryahmed@google.com> <20231011003646.dt5rlqmnq6ybrlnd@google.com> In-Reply-To: From: Shakeel Butt Date: Wed, 11 Oct 2023 05:45:58 -0700 Message-ID: Subject: Re: [PATCH v2 3/5] mm: memcg: make stats flushing threshold per-memcg To: Yosry Ahmed Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Ivan Babrou , Tejun Heo , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Waiman Long , kernel-team@cloudflare.com, Wei Xu , Greg Thelen , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 11 Oct 2023 05:46:26 -0700 (PDT) On Tue, Oct 10, 2023 at 6:48=E2=80=AFPM Yosry Ahmed = wrote: > > On Tue, Oct 10, 2023 at 5:36=E2=80=AFPM Shakeel Butt wrote: > > > > On Tue, Oct 10, 2023 at 03:21:47PM -0700, Yosry Ahmed wrote: > > [...] > > > > > > I tried this on a machine with 72 cpus (also ixion), running both > > > netserver and netperf in /sys/fs/cgroup/a/b/c/d as follows: > > > # echo "+memory" > /sys/fs/cgroup/cgroup.subtree_control > > > # mkdir /sys/fs/cgroup/a > > > # echo "+memory" > /sys/fs/cgroup/a/cgroup.subtree_control > > > # mkdir /sys/fs/cgroup/a/b > > > # echo "+memory" > /sys/fs/cgroup/a/b/cgroup.subtree_control > > > # mkdir /sys/fs/cgroup/a/b/c > > > # echo "+memory" > /sys/fs/cgroup/a/b/c/cgroup.subtree_control > > > # mkdir /sys/fs/cgroup/a/b/c/d > > > # echo 0 > /sys/fs/cgroup/a/b/c/d/cgroup.procs > > > # ./netserver -6 > > > > > > # echo 0 > /sys/fs/cgroup/a/b/c/d/cgroup.procs > > > # for i in $(seq 10); do ./netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- > > > -m 10K; done > > > > You are missing '&' at the end. Use something like below: > > > > #!/bin/bash > > for i in {1..22} > > do > > /data/tmp/netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- -m 10K & > > done > > wait > > > > Oh sorry I missed the fact that you are running instances in parallel, my= bad. > > So I ran 36 instances on a machine with 72 cpus. I did this 10 times > and got an average from all instances for all runs to reduce noise: > > #!/bin/bash > > ITER=3D10 > NR_INSTANCES=3D36 > > for i in $(seq $ITER); do > echo "iteration $i" > for j in $(seq $NR_INSTANCES); do > echo "iteration $i" >> "out$j" > ./netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- -m 10K >> "out$j" & > done > wait > done > > cat out* | grep 540000 | awk '{sum +=3D $5} END {print sum/NR}' > > Base: 22169 mbps > Patched: 21331.9 mbps > > The difference is ~3.7% in my runs. I am not sure what's different. > Perhaps it's the number of runs? My base kernel is next-20231009 and I am running experiments with hyperthreading disabled.