From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A12ADC28D13 for ; Mon, 22 Aug 2022 04:57:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C78D7940008; Mon, 22 Aug 2022 00:57:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C2817940007; Mon, 22 Aug 2022 00:57:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AEEFA940008; Mon, 22 Aug 2022 00:57:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 9C027940007 for ; Mon, 22 Aug 2022 00:57:19 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6E194AB3BC for ; Mon, 22 Aug 2022 04:57:19 +0000 (UTC) X-FDA: 79826019798.07.3E3FCD0 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by imf01.hostedemail.com (Postfix) with ESMTP id 25DBD40050 for ; Mon, 22 Aug 2022 04:55:40 +0000 (UTC) Received: by mail-pf1-f182.google.com with SMTP id z187so9222843pfb.12 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=EvYSr40TUVKG3Cyvr/YWtl+oHKXuIcGLmP7a06wuGV2EK6VjASVe36Rvwd9WCvz7CW Om4FcjiMFHHUcsOEtn4W987V+LeWJkYFpRy9FNMuRuZIf5CQw3kmvna4EDodjT+tkELc W5jwZxH5ryubfxV1q4dli/h2Xm7NATgp99BB/qhFrlq43rRyp0vyIE9mwFBbST//ya+E nM5flyMg1go6e/2ETB+p2R1fFGBOF5j0XYMecmUf6h/04Z/ppte/YTnlNcb+dTO1cCSO WqnyXjNu3BBFyQY2ShubVw/7MQZP3pd/Z5AmGMLVWdd2OjYwZJWiSHIr+ViUOAHwHkjS Z4/Q== X-Gm-Message-State: ACgBeo3BgJmRdd811f9JomI2lhnFhpDYxCqY/FjB24ETzbDZocfn13J7 JckuvQyWPN9SQcDBoTJ0l0Fb6ffmCwY75kDXUntk1g== X-Google-Smtp-Source: AA6agR5y0tHusAMEHXfmy5LutVbqZrCG18Mro9TnGQ195voKdkgYlo42c49TFtOr5o6zXt1Sl6Y3GwbzsCZTNj+dQGc= 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" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661144141; a=rsa-sha256; cv=none; b=zbgZaIgl6D9pb68bLBkA2J4qHwZch2U9H0Mhp6a27DtyyOY2TarzANhdke3piO0cj+x6+2 wplHAy2lqq09B207gjp+eGomYhp5p5EL1n4OXynFMWAnDdHz7rg/HWyP4Gu31y0DZ9M7D2 dOtlOMBTMOA+iC54R6WH3OSG5mvBwx0= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=sQogaDyt; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf01.hostedemail.com: domain of shakeelb@google.com designates 209.85.210.182 as permitted sender) smtp.mailfrom=shakeelb@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661144141; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UQyYzuIqErSYNpXSPcyyYCDze0E5q1hH3djW+ifHVA0=; b=NVb6/VZTWSDbjPurI5YBfm/x8x3SHgQW0XLKKHb3YsGMNbGBgAsXn64M2GoA2Dqw2U6qXC OaBu0DFjPlHKx78kkJwJ1c6BWMZbfPzEkZq51iBG9i1ncCTzr1WwR4Xb4p9ZtAhhQSNAWl K+hKz2lvoXAAxKYSGk0OMrjMKfDwxZQ= X-Rspamd-Queue-Id: 25DBD40050 X-Stat-Signature: sy19rqw4dkpyfyekrxryhwxhsqkgndk1 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=sQogaDyt; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf01.hostedemail.com: domain of shakeelb@google.com designates 209.85.210.182 as permitted sender) smtp.mailfrom=shakeelb@google.com X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1661144140-821307 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.