Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2333732rwa; Mon, 22 Aug 2022 06:12:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR4/eU80qjXRBtQU3aRHA+GVu5mzutDlPrmg1+6QpPs5mIynlcv7WUtEI1m4NaI6cMrgeYMk X-Received: by 2002:a63:6b04:0:b0:42a:910f:2cde with SMTP id g4-20020a636b04000000b0042a910f2cdemr7382847pgc.59.1661173967486; Mon, 22 Aug 2022 06:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661173967; cv=none; d=google.com; s=arc-20160816; b=nQKj3UVyVr7Ig2v2yCq8qk4OlCwQxM9ZD/zsb9JQ7pwmhWYA8VOux/VM2eQk//gB+B BpYsxJFA1w1Uz7lXmOfdyJEOvrJLboUjyfLQqa6jvha1prpgAOYbgerIIF1nUXFdgHc9 YJ6bIMKLx2C5lhAbSz5Iy4ZqyUP7QgxXjea6wGHE+9MzRobTjXR7JCm+Sytm7921Gsse Na1om2opweg4M+3A9n8GHBlP82fagw3CmauYP248XV+/FuX8Z5xnEI+ypCVejcGoj9JJ swTgp/Lh+b3nsSY1A+GZQAx8scF6tVLJm+VelAzdAjfjAY5qDjjVQQTXZc3yqxlSAdvT FWnQ== 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=OO/3V/9VOGJvCqjEz1HGxPMCQzQjuOzsv8kdhtCYLqw=; b=rl8PWNaDrDzN+mYkZSxZxAK0lFaul4pt3idMHx2kulW4Nd38IEZtKjxOdauxmp1BAQ SbT1TEzMuBi2aEj8cYE/FE+FrZe8ydqWfqVZZlUJ+pIYugP/4mLEUeYv+heP1lzoMI+n rr3x6F4HwKHlPL7gIxVQ04P+JD02l/cwkpJjpIhIw/4p8G41jQewWztTM/EaMKFraaDe Umk6ObGB4CJAsl31CvO+Z9tgBX6ozhTETCIZoqZ5C+sDeWrnj7AlE4f+1zIybbPNHaP3 xl7u6wOJMHsunwpEuex/VuyOSmi9or9ALHGP4VQBnay2CoGbxPNl9mEVxGlybbck7VVo ZNZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=WKfZw4Bb; 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 mu15-20020a17090b388f00b001f303395c8esi18247822pjb.141.2022.08.22.06.12.34; Mon, 22 Aug 2022 06:12:47 -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=WKfZw4Bb; 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 S234842AbiHVNHX (ORCPT + 99 others); Mon, 22 Aug 2022 09:07:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234820AbiHVNHV (ORCPT ); Mon, 22 Aug 2022 09:07:21 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9C832E9DD for ; Mon, 22 Aug 2022 06:07:19 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id j21so15682953ejs.0 for ; Mon, 22 Aug 2022 06:07:19 -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=OO/3V/9VOGJvCqjEz1HGxPMCQzQjuOzsv8kdhtCYLqw=; b=WKfZw4BbbkDUPDHSI/rvUL2ko1UJNDsiGtR2Rh5cY+gXY86FXqXUlpI3YCUa9Zlr95 doiBj3WMDGjs5d9/HQhF2bOBYcP49NedwUoBAK6EYdEyPHE7KendVPC6BrVHwbnyfcFx K+TNRUSQDBEpAZbQ8LtznwcZXmtdHu37gf0Y5rCMZPXi2aA6DfSlyaTVvJgn8ZQx8fga 2wOnHBR9ICzQ9My0jtClp2igz/nWW5MJG8Z6aaYBSzs9i858RCTtLmJ5IKhzrKaqimLm 73w91RWcyTLNjvo9LpSWcYRRwOEjB0IneBYAi+bJ5zDoBzHL2JTVWOgzkGwR/6YxNqIU rQtw== 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=OO/3V/9VOGJvCqjEz1HGxPMCQzQjuOzsv8kdhtCYLqw=; b=lHZVsUwABIM0PvUAVS8vvJ20+nQU0MmZcaHAG/yPmHMwXbgpTG99/0Qpi7rFrfZt7W skYVIIVbOr7jehZzivh9q99+/WXfVBTIw+cdPE4WuHuwe3KJKGdO71/neV9qvb7R7NNr P6sodEPA5hKO9AuMhdQriPCpO+oh8BqlEObMsgcpVV1qWs/HqfAGw+CMNX3ehogwr1Xz 0+uVpL4fskA4A6EieTK4vH5JUUPGBdVDrCELMfThY7QZ+Le7Utk6A8jhXZup3FNuwrzL 0RZgur9A1A0lRdo0yf2yamtzQusTKPMtAFOZiPlmNY+Zt9MA2zQw1m4WmvoFQOhnIdoi JZXA== X-Gm-Message-State: ACgBeo3oQncA1yl+hCKfy2ns5dgBDp4Ha6ERLYl6Y34t2fgmddG8lL0D WEvS957LNTAnUZ0pov7Z3JtrxgFbloqu66d1L9TNaQ== X-Received: by 2002:a17:907:2e19:b0:730:acf0:4921 with SMTP id ig25-20020a1709072e1900b00730acf04921mr12339007ejc.416.1661173637810; Mon, 22 Aug 2022 06:07:17 -0700 (PDT) MIME-Version: 1.0 References: <20220822001737.4120417-1-shakeelb@google.com> <20220822001737.4120417-3-shakeelb@google.com> In-Reply-To: From: Soheil Hassas Yeganeh Date: Mon, 22 Aug 2022 09:06:41 -0400 Message-ID: Subject: Re: [PATCH 2/3] mm: page_counter: rearrange struct page_counter fields To: Shakeel Butt 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=unavailable 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 Mon, Aug 22, 2022 at 12:55 AM Shakeel Butt wrote: > > 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. Acked-by: Soheil Hassas Yeganeh