Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1424792pxb; Fri, 1 Oct 2021 10:15:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzm/qzrdFoWVK9rKEQI+PYGaQG/F91owL/89313CJgIgAik96+A0oRncNxTM1hDli9Zhea X-Received: by 2002:a62:1842:0:b0:44b:3341:fe46 with SMTP id 63-20020a621842000000b0044b3341fe46mr11345341pfy.73.1633108553123; Fri, 01 Oct 2021 10:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633108553; cv=none; d=google.com; s=arc-20160816; b=TWvef3zmEtkmhvmqQcaagfVLiZGRNKdC4okJR0mxQpI8TAKSHouQESARqPHOqZApCV JvYyWlIXoUMXASLJTEkzzWXD0SHT0UdegqjIj+cTQx3FynkrMgDLTbgK7F1quSC3XbMH vgHqwqQ5YiwpXFj0Gm2STrK1JEKz0J3aF96owzgVW3AMdFwS0avSsJYsE3lM3HpH4ju9 0OQXtynjDDx61oc8rIFqKT27Csde4MGHbXJAfe3Ot29h/GuLX/TTfVX4eLyhrV7aMkMc 2WG4AGvj/x/65LE/uT9EAl1KtH+R268XAqzKzuhwFweU5W1Oejx/4/JBNKyr2WVVCByW pw0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DJs75BQaCW/g7pooRRj+6YO0ULlwMz3u2sNV5tiA/bM=; b=qAiJQNYdDFeC6IPdjnKpF9f2uHlWUn/itJLWqXm8JfPLFS6WuxXAtkrBzcXaalCqeK ERK6o1i90zyAnKcdO4QoL5aIksb69p07yRniFkR4jjaOm8e/BpMW8pvdB4RkxDfFGPmV Eq/Y4DrHptwYKFta5A1cjXnnaZEtbx4CFacSAEW3Np/FJF98d+szlNVlaBkJoPeo99Iy wx1QlgeQPqudG7VbmaxuAoqC0WBO3IOzxlo60Ivw8gF4ifkn2hTKEEP2HtB2k70smIYr HqxSM7w8WNkkksMI2fa/QA1YJIHVu8s0TRUX84xPH8h0NgSHPRSd3QVM8tET3rd+9AQS wqfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=12f9ZN14; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z12si9850396pjz.162.2021.10.01.10.15.36; Fri, 01 Oct 2021 10:15:53 -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=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=12f9ZN14; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231556AbhJAO2v (ORCPT + 99 others); Fri, 1 Oct 2021 10:28:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354297AbhJAO2u (ORCPT ); Fri, 1 Oct 2021 10:28:50 -0400 Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E45F3C06177C for ; Fri, 1 Oct 2021 07:27:05 -0700 (PDT) Received: by mail-qk1-x72c.google.com with SMTP id i132so9307771qke.1 for ; Fri, 01 Oct 2021 07:27:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=DJs75BQaCW/g7pooRRj+6YO0ULlwMz3u2sNV5tiA/bM=; b=12f9ZN14mCgZ+mea7F6AapeGsomq5b/qDbcNfxZe76D96JIWEGlDkLQclucjiNxCER Pykd8tU79SFQM8L6xrigX5TEUjdEKChTRdTwmB6OPH6gCCIU9NVtzIzu0eZLv3xkLHCV uNuuIADIN040sWB1WYlgO5d4s+YLUIqo0SfGu/I4iP50M63j6rHIsaNJn4PFAwznaq1C oa60iWCS7UzYVFhUk0swK39HZ94r8v6wFNilzivbnZoyQhJ6or+govTF2UC3OIbYVsts AiZN/0uso7kEG44pjbDzm/rw6Kkd0agK1pN7/arZvdjziYQwcNlNvR0PqWpFKylS7sco 0Ygw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=DJs75BQaCW/g7pooRRj+6YO0ULlwMz3u2sNV5tiA/bM=; b=Km1ooKb6ZwqBvrQdiNu/J8CtFQvOH1AC6iKJxPPnvXK8/RDwAGSgUdd4b5df/gsKau 1F5cmI5H8TFbhtTc3cannWmX/995Rl3zckW9I/Shs51MsrCiPP8HEx/EJBm3ArSu8g/Y pLnE6dD9zbtKgFB3j+W/duq35w4kvIFZcNptujMrrhzUO7+6+6zuWyVvt6/f2G0OJDE8 Vbv/ubTutl7mN//ja4gfQSe2JrKceS4YIOq2WibCEtHfSzVWOHft8REJwYPEWd8h2U8o rWTGiM33NhNlk0XdC25wVu6Za+5GIgDIy6NYgKgcYh4FJznmS04hXQlNtvZATPdBSPsD 8+Dg== X-Gm-Message-State: AOAM532VHWUbW/q84gKE6iA/CnOwFaVFJi9h5G2BD8sm3hXvf4hfeQLB VGsdVovHxdV8ThkVhXDVOljBOg== X-Received: by 2002:a37:8a47:: with SMTP id m68mr1684979qkd.452.1633098425018; Fri, 01 Oct 2021 07:27:05 -0700 (PDT) Received: from localhost (cpe-98-15-154-102.hvc.res.rr.com. [98.15.154.102]) by smtp.gmail.com with ESMTPSA id w17sm3085594qkf.97.2021.10.01.07.27.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 07:27:04 -0700 (PDT) Date: Fri, 1 Oct 2021 10:29:13 -0400 From: Johannes Weiner To: Shakeel Butt Cc: Michal Hocko , Michal =?iso-8859-1?Q?Koutn=FD?= , Andrew Morton , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] memcg: unify memcg stat flushing Message-ID: References: <20210930044711.2892660-1-shakeelb@google.com> <20210930044711.2892660-2-shakeelb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210930044711.2892660-2-shakeelb@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 29, 2021 at 09:47:11PM -0700, Shakeel Butt wrote: > The memcg stats can be flushed in multiple context and potentially in > parallel too. For example multiple parallel user space readers for memcg > stats will contend on the rstat locks with each other. There is no need > for that. We just need one flusher and everyone else can benefit. In > addition after aa48e47e3906 ("memcg: infrastructure to flush memcg > stats") the kernel periodically flush the memcg stats from the root, so, > the other flushers will potentially have much less work to do. > > Signed-off-by: Shakeel Butt Acked-by: Johannes Weiner