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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AA09C433ED for ; Fri, 9 Apr 2021 08:31:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DB45B61105 for ; Fri, 9 Apr 2021 08:31:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB45B61105 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5E4E26B006C; Fri, 9 Apr 2021 04:31:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 595626B006E; Fri, 9 Apr 2021 04:31:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 45D856B0070; Fri, 9 Apr 2021 04:31:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0144.hostedemail.com [216.40.44.144]) by kanga.kvack.org (Postfix) with ESMTP id 2AA926B006C for ; Fri, 9 Apr 2021 04:31:37 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D12F41839ADA9 for ; Fri, 9 Apr 2021 08:31:36 +0000 (UTC) X-FDA: 78012159792.16.C1219D9 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf30.hostedemail.com (Postfix) with ESMTP id 6013EE0011C0 for ; Fri, 9 Apr 2021 08:31:29 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0A6FDAEFE; Fri, 9 Apr 2021 08:31:35 +0000 (UTC) Date: Fri, 9 Apr 2021 10:31:32 +0200 From: Oscar Salvador To: Wei Xu Cc: Dave Hansen , linux-mm@kvack.org, linux-kernel@vger.kernel.org, shy828301@gmail.com, Greg Thelen , David Rientjes , ying.huang@intel.com, Dan Williams , david@redhat.com Subject: Re: [PATCH 07/10] mm/vmscan: add helper for querying ability to age anonymous pages Message-ID: <20210409083132.GB31366@linux> References: <20210401183216.443C4443@viggo.jf.intel.com> <20210401183229.B2360AEA@viggo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Stat-Signature: re3r8byjjfdr8nz9pofj9qcdjdtbe1cg X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 6013EE0011C0 Received-SPF: none (suse.de>: No applicable sender policy available) receiver=imf30; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1617957089-17225 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000029, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Apr 07, 2021 at 11:40:13AM -0700, Wei Xu wrote: > anon_should_be_aged() doesn't really need "lruvec". It essentially > answers whether the pages of the given node can be swapped or demoted. > So it would be clearer and less confusing if anon_should_be_aged() > takes "pgdat" instead of "lruvec" as the argument. The call to > mem_cgroup_lruvec(NULL, pgdat) in age_active_anon() can then be removed > as well. I tend to agree with this, and I would go one step further with the naming. For me, taking into account the nature of the function that tells us whether we have any means to age those pages, a better fit would be something like anon_can_be_aged(). IIUC, the "should age" part would be inactive_is_low(). -- Oscar Salvador SUSE L3