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 X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EE85C433B4 for ; Fri, 9 Apr 2021 16:51:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0DF7F61104 for ; Fri, 9 Apr 2021 16:51:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DF7F61104 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 849776B006E; Fri, 9 Apr 2021 12:51:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8203E6B0070; Fri, 9 Apr 2021 12:51:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E8076B0071; Fri, 9 Apr 2021 12:51:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0029.hostedemail.com [216.40.44.29]) by kanga.kvack.org (Postfix) with ESMTP id 557DE6B006E for ; Fri, 9 Apr 2021 12:51:00 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 1384C1EF2 for ; Fri, 9 Apr 2021 16:51:00 +0000 (UTC) X-FDA: 78013418280.08.4986F16 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) by imf03.hostedemail.com (Postfix) with ESMTP id 344F1C0007CA for ; Fri, 9 Apr 2021 16:50:57 +0000 (UTC) Received: by mail-lj1-f181.google.com with SMTP id 184so7238696ljf.9 for ; Fri, 09 Apr 2021 09:50:59 -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; bh=ydAqvEvjbti1VLEzYDXfmB0v6HN/16FzgGH3F04ZLl4=; b=Ku8jowge8CGqLIX9rDeK1rUNeZs0BpzWI63PkuG58eTTRQjw9OWcAEd7foQc41esT1 JmyKp9pirl+Zn2IN0o/8JQaF0/tJlnNFI88SSyoSlWXIeEeuHfIW/MrnDdwLPEronJD0 SiNv9+FJ7Wb+3LtSufgntha5moXUanEotTltXSGODoLwX3MQUpaUFi+vLFQbD04H6oct vpsXFbiLU+IIC9KJh2Aa4hKSrd7BtPWtUg7ai9uBPrZHnNzNGsLIuggMW89tMxsPiJZK d/sWm0boTnhGVnPr8mLz+E6rm0gjgU+TBIDSly3YMB/BxZ/x6KQ316ZzzhPdCo6Rp2AB nTdA== 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; bh=ydAqvEvjbti1VLEzYDXfmB0v6HN/16FzgGH3F04ZLl4=; b=cr7O8N7uD+6U6mE+xjDTKWn+uP2BI/uUNtn16PKT791A5n346SeCh78UD+rD22DJ0x dF9iNNBTUcHguj6P3kd6DaqeNCdjAiK5U/b04IdC5R5IXqAC/x/TFirKYXu8+RK1S6Fz 17S2AmEWsR3H4BX+OLMviVOaKUMhfL3xhLuvpzJ/fsqNQV6YK3uLgOs/g2XiSxv1zYvL RdfEQDB+DvrRI7jHsBqrMjr1yJKn6Bsz4liq7X0xJLL0wEr++I54eQDxW6fTbuVKitY/ tiJ9TkiKmwV6Kr8ha08Q+kyX3znS/WnF7QXpIlRc2g4LZPhUZ38F3F8TqrmnrFTZFsJH UuHA== X-Gm-Message-State: AOAM533ztqG9Pduz7wGFEvOKQUY1EyYuJJaUOpWyC23mzdpZ5Vt3cB6B 0SHvyeTa4lMFprunsZpC8MFNWFSL2NutSZUwbNLIIg== X-Google-Smtp-Source: ABdhPJyBfdf/8smxuHjTBAQM9sdY8EuczVM5ysrH0hk9aqsMeTqWmqxKoh0LSG7TbQswqSDxNDdfWNq71furGKOVrTo= X-Received: by 2002:a2e:7d03:: with SMTP id y3mr10144683ljc.0.1617987057899; Fri, 09 Apr 2021 09:50:57 -0700 (PDT) MIME-Version: 1.0 References: <20210408193948.vfktg3azh2wrt56t@gabell> <20210409163539.5374pde3u6gkbg4a@gabell> In-Reply-To: <20210409163539.5374pde3u6gkbg4a@gabell> From: Shakeel Butt Date: Fri, 9 Apr 2021 09:50:45 -0700 Message-ID: Subject: Re: memcg: performance degradation since v5.9 To: Masayoshi Mizuma Cc: Roman Gushchin , Johannes Weiner , Michal Hocko , Vladimir Davydov , Cgroups , Linux MM Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: 3zjfx1tqrcz5ka84bs5g8pbx814ujhmu X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 344F1C0007CA Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf03; identity=mailfrom; envelope-from=""; helo=mail-lj1-f181.google.com; client-ip=209.85.208.181 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617987057-923492 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 Fri, Apr 9, 2021 at 9:35 AM Masayoshi Mizuma wrote: > [...] > > Can you please explain how to read these numbers? Or at least put a % > > regression. > > Let me summarize them here. > The total duration ('total' column above) of each system call is as follows > if v5.8 is assumed as 100%: > > - sendto: > - v5.8 100% > - v5.9 128% > - v5.12-rc6 116% > > - revfrom: > - v5.8 100% > - v5.9 114% > - v5.12-rc6 108% > Thanks, that is helpful. Most probably the improvement of 5.12 from 5.9 is due to 3de7d4f25a7438f ("mm: memcg/slab: optimize objcg stock draining"). [...] > > > > One idea would be to increase MEMCG_CHARGE_BATCH. > > Thank you for the idea! It's hard-corded as 32 now, so I'm wondering it may be > a good idea to make MEMCG_CHARGE_BATCH tunable from a kernel parameter or something. > Can you rerun the benchmark with MEMCG_CHARGE_BATCH equal 64UL? I think with memcg stats moving to rstat, the stat accuracy is not an issue if we increase MEMCG_CHARGE_BATCH to 64UL. Not sure if we want this to be tuneable but most probably we do want this to be sync'ed with SWAP_CLUSTER_MAX. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shakeel Butt Subject: Re: memcg: performance degradation since v5.9 Date: Fri, 9 Apr 2021 09:50:45 -0700 Message-ID: References: <20210408193948.vfktg3azh2wrt56t@gabell> <20210409163539.5374pde3u6gkbg4a@gabell> Mime-Version: 1.0 Return-path: 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; bh=ydAqvEvjbti1VLEzYDXfmB0v6HN/16FzgGH3F04ZLl4=; b=Ku8jowge8CGqLIX9rDeK1rUNeZs0BpzWI63PkuG58eTTRQjw9OWcAEd7foQc41esT1 JmyKp9pirl+Zn2IN0o/8JQaF0/tJlnNFI88SSyoSlWXIeEeuHfIW/MrnDdwLPEronJD0 SiNv9+FJ7Wb+3LtSufgntha5moXUanEotTltXSGODoLwX3MQUpaUFi+vLFQbD04H6oct vpsXFbiLU+IIC9KJh2Aa4hKSrd7BtPWtUg7ai9uBPrZHnNzNGsLIuggMW89tMxsPiJZK d/sWm0boTnhGVnPr8mLz+E6rm0gjgU+TBIDSly3YMB/BxZ/x6KQ316ZzzhPdCo6Rp2AB nTdA== In-Reply-To: <20210409163539.5374pde3u6gkbg4a@gabell> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Masayoshi Mizuma Cc: Roman Gushchin , Johannes Weiner , Michal Hocko , Vladimir Davydov , Cgroups , Linux MM On Fri, Apr 9, 2021 at 9:35 AM Masayoshi Mizuma wrote: > [...] > > Can you please explain how to read these numbers? Or at least put a % > > regression. > > Let me summarize them here. > The total duration ('total' column above) of each system call is as follows > if v5.8 is assumed as 100%: > > - sendto: > - v5.8 100% > - v5.9 128% > - v5.12-rc6 116% > > - revfrom: > - v5.8 100% > - v5.9 114% > - v5.12-rc6 108% > Thanks, that is helpful. Most probably the improvement of 5.12 from 5.9 is due to 3de7d4f25a7438f ("mm: memcg/slab: optimize objcg stock draining"). [...] > > > > One idea would be to increase MEMCG_CHARGE_BATCH. > > Thank you for the idea! It's hard-corded as 32 now, so I'm wondering it may be > a good idea to make MEMCG_CHARGE_BATCH tunable from a kernel parameter or something. > Can you rerun the benchmark with MEMCG_CHARGE_BATCH equal 64UL? I think with memcg stats moving to rstat, the stat accuracy is not an issue if we increase MEMCG_CHARGE_BATCH to 64UL. Not sure if we want this to be tuneable but most probably we do want this to be sync'ed with SWAP_CLUSTER_MAX.