Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2712623rda; Wed, 25 Oct 2023 10:07:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGujCgdmdFf67tFpov0zx1VVodKQRJs3mISia3gnLrJkykgIOblvmONE767PYrLYAeNrMhb X-Received: by 2002:a05:6358:a001:b0:168:f4a8:8ad7 with SMTP id e1-20020a056358a00100b00168f4a88ad7mr9469809rwn.27.1698253637184; Wed, 25 Oct 2023 10:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698253637; cv=none; d=google.com; s=arc-20160816; b=aYGM4PH3lhQjiufw7qWbkdERXwjksni/HZGhZpPqH0Qki+oeUFYlyr6nNnM7C/AyKe mqzAVs+1AtPEYskbWCSDTWzOUg7rbsEuKBZ0pdL8e4B3e7KSuqNhCq1al0UhytBUO0cd zD84XvS+OKdIULORWH2OZ3l6Q+HcFJe+sEbl8DCX+oBwTOo+s8gcRc3VSPijR41u/gIp TJf5MUW0e7vYe9jOrNiz/mF8vVo/+i2LfmJXUZkvNUZ6pKMuTau2Mx14GsZQ8NvB1GOO qLLBOmCFmwOK48KCtR94nLcIKbDKZ6zEBJSA45+/7HGpIR85z9C0CTKVO5MGdZwM7YWG kxHg== 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=0BLyhOS6DaA3Azb/y3i+aSNsSqvELymfgVFVzC4E2iU=; fh=FRFILozQIbKwJ5XL6Cc6e6tqe5EUnrIrQ+ek3skJ958=; b=pfqtEcAUgW4kDJ8DclefLiKe4Dzkxfs/cqqItzLgGXuSp5Jr5kCg3bJX9zAhd/vbKo rombhoOyDd7IT/U7Gd2wgyywYUJYJVbizoX6Ig8itzOAsrvWO6BXeGz82rZ0EdhVcHOu 7taGrWZz7G9tkUSbhCuU/X9yh8gMqa+krMoP+hXfM0gnUWTFyzQ2YBECqI00zgn7mtqq n2cP+boOCH3oseZqDrWtJLQgYB8h0OeQNiBiOwIcBtpUuPfNQk2uTLhNaM6KZCz2ug9x xTRsNIzxy+8N95ytDwEkbXUaugHxTrKt7FqiLGAL6YLoZjIPj1eAprMnax2QsrJcET3d +rmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=EmbYoF2c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id j25-20020a05620a001900b0076d82d9c755si8234897qki.22.2023.10.25.10.07.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 10:07:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=EmbYoF2c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 496F6801C530; Wed, 25 Oct 2023 10:06:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232431AbjJYRGx (ORCPT + 99 others); Wed, 25 Oct 2023 13:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbjJYRGw (ORCPT ); Wed, 25 Oct 2023 13:06:52 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D869137 for ; Wed, 25 Oct 2023 10:06:50 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1c9c145bb5bso5115ad.1 for ; Wed, 25 Oct 2023 10:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698253610; x=1698858410; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0BLyhOS6DaA3Azb/y3i+aSNsSqvELymfgVFVzC4E2iU=; b=EmbYoF2cRtIaD4jboEb/NkjayqFcqtPyG7xJcY7OVPXgN48UyOyykCrIFvXIlaQJID KDzMW16DS8YHJ3BDA8DCn1rOJXue5JAAW8WkmzYWf2+1zzScR6E+C0CJDHp9w+if9B5U WEL8e7hn4PCGimiw7nEQHfvWnRReFatmNtkh/IPPEZI6pHolocrZ4bOU7xxLrFg5olkE ak/O77dadKD715EtH33j8/ZcPPXf1WZgk1sl2uc9nWkFObWlMDzGCzUmIG10tvgZE9dh aUzMxaOjtbdXN+KAFMZkptanURDD3V2Os135o2Q2B1fLqoakyBZymiO4Me03r+3Cmwt3 kLZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698253610; x=1698858410; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0BLyhOS6DaA3Azb/y3i+aSNsSqvELymfgVFVzC4E2iU=; b=sPu/mFlBUnf6/H4/X29l1I8PP7EI59EqoBN4eEu3JV1SG6jLizflrch85xXHCSxjZz YhjXYY29xlI1LZlQ0Gl8K0cgA5hIMKH59yNrRosflv/grWymmRjvF7T4uoPy+rGw/6MJ vRt8yUbEO+b/3mmgG/aKESeZr17hy/HcxFdAADgdiiDP4Eh8A6hxRD8yLosio2389PyJ OxIQCxtiZkjlH/WyefAAQcjpJko6qGD39PQ1XzfafB8YFnCFEt9Lj+AYLqSYYU0EmlTH w3enhDdDB4+si/+AvOgZ3Z/sTWIhmOaJxmyYnj9rLarBP5atl6nyKNqe3wQPsISFUFo1 LFKg== X-Gm-Message-State: AOJu0YyvjSIuQpNXghyGQcBJDmgHymFrBgwDqAAUstbfKxB1Cq79gi0d 0aBGfGZHJhBB0P9tzHbKAk/VccZmPCZ7tjPXiT5wpA== X-Received: by 2002:a17:903:144b:b0:1ca:42a:1773 with SMTP id lq11-20020a170903144b00b001ca042a1773mr241841plb.12.1698253609714; Wed, 25 Oct 2023 10:06:49 -0700 (PDT) MIME-Version: 1.0 References: <20231010032117.1577496-4-yosryahmed@google.com> <202310202303.c68e7639-oliver.sang@intel.com> In-Reply-To: From: Shakeel Butt Date: Wed, 25 Oct 2023 10:06:37 -0700 Message-ID: Subject: Re: [PATCH v2 3/5] mm: memcg: make stats flushing threshold per-memcg To: Yosry Ahmed Cc: Oliver Sang , Johannes Weiner , Feng Tang , "oe-lkp@lists.linux.dev" , lkp , "cgroups@vger.kernel.org" , "linux-mm@kvack.org" , "Huang, Ying" , "Yin, Fengwei" , Andrew Morton , Michal Hocko , Roman Gushchin , Muchun Song , Ivan Babrou , Tejun Heo , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Waiman Long , "kernel-team@cloudflare.com" , Wei Xu , Greg Thelen , "linux-kernel@vger.kernel.org" , Domenico Cerasuolo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=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=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 25 Oct 2023 10:06:59 -0700 (PDT) On Tue, Oct 24, 2023 at 11:23=E2=80=AFPM Yosry Ahmed wrote: > [...] > > Thanks Oliver for running the numbers. If I understand correctly the > will-it-scale.fallocate1 microbenchmark is the only one showing > significant regression here, is this correct? > > In my runs, other more representative microbenchmarks benchmarks like > netperf and will-it-scale.page_fault* show minimal regression. I would > expect practical workloads to have high concurrency of page faults or > networking, but maybe not fallocate/ftruncate. > > Oliver, in your experience, how often does such a regression in such a > microbenchmark translate to a real regression that people care about? > (or how often do people dismiss it?) > > I tried optimizing this further for the fallocate/ftruncate case but > without luck. I even tried moving stats_updates into cgroup core > (struct cgroup_rstat_cpu) to reuse the existing loop in > cgroup_rstat_updated() -- but it somehow made it worse. > > On the other hand, we do have some machines in production running this > series together with a previous optimization for non-hierarchical > stats [1] on an older kernel, and we do see significant reduction in > cpu time spent on reading the stats. Domenico did a similar experiment > with only this series and reported similar results [2]. > > Shakeel, Johannes, (and other memcg folks), I personally think the > benefits here outweigh a regression in this particular benchmark, but > I am obviously biased. What do you think? > > [1]https://lore.kernel.org/lkml/20230726153223.821757-2-yosryahmed@google= .com/ > [2]https://lore.kernel.org/lkml/CAFYChMv_kv_KXOMRkrmTN-7MrfgBHMcK3YXv0dPY= EL7nK77e2A@mail.gmail.com/ I still am not convinced of the benefits outweighing the regression but I would not block this. So, let's do this, skip this open window, get the patch series reviewed and hopefully we can work together on fixing that regression and we can make an informed decision of accepting the regression for this series for the next cycle.