Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5867530ioo; Wed, 1 Jun 2022 14:29:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9POakkX9VraypJziMajhJ68SxH7LLWIIGPaI+4BjUn3Y772gS27/y978dvADkU2m0v1T9 X-Received: by 2002:a17:90a:4897:b0:1c7:5fce:cbcd with SMTP id b23-20020a17090a489700b001c75fcecbcdmr36588389pjh.45.1654118966045; Wed, 01 Jun 2022 14:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654118966; cv=none; d=google.com; s=arc-20160816; b=KJVnP1d3ugCZBzgJ7hc36HVJMlsd4FkXP64F99PWqhOgER5v+RWNXRrsVtdBci3rQt qidSO0URwRh8XOh2BaiOpO62vpZJ/aXf6ddBUykZ62uOHL+eZbs2990G5REhLSJtMdMT zVXBykLcT4zZJLqJloB8amvrfK7Md1RCksT7TrogrOzxCAQe+ehLulnlvieGZIMv4UZf OWZUgmlc/sm5s8ovVvHX/Ys5K3i5vvUZ7XKQ4p3g2E2V57notcK9XhzA+ybsGkeUb1/A A3cWlM3eECUeLxhHtjbx8s0Kc12dIy7sVD2IKP8JJtnBxLTBOnGrhYpF5SNjckytYLkT BHgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=o52iNdoPgfNxtCXuGtUnTHxhtVjoQFXXfw2YyfadNQ4=; b=kmazaNV77bP3Ezpahgr9XdYc6I5Cm0InLvfTy5SWx1j+F7jqiGbhphEstkbXqdZ658 tLr5TXCEhhUg36DCvHPg4lhXNNAsdUU58G9V1XQTV5+4ochqCsEQtiUzm0j3Ii6kwVCE 8sfLCFdjodvEOtDoMrA143wdl9yTw01ltGUALWSXPT7G+KB7WsG0fflsCr1b1Q3kU1Gv fV3i8g1L2CcxtfUFP/HCc7WrKEgQSx+XBCQBVH71epI3k0DpngT61Bm83PiGZFCbZCyk JThGkULxY93iir9+1Tfd33Gn0xMKlDy2lyV7+DwmmQ14ccTKu8CN75n6XoYtd03ilIYI unDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=nxEFXMvw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z17-20020a170903019100b001645730e720si4268417plg.138.2022.06.01.14.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:29:26 -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=@ibm.com header.s=pp1 header.b=nxEFXMvw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B5DAF2050F4; Wed, 1 Jun 2022 13:19:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233032AbiEaLvM (ORCPT + 99 others); Tue, 31 May 2022 07:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230080AbiEaLvJ (ORCPT ); Tue, 31 May 2022 07:51:09 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 542249AE57 for ; Tue, 31 May 2022 04:51:08 -0700 (PDT) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24V9kRtf029119; Tue, 31 May 2022 11:50:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type; s=pp1; bh=o52iNdoPgfNxtCXuGtUnTHxhtVjoQFXXfw2YyfadNQ4=; b=nxEFXMvwbp5pU0Q15dqBk8nlrxUJvvNntWb74U7wv4TcxEEzGjbqeANQIQIRz7z69ZA+ Wb9ghs6u1/4s5bQCSRfixnR6s9JFATai5BN2swBMqPWmIk/iAYY5NLIP4OXyG6R7QEra a5hsTmE8zg75XBKD1Zb+7z+SRAEch0oEZVOvfx7OMXPgzm4qYV8nX1sUmoi430XnCd0Y 6jf0lVoHU1nY3Knq9EtIFE225BgUziSSC3I/LG9Ho7WPfBrzPZPOWa5FWGC2HkIeLATS DBYqbSA8H4Gs5P7ePqfSiK0XiWWZGXCjJkGS/9RalyUnSwQ3pZWYr8c07RN7Cmz7z5KE uA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gdgp4a4jr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 May 2022 11:50:53 +0000 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 24VAjvWr026247; Tue, 31 May 2022 11:50:53 GMT Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gdgp4a4jn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 May 2022 11:50:53 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 24VBZnYh032334; Tue, 31 May 2022 11:50:52 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma01dal.us.ibm.com with ESMTP id 3gcxt57s88-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 May 2022 11:50:52 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 24VBopEA25690410 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 31 May 2022 11:50:51 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9D681AE066; Tue, 31 May 2022 11:50:51 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1E40CAE062; Tue, 31 May 2022 11:50:45 +0000 (GMT) Received: from skywalker.linux.ibm.com (unknown [9.43.75.179]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 31 May 2022 11:50:44 +0000 (GMT) X-Mailer: emacs 29.0.50 (via feedmail 11-beta-1 I) From: "Aneesh Kumar K.V" To: Davidlohr Bueso , linux-mm@kvack.org, Wei Xu , Huang Ying Cc: 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, dave@stgolabs.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/6] mm/vmscan: use node_is_toptier helper in node_reclaim In-Reply-To: <20220416053902.68517-3-dave@stgolabs.net> References: <20220416053902.68517-1-dave@stgolabs.net> <20220416053902.68517-3-dave@stgolabs.net> Date: Tue, 31 May 2022 17:20:42 +0530 Message-ID: <87h755dip9.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: hFaP5Wlngd4z14fDXM8_M7vK4N94Bcjo X-Proofpoint-GUID: 7RA_a--nVo-HGuKedV7RKWPYn2WNoNhL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-05-31_04,2022-05-30_03,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 impostorscore=0 mlxscore=0 clxscore=1011 suspectscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2205310059 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 Davidlohr Bueso writes: > We have helpers for a reason. > > Signed-off-by: Davidlohr Bueso > --- > mm/vmscan.c | 2 +- > 1 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) > * over remote processors and spread off node memory allocations > * as wide as possible. > */ > - if (node_state(pgdat->node_id, N_CPU) && pgdat->node_id != numa_node_id()) > + if (node_is_toptier(pgdat->node_id) && pgdat->node_id != numa_node_id()) > return NODE_RECLAIM_NOSCAN; > > 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? -aneesh