Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp4024265ioo; Wed, 25 May 2022 13:07:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySGTsn78zLxUu/LQoU30pJ7Jd9ZJCRRO/aFBlemTUR825I7PJNj7nbVh9RUBZRHBr7x3K/ X-Received: by 2002:a17:907:16a4:b0:6ff:15a6:5d0f with SMTP id hc36-20020a17090716a400b006ff15a65d0fmr3573620ejc.4.1653509245647; Wed, 25 May 2022 13:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653509245; cv=none; d=google.com; s=arc-20160816; b=BoTRZ972xDtNGTqHF93sBeqJezU7zMDmmyJeNB8i5e3tbpXLeh3OV+VsMa2x1rwTWF CkCuSH1giWV8aqKpW/hZSdkLJWyy4k8lolFHniO9DTIrInnOfI4TUwct46itmeTuJxso 6JuK7HfMXqhbIpFDk6vbMLDC60jTCyzI2gbIC6gL4VuUATHS67Z8fLMv9lBqeNckcjw5 /PPNbtgpwnJ9N2IAYzD/YIHha0HCDQqzeTUcQaK/9/9emgGU8WvmwdHzgrBAR/DLLW15 1jL9dyvB9da4Hnld8red0cnErNvJI/kGHZCvdV4dRatk/L3hw1tM6esLzkRIAS+1b+q7 Qb7A== 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=AdJCYZHOyhpjXySt6nTPMBOK5Q7ap+5mhsb0yD0IbJk=; b=AD9qr/XCuWwizXBJq1zfKh+jbr7zbb7BX9zp8ou4w5qCTumsFezzYtz+DBa9Qgi8Ce Uo8OINm5rHQ/6j4XJcTnnU5rwPrkT5Z7oWYAkBuzvseZ8qrPLENPaNy//F/99o6DhPwa nGjPdUEolK7gwmvg08DBhpnYji3Zr6SiwCzcA4PjNi/IVtys9lr/FZx1wuyQbH0v/Tex yKKSfHzKXlg7oDHgBfgahGTvHc+m6y6ivOgM/Apia3D79DgyMw3tCPvziyIFNLXSRteG gSMxnmjXcUrz2lHPdCz0wrTrOVqW3/Vh2WQEyH9VebjQGK8z9iOYOvn/ZgjquhcncqY2 qrpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=aiV6xLIl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb13-20020a170907160d00b006fef847974dsi9517456ejc.598.2022.05.25.13.06.50; Wed, 25 May 2022 13:07:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=aiV6xLIl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236300AbiEYI7Y (ORCPT + 99 others); Wed, 25 May 2022 04:59:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229752AbiEYI7W (ORCPT ); Wed, 25 May 2022 04:59:22 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DB916FA2C; Wed, 25 May 2022 01:59:20 -0700 (PDT) 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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