Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp1951671rwa; Sun, 21 Aug 2022 22:10:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR46nXiTJVmbKWkBBZ6kLRTYCdzYP3+DV32OegAA+7A5nw9KEe8IeVgnhYeOqG8dtcfuXt8N X-Received: by 2002:a05:6402:22b8:b0:445:fb3f:dc3d with SMTP id cx24-20020a05640222b800b00445fb3fdc3dmr14944089edb.378.1661145026552; Sun, 21 Aug 2022 22:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661145026; cv=none; d=google.com; s=arc-20160816; b=zwJJuoWTanmVSbNEeAEOoKhBGQt5EL8y6s2c5SdBA1H5lFbBKCHC+70txVvAQznjcD IZzgidNIqC6rQOiIK5Q1GQT0Wf8qtLnzMvxieNge5yZBzbXVTBE66eFVW+/VycpUBBVH ljxTcrja3pGxK7JbR2u6NSdz8IcwfX0OzuAp7ajaqeVJ09EgcppgNr0M/VICdZHpOd2+ 83gBrKCDX/QXOTqclmDtbsMFcdDWf90IvRzrdmltAqKiDzKZpiv+LkJoVkqYc3SmDURU bkL9V64eZzHE3koE1QHTRyoWYa1/S9tcCSSILwx2HrymbhBEdbjo06CsQxn5bwCLc1xw nJtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=UQyYzuIqErSYNpXSPcyyYCDze0E5q1hH3djW+ifHVA0=; b=eoJ/znCnBk9ryyVYP2kq9vTNJFJNU3eGwI99Lj3Yf5sm6Dn8Hj/WrApw13fWRzYXBq tG9fxRFlrcC6pFfkpo81gFD5WRXWgxq8tTjUcKgyAJAgbbA+yW8Um+LB4yfMROgLTV77 bvl+Jsbelk1VJb4grET3R7o3T4Tbqxp7KBYyIabr5N4Bm5s+LP7VWwLJkhQosS8+sUt+ iH/dEL+l7loLI+0JeNMELOeNEEm+cAu/A1dgvr4JHbszF2t2Puet6i7kIc26WQ7yXGRJ zIEC3ssC63Hd5CGlQXRwGNCaaQKj4c02WaHKfTIKsftVZs5Nkkrhwsb1AYhlh8ZTymRV WgZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=sQogaDyt; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c1-20020a0564021f8100b004408bac1e2fsi8748568edc.370.2022.08.21.22.09.52; Sun, 21 Aug 2022 22:10:26 -0700 (PDT) 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=@google.com header.s=20210112 header.b=sQogaDyt; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232432AbiHVEzo (ORCPT + 99 others); Mon, 22 Aug 2022 00:55:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232178AbiHVEzl (ORCPT ); Mon, 22 Aug 2022 00:55:41 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BC6421E00 for ; Sun, 21 Aug 2022 21:55:40 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id u12so1338716pgb.6 for ; Sun, 21 Aug 2022 21:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=UQyYzuIqErSYNpXSPcyyYCDze0E5q1hH3djW+ifHVA0=; b=sQogaDyt/YhpygyRGgMyaHCv0VOamZixo/4B/ibABXtfYnQfnh2zY0PJ9hcXiuWrwc V7pZWCjvjMAhQ491/pnuGeBUUob3BVAPIMq/UWvptHivoFEinydielWpJZ6z/8ZBRi4g XXqzXmysjNpz0hcoAzui5KmdedanBMXjjxZ7VLG4hKRRlp60VXFFTApNlYaepatOociJ XNaou/BWfXRcEG4pA915J3VIvSGIScoB8vTFABeGU7U4lEaKyPexlf7eHNiEhLoudZ15 SUaQU0pEZcUyPg6f1y9pvpdNqao8WSeAfTRz1HCkEfaaxvAvmd0AvlTziqGVJDO9P90X S+7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=UQyYzuIqErSYNpXSPcyyYCDze0E5q1hH3djW+ifHVA0=; b=mKxBdI4V6YYOS6KOlCp4/z5yCuOBi+HWlVworZXZZj3YPvq7lGfYqM7nxYR7ejIRjw 9Rhds1JTmGI+614vu5NFSz0ULmvaY3QuvpoB15chjhJtUydInfO5NsdC23IuSgry+VFs igL+OO4PQZUKkX516E5znRci7Ui5UHmr0oHZaiW9A1wnoEYoAjbAGrRQCtn2AtgbxIB0 eE5ayYJBiuIxGdOZtJ/rbjrsSkic3YdOnuVxjdsz8OWAPiTEQlpVpcGCMkyShKxr42cG OhL3j/wQ0SsRtqfCsxu7/ZvKasYf0i8Cv2/q1Er79ZxCD25fzJH+ZdoDmQDu8HV4+lzq rHXw== X-Gm-Message-State: ACgBeo3/uUWZGIAyRPssvkci0/gFQVZWTENINyERL2D3LJ59V/WrdJf7 OmtAgrdmXGP48HPJ3UPnnl4+WAOScMRLnzmbsPiWsA== X-Received: by 2002:a62:6497:0:b0:52e:e0cd:1963 with SMTP id y145-20020a626497000000b0052ee0cd1963mr19184795pfb.58.1661144139828; Sun, 21 Aug 2022 21:55:39 -0700 (PDT) MIME-Version: 1.0 References: <20220822001737.4120417-1-shakeelb@google.com> <20220822001737.4120417-3-shakeelb@google.com> In-Reply-To: From: Shakeel Butt Date: Sun, 21 Aug 2022 21:55:28 -0700 Message-ID: Subject: Re: [PATCH 2/3] mm: page_counter: rearrange struct page_counter fields To: Soheil Hassas Yeganeh Cc: Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Eric Dumazet , Feng Tang , Oliver Sang , Andrew Morton , lkp@lists.01.org, Cgroups , linux-mm , netdev , linux-kernel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 21, 2022 at 5:24 PM Soheil Hassas Yeganeh wrote: > > On Sun, Aug 21, 2022 at 8:18 PM Shakeel Butt wrote: > > > > With memcg v2 enabled, memcg->memory.usage is a very hot member for > > the workloads doing memcg charging on multiple CPUs concurrently. > > Particularly the network intensive workloads. In addition, there is a > > false cache sharing between memory.usage and memory.high on the charge > > path. This patch moves the usage into a separate cacheline and move all > > the read most fields into separate cacheline. > > > > To evaluate the impact of this optimization, on a 72 CPUs machine, we > > ran the following workload in a three level of cgroup hierarchy with top > > level having min and low setup appropriately. More specifically > > memory.min equal to size of netperf binary and memory.low double of > > that. > > > > $ netserver -6 > > # 36 instances of netperf with following params > > $ netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- -m 10K > > > > Results (average throughput of netperf): > > Without (6.0-rc1) 10482.7 Mbps > > With patch 12413.7 Mbps (18.4% improvement) > > > > With the patch, the throughput improved by 18.4%. > > Shakeel, for my understanding: is this on top of the gains from the > previous patch? > No, this is independent of the previous patch. The cover letter has the numbers for all three optimizations applied together.