Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1250441lfc; Wed, 1 Jun 2022 13:05:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHM8b+RbhSfty5ZJiiHRBfafEafaVeRaNe6+VFCeAshXkPOIwx4I7VunayqmxAhz/ksjMj X-Received: by 2002:aa7:88c5:0:b0:518:c330:fdf2 with SMTP id k5-20020aa788c5000000b00518c330fdf2mr1195317pff.63.1654113928226; Wed, 01 Jun 2022 13:05:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654113928; cv=pass; d=google.com; s=arc-20160816; b=Ls15T5B3FVLFU/2c6wmX1OC94BtSkEGQ96rcd+OCBIO+z96ZfI2HTc5hR4TQz6tLUz N8De5X9caDmJbOHTjxA5PSeO/0FlyRzeAbLeR8ZAdqhgS0mCXd3aly/KFUuiXQ07nuLR paMfinvJaPjdlzZS7yIlf60KlQQ+KP+ou6lKM3/kAGpRTH/oOCz74T8L9XJeq4MYg8lY 533wYaotIGCzbDau9pRK2s467L/kTVguUrl8AxzQCWbik7jUTYNypS90PBZg6zAxjYP+ 6YGFbhwmFNagiz8IaLqxl6EK+f7CRn+gpupn4/VvA5mGdhpcltghtAjT+IJwtbEJRWQ5 K1+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=ekzYMHKdKV6fWrlgsf5nHAFuBaR41uhTH85pDwc86aM=; b=Xves8BvHfk2hmT1HP+yBLeGR0OTQ4AgNtgW7nDUvlVNK1PQDf4Q/jKml/A+rZyKxJJ j9PI/2YsrdWwyFJMx9muQ556F9s1e0izaXRIcSCHl6QH6ypJoVeRpH+mjV/aGjFV5BpE nChCda7GUeeQh4gygnjxUm7/0hPU/q+R2qsSGi2uSy/MkM9JoR4UzcsCrNNWrt2fG7Fb B7L5zgHdJp1UWieXVEkL16ywWVzKJGxR6UCH2vjQ0VuVyv6yy7zY5YXuwV90E6iyMCy3 9plZgkAX3ExacdITkMTJbYU+sd/nPdw/1lLGLYpJJ2bRYzn1KV3GqKLe31S9mJYDxuC4 b/Pw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@stgolabs.net header.s=dreamhost header.b=D6FSAiSZ; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o15-20020a655bcf000000b003fc7e9dcf7csi3143060pgr.829.2022.06.01.13.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:05:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@stgolabs.net header.s=dreamhost header.b=D6FSAiSZ; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 07F8115829; Wed, 1 Jun 2022 12:21:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354981AbiFAOYm (ORCPT + 99 others); Wed, 1 Jun 2022 10:24:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355373AbiFAOYT (ORCPT ); Wed, 1 Jun 2022 10:24:19 -0400 X-Greylist: delayed 73029 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 01 Jun 2022 07:14:13 PDT Received: from poodle.tulip.relay.mailchannels.net (poodle.tulip.relay.mailchannels.net [23.83.218.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0CC01059C0 for ; Wed, 1 Jun 2022 07:14:12 -0700 (PDT) X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D7868C2C1E; Wed, 1 Jun 2022 14:14:08 +0000 (UTC) Received: from pdx1-sub0-mail-a312.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id A6A6BC2B14; Wed, 1 Jun 2022 14:14:07 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1654092848; a=rsa-sha256; cv=none; b=FsQblE5pGRUj4Cmb/8KKvDps7w0rl+tZQUJI5lCufljh0dM0HXhIsvyPPQUn15wZK85cm7 yEbgG4mMQK2Ah5f1iBDGk8NomZOzYVRnb5qHtvH2ttUHZNOKEqIukcDc+GXbyfxK5RylNq wD8nZC/qgAMqJ4O1rlpM6rR1UN4U3HMIjXlVLDkCTag1fYAhfcwjfmlV2fRMpxWqYykT0t 0HkL9cTFapm0bKz+PjKsALp8doVyxoiAinJA2YOA28Gz5OlGXMWFnvMt1d/IemEipUxskW whrF3jeYw+9g+HoBFgHDOM26RfMlxBUemvbN+7vVG+CmthHItRNNWQ6kuFMeVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1654092848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ekzYMHKdKV6fWrlgsf5nHAFuBaR41uhTH85pDwc86aM=; b=dI3dsR6MHdHs8xsTI6kAuSKMsc7QL4xJNRJrKYMuK6C7BDqzo3DIiFx5/hQ1BYDr7W7Beu cdhQK4IgnIoIibav4X3EIWfJUn56umT38MEIvhtnz7ViP6d2mpZ53P0XSag1+LCeapwqVc ulN/si/DXs4A8LVoztdUbgzNXeFFE3RJt1DAjTY0Q+RsfSGSZs30cQx6xH7cghGuNffaY/ uXP6SKpTpjp2HzGgM9ejtTd/ck7No5ORU0pch6O+bSeNZHvN4tKRBim9FM4qYvAsZ1+bew O8JCz2Aoq7Ty96pM3KAwkFb8wIPRD7+NpbV7RTs1jF/+fo9Z8WhtBQmlEoLEQw== ARC-Authentication-Results: i=1; rspamd-54ff499d4f-k7qd2; auth=pass smtp.auth=dreamhost smtp.mailfrom=dave@stgolabs.net X-Sender-Id: dreamhost|x-authsender|dave@stgolabs.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|dave@stgolabs.net X-MailChannels-Auth-Id: dreamhost X-Stupid-Drop: 407707ff4224a7c7_1654092848563_2814264021 X-MC-Loop-Signature: 1654092848563:3501004101 X-MC-Ingress-Time: 1654092848563 Received: from pdx1-sub0-mail-a312.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.116.106.119 (trex/6.7.1); Wed, 01 Jun 2022 14:14:08 +0000 Received: from offworld (unknown [104.36.31.105]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dave@stgolabs.net) by pdx1-sub0-mail-a312.dreamhost.com (Postfix) with ESMTPSA id 4LCrjp16SGz1n; Wed, 1 Jun 2022 07:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stgolabs.net; s=dreamhost; t=1654092847; bh=ekzYMHKdKV6fWrlgsf5nHAFuBaR41uhTH85pDwc86aM=; h=Date:From:To:Cc:Subject:Content-Type:Content-Transfer-Encoding; b=D6FSAiSZtTVR6H3x+GAyqTNCIwFSI1iTejQDf3r1dbbHHTFYAO+RRHoKMMqn33Z/T PryFfcXkgblB9trjhgoVHzckvhFGEkXr8cwN/Fz70DQQEs2T7Dn3NRTbNSWlwdUIVX SXWT8WmvJ/6GxBCq2ioXBqiDT89GN5MrQvErp9vZDboq2K4AywOcrVr30WkSLpUVI1 0mID/lN0tUnnsXM/ogXIWZwgDnCm5BQZVdpD/wYlQb/lBC74oMKltG3CH2+bTg9tQ9 xtL4GmQJ40Se6syhWCMN4D9ICt1LE0kSdO0ZIUPGZoI7qABhHEqkMKVPcjJz9TBOoM nWgGE7fXC32HA== Date: Wed, 1 Jun 2022 07:00:41 -0700 From: Davidlohr Bueso To: Ying Huang Cc: "Aneesh Kumar K.V" , linux-mm@kvack.org, Wei Xu , mhocko@kernel.org, akpm@linux-foundation.org, rientjes@google.com, yosryahmed@google.com, hannes@cmpxchg.org, shakeelb@google.com, dave.hansen@linux.intel.com, tim.c.chen@linux.intel.com, roman.gushchin@linux.dev, gthelen@google.com, a.manzanares@samsung.com, heekwon.p@samsung.com, gim.jongmin@samsung.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/6] mm/vmscan: use node_is_toptier helper in node_reclaim Message-ID: <20220601140041.wjszzmkswy4dkn4n@offworld> Mail-Followup-To: Ying Huang , "Aneesh Kumar K.V" , linux-mm@kvack.org, Wei Xu , mhocko@kernel.org, akpm@linux-foundation.org, rientjes@google.com, yosryahmed@google.com, hannes@cmpxchg.org, shakeelb@google.com, dave.hansen@linux.intel.com, tim.c.chen@linux.intel.com, roman.gushchin@linux.dev, gthelen@google.com, a.manzanares@samsung.com, heekwon.p@samsung.com, gim.jongmin@samsung.com, linux-kernel@vger.kernel.org References: <20220416053902.68517-1-dave@stgolabs.net> <20220416053902.68517-3-dave@stgolabs.net> <87h755dip9.fsf@linux.ibm.com> <61c47f98b4c0be1d5da5e097779412f9edd70753.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <61c47f98b4c0be1d5da5e097779412f9edd70753.camel@intel.com> User-Agent: NeoMutt/20220429 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Wed, 01 Jun 2022, Ying Huang wrote: >On Tue, 2022-05-31 at 17:20 +0530, Aneesh Kumar K.V wrote: >> Davidlohr Bueso writes: >> >> > We have helpers for a reason. >> > >> > Signed-off-by: Davidlohr Bueso >> > --- >> > =A0mm/vmscan.c | 2 +- >> > =A01 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/mm/vmscan.c b/mm/vmscan.c >> > index 1678802e03e7..cb583fcbf5bf 100644 >> > --- a/mm/vmscan.c >> > +++ b/mm/vmscan.c >> > @@ -4750,7 +4750,7 @@ int node_reclaim(struct pglist_data *pgdat, gfp_= t gfp_mask, unsigned int order) >> > =A0 * over remote processors and spread off node memory allocations >> > =A0 * as wide as possible. >> > =A0 */ >> > - if (node_state(pgdat->node_id, N_CPU) && pgdat->node_id !=3D numa_no= de_id()) >> > + if (node_is_toptier(pgdat->node_id) && pgdat->node_id !=3D numa_node= _id()) >> > =A0 return NODE_RECLAIM_NOSCAN; >> > >> > >> > =A0 if (test_and_set_bit(PGDAT_RECLAIM_LOCKED, &pgdat->flags)) >> >> >> Are we really looking at the top tier in a tiered memory hierarchy here? >> The comment seems to suggest we are looking at local NUMA node? > >The code change itself is correct. But it is an implementation details >that node_is_toptier() =3D=3D node_state(, N_CPU). And after we supporting >more memory tiers (like GPU, HBM), we will change the implementation of >node_is_toptier() soon. So I think that it's better to keep the >original code. Agreed. Thanks, Davidlohr