Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp290222pxv; Thu, 24 Jun 2021 08:02:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVuxIVYdbKMw0Yh6lDUy2jrSO93PZ2wNBO8OCBxzPjbpT53bQJwkP/TfZzft8Uu5frbIlX X-Received: by 2002:a5d:5108:: with SMTP id s8mr5145815wrt.311.1624546925166; Thu, 24 Jun 2021 08:02:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624546925; cv=none; d=google.com; s=arc-20160816; b=dZ4aHr3mX+lr3uX09heyparmzWGnoRo20BOg1VQrnUDDh68C2ahc1kpi82cdcAraHU J5Ys8wL7hsJZ/7rab7YzC82fDjVgKwzKqScL37z9ZuU/222LB1oqyZFuNS33ZtjLJT+N l/EUmvB9YNG/8SOlrH09L9AqcBSChQo1DOtt9QAT6EarpoQusOSzhxvRVj6xWA6bytt8 GyN779CKEhmTZYlU0+SDQQihaXGPyEymiykWsuiIfqMV8WkSvT2CJyEz5AculoeAZ/Zg ShQiJPL9/DgEhi0/7kgtxQPdCAaiJf710PnEbg0sHKMGae15G0LkhoE8Tt9yjPVXMu6Q kimw== 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=VEtW/m2G4JMnkRazKy7NH/xx9Lmp9+147gFKq1PM9Yg=; b=YRcsLVDn0nYr8wnugr/rf1UfUfqZWKAJHsHTT9vR11tiRiKcgfSWs/3NBrMlBJn6a+ Uw8I8SUhKtPTcHyj5qjrwFQ9F3x+mPhWMWAjsMKk+mocEyCBrMErr/2Iv4oNOT6DAQsb 1xWW99bea4SnAnzV1E+b0i06FcOKlduR99IqqAVTO0YqlQTa12iF/mHOaCgOHlUh+c37 bZpaViYTYre1IcWwrbSwDuVx3x5TbtBPVuVrL1sFzvzkjUQIodUMGrYpsuif7rf8QOWV P9iF3LSHVFRdiqGFARHl9ewKTv+oCDWKvxZgUrQLiMZu9CAN08KilJIYft5EEWB3iRyJ p5iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="WAWI8So/"; 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 q2si3498955edb.244.2021.06.24.08.01.38; Thu, 24 Jun 2021 08:02:05 -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="WAWI8So/"; 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 S232109AbhFXPDF (ORCPT + 99 others); Thu, 24 Jun 2021 11:03:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230377AbhFXPDE (ORCPT ); Thu, 24 Jun 2021 11:03:04 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81D80C061574 for ; Thu, 24 Jun 2021 08:00:45 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id k10so10724298lfv.13 for ; Thu, 24 Jun 2021 08:00:45 -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=VEtW/m2G4JMnkRazKy7NH/xx9Lmp9+147gFKq1PM9Yg=; b=WAWI8So/qhhVeppsIvdijPvUzdKdS80W6KrQW/YiWqHSSLQfZqqWsi1EBJnzuaRtvQ uwilI74b1Rj2CMfhicSt0oPI4F1Xekqj4XfrQLsepNL76BJ8xBCOBMSkY3Y1x6Gqw2sj 7lvnVcUcP93CrANK0OjxaCB9Zt34DH2PHf5vKOMNRYu5V5fvB00/TP3EnPOIhIxca6Zl P+N/bo1Uu48b6MI43s1/NQYwIej3Cl/5IKT4nCsxBXfmhsKkx3WsExXRF4YkWlBeBjCu K43gwfpaWSvIznaF14eSVUglFjETBkIwB6IrOSXTcfm8yUGeHyxDJ3fgOm99lLecLaBD MiWw== 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=VEtW/m2G4JMnkRazKy7NH/xx9Lmp9+147gFKq1PM9Yg=; b=taBZ6iOh+6/QGtoxM9zaPfFVSgfPOcM79TBiecXi4wkdQMrwqP2p2PnnMt5b3sNefn suuV7LM7AV2Esshep6hWmSDjB84Ky2XDnfR7SF2bpAwpJMziGN7LUbsrIrTx4+vWOOXu kh4yjJKOQ8NnH6ar8kjHJtHIVwstgxARGVhM0QhaIbpZwo/hSTm4bHOOQLPvIobaT2rU YiJ37SCBi7mt3cWwljU2diZ7nQeTcbSWAuLulDajjeJ3GhTRN/rUkgodDE5589FEQM/p WyYDWbAObt6eut5E8eej9RIzP07AXSZzxfKnNCNKgZ0SZ9Hc0d3DnNRR0ZfTfSO2Tupj FBxQ== X-Gm-Message-State: AOAM532RAR8s8Da6pU2JpMp3w1LbjBN94qQmRCmlVpD9xHok5NOZIvDC lpTyQwMpDIlLi6OpNRDZs0iDz3W7Ezj1j0GMVKQ0Sg== X-Received: by 2002:ac2:545a:: with SMTP id d26mr4103361lfn.83.1624546843227; Thu, 24 Jun 2021 08:00:43 -0700 (PDT) MIME-Version: 1.0 References: <20210615174435.4174364-1-shakeelb@google.com> <20210615174435.4174364-2-shakeelb@google.com> In-Reply-To: From: Shakeel Butt Date: Thu, 24 Jun 2021 08:00:31 -0700 Message-ID: Subject: Re: [PATCH v2 2/2] memcg: periodically flush the memcg stats To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: Tejun Heo , Johannes Weiner , Muchun Song , Michal Hocko , Roman Gushchin , Huang Ying , Andrew Morton , Cgroups , Linux MM , LKML 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 Thu, Jun 24, 2021 at 7:01 AM Michal Koutn=C3=BD wrote= : > > Hello Shakeel. > > On Tue, Jun 15, 2021 at 10:44:35AM -0700, Shakeel Butt wrote: > > At the moment memcg stats are read in four contexts: > > > > 1. memcg stat user interfaces > > 2. dirty throttling > > 3. page fault > > 4. memory reclaim > > Sorry for being dense or ignorant -- what do you refer to with the point > no. 3 (memcg stats reader during page fault)? > Yes, specifically workingset_refault() which reads lruvec stats directly through lruvec_page_state and indirectly through lru_note_cost_page.