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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 526B3C4332F for ; Tue, 24 May 2022 19:01:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E5DF08D0007; Tue, 24 May 2022 15:01:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E10CC8D0001; Tue, 24 May 2022 15:01:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFB0D8D0007; Tue, 24 May 2022 15:01:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id C16DC8D0001 for ; Tue, 24 May 2022 15:01:40 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 8E1F9209B8 for ; Tue, 24 May 2022 19:01:40 +0000 (UTC) X-FDA: 79501555560.18.EBB5115 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by imf02.hostedemail.com (Postfix) with ESMTP id 4C32B800FC for ; Tue, 24 May 2022 19:01:37 +0000 (UTC) Received: by mail-wr1-f49.google.com with SMTP id x12so2773552wrg.2 for ; Tue, 24 May 2022 12:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zPoBKVvC2etY1rrj+YwE9RcWhQO3Aeb8jFG7VSlxgGE=; b=eShZOTIUQ93TOWjEzr249Q2WlZgXfVBXRXVkiPqqzxHc3weu9dWI5q3Ho56xWalhYm DNCo2rp9rMlgNBrK8z0XY/wW3LtOYML1vS+M+JPqvzdBIyhIp4u0EN07gBXsnOV6nri8 362c3np7lTLklsZKcOFMwfRRupNLAPynTYIAwR6xjCdZj/A/gIhF1Qfk1QwtUz1zpdDg OwP1XDrZlsnRRXavqft/ReWGqQnEA11Wn1yavd6amKib47Nc170P/orJbWp9qtErNk/7 CisGNh6vWRjQoZRymrDq8S4Qa8rADzUXLl566tiu679wuf5A6NCGy//TjeVsXiZq3cdx FakQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zPoBKVvC2etY1rrj+YwE9RcWhQO3Aeb8jFG7VSlxgGE=; b=td/M9xJk0uA6k9/zXn41tXk1tZqJuswNmoXvvB4OiiZvM4szCBidzqo2stAWWt78h1 A/Q0HeT5jqxuLPm7pVOX0/ih9UR+zVcdp/W/ZP6me7ZbBxleUB+IAXHAy2+MldrDqeRh 0TPllMZ39k9cHmhYe/OwhbtnPj+W7Mh77x3Oxr33V33Wu9VDx1jL4Fh8BjP7OvGLJI32 jenMrQgB8IRfjXFNSNOaFehQW98XGDn+/qMqbQbzl+NehuYY2VobJgFKpzhYdIyrW6ut Dr7qXSwTDwsfRIgJXb5895uQbZ4v74PDBc1HRD6uIkhLe/cjBnACc41WFYPASBjJLAiI XNvA== X-Gm-Message-State: AOAM5337J5Gfk2CAoiF6YqUzDiv74L415t0kegk8hN584KMpaYhDi/ta 5PbY64tqBsbTifSx9NOXluFQAks24X6ERRFZiIp2/w== X-Google-Smtp-Source: ABdhPJzPKmJrseAx4/O0R9Tr5Y5Yi3+iPsfVW2jq7/OFy7Iu3Ypo1SokZ9tOrFY3enB09mHuuuvffQ2Sa5Fxer4lfaM= X-Received: by 2002:a05:6000:1548:b0:20f:c4bb:defd with SMTP id 8-20020a056000154800b0020fc4bbdefdmr15202675wry.210.1653418898448; Tue, 24 May 2022 12:01:38 -0700 (PDT) MIME-Version: 1.0 References: <20220518223815.809858-1-vaibhav@linux.ibm.com> <87zgjcg4xs.fsf@vajain21.in.ibm.com> In-Reply-To: From: Yosry Ahmed Date: Tue, 24 May 2022 12:01:01 -0700 Message-ID: Subject: Re: [PATCH] memcg: provide reclaim stats via 'memory.reclaim' To: Johannes Weiner Cc: Michal Hocko , Vaibhav Jain , Cgroups , linux-doc@vger.kernel.org, Linux Kernel Mailing List , Linux-MM , Tejun Heo , Zefan Li , Jonathan Corbet , Vladimir Davydov , Andrew Morton , "Aneesh Kumar K . V" , Shakeel Butt , David Rientjes Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 4C32B800FC X-Stat-Signature: 1wcwadbaybpnwwsepoxk7oxjnjcbqymp X-Rspam-User: Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=eShZOTIU; spf=pass (imf02.hostedemail.com: domain of yosryahmed@google.com designates 209.85.221.49 as permitted sender) smtp.mailfrom=yosryahmed@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1653418897-991605 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 Tue, May 24, 2022 at 4:45 AM Johannes Weiner wrote: > > On Mon, May 23, 2022 at 03:50:34PM -0700, Yosry Ahmed wrote: > > I think it might be useful to have a dedicated entry in memory.stat > > for proactively reclaimed memory. A case where this would be useful is > > tuning and evaluating userspace proactive reclaimers. For instance, if > > a userspace agent is asking the kernel to reclaim 100M, but it could > > only reclaim 10M, then most probably the proactive reclaimer is not > > using a good methodology to figure out how much memory do we need to > > reclaim. > > > > IMO this is more useful, and a superset of just reading the last > > reclaim request status through memory.reclaim (read stat before and > > after). > > +1 It might also be useful to have a breakdown of this by memory type: file, anon, or shrinkers. It would also fit in nicely with a potential type=file/anon/shrinker argument to memory.reclaim. Thoughts on this?