Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1378405pxb; Tue, 17 Aug 2021 10:13:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqt8yBRSaXlSiD9LE5oYtAsor0Gu8o6gYTF7kbI80rstG9brsEzl+3ZRFmoQZvZy6QLyqD X-Received: by 2002:ac2:5f41:: with SMTP id 1mr3140019lfz.369.1629220434942; Tue, 17 Aug 2021 10:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629220434; cv=none; d=google.com; s=arc-20160816; b=PiJVZRQp6Ji8x9LtOKVChiENgDx+OJIDT6rKEdEO0taCVUL4PpovsIX9gFQRV+ga3o KOWXLv/DllPaanKapaZaydBnVqdzO2k5pflyUiWXzRMkhKpBvqHSLvavLlwMP8x2kTV0 7FzAMVaRPgOS2dt1o1LF8V+OkbMlzadtO2FY0v7E5Q3evHwSW4YW9Y18nmU9kHEPPwEH 5dZx2s4tMhS+PWpSPTMw07JH7SVNQjpvMvDwQatinM76JquNFJsoN5GFoF7OuYz9oZ9l eKvxKpfrZEBBiuDIt30oGJb+XG9xRRvV9LpyIErClilXReaiS/UUkqYXFBONiV2+xYtO lS9w== 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=esKjOu29CtbHKWBXCsPcW8MIgPET8SIonOgdr3g5nyg=; b=yWTd+EiYyZhlXcMwogpDfVV/27O66w5BJDZgdbPX8R9fHTnsR91bMIWme5zaJJbyMR waoDgCF3ysRoJIKDF0auIZ7DkGNAtKUTzsAqnlmlV599zK8qtA/lfzn1/MM6E5Or5Gk5 zw/q747+RNwNbqZ1R1UNfkR21Oo9awAMxd6VpvAPvU9uet7cdvh7k+QDog6LdT7ExiQ5 0ewg/7N5tArLa0ZeTlYUYo/Etvt9MjOeQlQ97sjN7y9fQmH8Hs9O9BkbL0nOVfOkcvVA W3C3f0gauIJHhWiv/x7gDaQOcDRlz+9c/2HWInTjKXUNAhTqgWcMOqFYiHLyv87wWyek /UQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vMiR0ARs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si3758759lfr.46.2021.08.17.10.13.11; Tue, 17 Aug 2021 10:13:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vMiR0ARs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231479AbhHQRLg (ORCPT + 99 others); Tue, 17 Aug 2021 13:11:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229723AbhHQRLb (ORCPT ); Tue, 17 Aug 2021 13:11:31 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AF54C061764 for ; Tue, 17 Aug 2021 10:10:57 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id p38so42885605lfa.0 for ; Tue, 17 Aug 2021 10:10:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=esKjOu29CtbHKWBXCsPcW8MIgPET8SIonOgdr3g5nyg=; b=vMiR0ARsypmr79UUSYTDBofqOVcAN344d7ssRjsdeE5ThfuRqwaaQemLcxm5dk6kA9 NobN2xX9NS5968wMgMYjf8l+hDaXfu25vXq833X6MwoMsdf9D4R1IDmFUpt7+ha3330F 03t5J8uV3xZ0+cogXHGKcrW2IY9Fmjh31Gn15qPGNRfridQzQmW3hDnqMQ/jSVDFwvrY Ys3MaUkUER/3A3A+bGItS+jSN10+jDUPCV2IxmqnU248IG85oSLue9Cr+QpbwG3WsE8G XAgjxsBrgA7vdS4FzTVAv6RakkZt7H3WAKtoNNqp4tz1c1/xW3lQt+W6i7RPPgqsjp3D u0XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=esKjOu29CtbHKWBXCsPcW8MIgPET8SIonOgdr3g5nyg=; b=NtRPIocYX40ehtTBCktO8gsJn6yrAbhjxS9b3FSrBcx73rPszLuhfE0tpNXWE5WQKa RX9qmB96lvoBZqdscg7/X/p5kgsTDnko4x4ISm74hDYsMahamNCAa2oE+yh0V9RCVeGL wUmaCVg61K3atHth1lvpRUUt/k1lveut5kCe5MMDoledF9g4p2/Tsh8dtIHFBqWkhhEe TZrI/cljiu8r9HC7MEKJGaCdiIKDyQK+8N2KzIc2LZMbCnRFfaDnKdlvKbJDZDW2D0Ti qCM9NbuMaugrx9HoSNLaFy1hXQeNsSBhLv0WG002IeuwkItrpeLN5DdYbTxvCAke7eTb R8vw== X-Gm-Message-State: AOAM533CpXGnTJbdjIbPsfqYt0ClTyzfG/iemBLqk4IfW2zgve9mHCec gE+q5bVHZfrWPwm6z1lshrTjCokWlg/CNFnYo0b3mg== X-Received: by 2002:a19:7507:: with SMTP id y7mr3093130lfe.358.1629220255213; Tue, 17 Aug 2021 10:10:55 -0700 (PDT) MIME-Version: 1.0 References: <20210811031734.GA5193@xsang-OptiPlex-9020> <20210812031910.GA63920@shbuild999.sh.intel.com> <20210816032855.GB72770@shbuild999.sh.intel.com> <20210817024500.GC72770@shbuild999.sh.intel.com> <20210817164737.GA23342@blackbody.suse.cz> In-Reply-To: <20210817164737.GA23342@blackbody.suse.cz> From: Shakeel Butt Date: Tue, 17 Aug 2021 10:10:43 -0700 Message-ID: Subject: Re: [mm] 2d146aa3aa: vm-scalability.throughput -36.4% regression To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: Feng Tang , Johannes Weiner , Linus Torvalds , kernel test robot , Roman Gushchin , Michal Hocko , Balbir Singh , Tejun Heo , Andrew Morton , LKML , lkp@lists.01.org, kernel test robot , "Huang, Ying" , Zhengjun Xing , andi.kleen@intel.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 17, 2021 at 9:47 AM Michal Koutn=C3=BD wrote= : > > On Tue, Aug 17, 2021 at 10:45:00AM +0800, Feng Tang = wrote: > > Initially from the perf-c2c data, the in-cacheline hotspots are only > > 0x0, and 0x10, and if we extends to 2 cachelines, there is one more > > offset 0x54 (css.flags), but still I can't figure out which member > > inside the 128 bytes range is written frequenty. > > Is it certain that perf-c2c reported offsets are the cacheline of the > first bytes of struct cgroup_subsys_state? (Yeah, it looks to me so, > given what code accesses those and your padding fixing it. I'm just > raising it in case there was anything non-obvious.) > > > > > /* pah info for cgroup_subsys_state */ > > struct cgroup_subsys_state { > > struct cgroup * cgroup; /* 0 8 *= / > > struct cgroup_subsys * ss; /* 8 8 *= / > > struct percpu_ref refcnt; /* 16 16 *= / > > struct list_head sibling; /* 32 16 *= / > > struct list_head children; /* 48 16 *= / > > /* --- cacheline 1 boundary (64 bytes) --- */ > > struct list_head rstat_css_node; /* 64 16 *= / > > int id; /* 80 4 *= / > > unsigned int flags; /* 84 4 *= / > > u64 serial_nr; /* 88 8 *= / > > atomic_t online_cnt; /* 96 4 *= / > > > > /* XXX 4 bytes hole, try to pack */ > > > > struct work_struct destroy_work; /* 104 32 *= / > > /* --- cacheline 2 boundary (128 bytes) was 8 bytes ago --- */ > > > > Since the test run implies this is cacheline related, and I'm not very > > familiar with the mem_cgroup code, the original perf-c2c log is attache= d > > which may give more hints. > > As noted by Johannes, even in atomic mode, the refcnt would have the > atomic part elsewhere. The other members shouldn't be written frequently > unless there are some intense modifications of the cgroup tree in > parallel. > Does the benchmark create lots of memory cgroups in such a fashion? From what I know the benchmark is running in the root cgroup and there is no cgroup manipulation.