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 830A8C433F5 for ; Wed, 25 May 2022 08:59:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F1D098D0002; Wed, 25 May 2022 04:59:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id ED6878D0001; Wed, 25 May 2022 04:59:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DB5408D0002; Wed, 25 May 2022 04:59:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id CD61C8D0001 for ; Wed, 25 May 2022 04:59:20 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 987023485C for ; Wed, 25 May 2022 08:59:20 +0000 (UTC) X-FDA: 79503666480.10.BFEC568 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf31.hostedemail.com (Postfix) with ESMTP id 3B1AD20002 for ; Wed, 25 May 2022 08:58:45 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 019C41F905; Wed, 25 May 2022 08:59:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1653469159; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AdJCYZHOyhpjXySt6nTPMBOK5Q7ap+5mhsb0yD0IbJk=; b=aiV6xLIl8yHWP30wU/K3GtbE85ZdBM0U1BgBzJcKlHVA+4+eXIlhgfUdcIjT7dEY9LCayY qdR0ughVWk+eDMKIj1MpdBpoaBSWF8+Uz2ja25zdBKLZBcBtbHqJdJEWm2SbGqjXX7AsZz UMe64oVsol7td+qJimhHkcqUGFKpgnI= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 7B3F12C142; Wed, 25 May 2022 08:59:18 +0000 (UTC) Date: Wed, 25 May 2022 10:59:18 +0200 From: Michal Hocko To: Yosry Ahmed Cc: Johannes Weiner , 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 Subject: Re: [PATCH] memcg: provide reclaim stats via 'memory.reclaim' Message-ID: References: <20220518223815.809858-1-vaibhav@linux.ibm.com> <87zgjcg4xs.fsf@vajain21.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: f95e7e97j1fipn6tsozy9wde7xt4ca5s X-Rspam-User: Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=aiV6xLIl; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf31.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 3B1AD20002 X-HE-Tag: 1653469125-182312 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 24-05-22 12:01:01, Yosry Ahmed wrote: > 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? Can we start simple and see what real usecases actually will need? -- Michal Hocko SUSE Labs