From patchwork Thu Feb 13 04:31:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 11379861 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AE9B7921 for ; Thu, 13 Feb 2020 04:31:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 859682173E for ; Thu, 13 Feb 2020 04:31:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 859682173E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B50786B050F; Wed, 12 Feb 2020 23:31:57 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B00926B0511; Wed, 12 Feb 2020 23:31:57 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A15A56B0512; Wed, 12 Feb 2020 23:31:57 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0122.hostedemail.com [216.40.44.122]) by kanga.kvack.org (Postfix) with ESMTP id 8731A6B050F for ; Wed, 12 Feb 2020 23:31:57 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 5AE733A82 for ; Thu, 13 Feb 2020 04:31:57 +0000 (UTC) X-FDA: 76483831074.20.dock62_2de81f19ec234 X-Spam-Summary: 2,0,0,54e471ad37b53f60,d41d8cd98f00b204,yang.shi@linux.alibaba.com,:minchan@kernel.org:anshuman.khandual@arm.com:akpm@linux-foundation.org:yang.shi@linux.alibaba.com::linux-kernel@vger.kernel.org,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1261:1345:1431:1437:1534:1541:1711:1730:1747:1777:1792:1963:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3870:5007:6261:10004:11026:11473:11658:11914:12043:12296:12297:12555:12895:13069:13161:13229:13311:13357:14096:14181:14384:14394:14721:21060:21080:21451:21627:30054,0,RBL:115.124.30.57:@linux.alibaba.com:.lbl8.mailshell.net-62.20.2.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: dock62_2de81f19ec234 X-Filterd-Recvd-Size: 2328 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Thu, 13 Feb 2020 04:31:52 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04446;MF=yang.shi@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0TprKpxQ_1581568298; Received: from localhost(mailfrom:yang.shi@linux.alibaba.com fp:SMTPD_---0TprKpxQ_1581568298) by smtp.aliyun-inc.com(127.0.0.1); Thu, 13 Feb 2020 12:31:47 +0800 From: Yang Shi To: minchan@kernel.org, anshuman.khandual@arm.com, akpm@linux-foundation.org Cc: yang.shi@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: vmscan: replace open codings to NUMA_NO_NODE Date: Thu, 13 Feb 2020 12:31:38 +0800 Message-Id: <1581568298-45317-1-git-send-email-yang.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 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: The commit 98fa15f34cb3 ("mm: replace all open encodings for NUMA_NO_NODE") did the replacement across the kernel tree, but we got some more in vmscan.c since then. Cc: Minchan Kim Cc: Anshuman Khandual Signed-off-by: Yang Shi Acked-by: Minchan Kim Acked-by: David Rientjes Reviewed-by: Anshuman Khandual --- mm/vmscan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index c05eb9e..567864a 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2096,7 +2096,7 @@ static void shrink_active_list(unsigned long nr_to_scan, unsigned long reclaim_pages(struct list_head *page_list) { - int nid = -1; + int nid = NUMA_NO_NODE; unsigned long nr_reclaimed = 0; LIST_HEAD(node_page_list); struct reclaim_stat dummy_stat; @@ -2111,7 +2111,7 @@ unsigned long reclaim_pages(struct list_head *page_list) while (!list_empty(page_list)) { page = lru_to_page(page_list); - if (nid == -1) { + if (nid == NUMA_NO_NODE) { nid = page_to_nid(page); INIT_LIST_HEAD(&node_page_list); } @@ -2132,7 +2132,7 @@ unsigned long reclaim_pages(struct list_head *page_list) putback_lru_page(page); } - nid = -1; + nid = NUMA_NO_NODE; } if (!list_empty(&node_page_list)) {