From patchwork Tue Jun 23 06:13:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonsoo Kim X-Patchwork-Id: 11619821 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 B33781392 for ; Tue, 23 Jun 2020 06:14:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8143D2077D for ; Tue, 23 Jun 2020 06:14:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vWo1Ivst" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8143D2077D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 92E656B0005; Tue, 23 Jun 2020 02:14:29 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8DDEF6B0006; Tue, 23 Jun 2020 02:14:29 -0400 (EDT) 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 7F45D6B0007; Tue, 23 Jun 2020 02:14:29 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id 67DF66B0005 for ; Tue, 23 Jun 2020 02:14:29 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 24E1E8248047 for ; Tue, 23 Jun 2020 06:14:29 +0000 (UTC) X-FDA: 76959462258.08.gun91_1f0827e26e39 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 03DDA1819E764 for ; Tue, 23 Jun 2020 06:14:28 +0000 (UTC) X-Spam-Summary: 2,0,0,088defd01a0bf46a,d41d8cd98f00b204,js1304@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1359:1437:1534:1540:1711:1714:1730:1747:1777:1792:2198:2199:2393:2559:2562:3138:3139:3140:3141:3142:3351:3865:3866:3867:3872:4321:5007:6261:6653:7576:9413:10004:11026:11658:11914:12297:12438:12517:12519:12555:12679:12895:13069:13311:13357:14181:14384:14394:14721:21080:21444:21451:21627:21666:21990:30054:30064,0,RBL:209.85.214.194:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100,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: gun91_1f0827e26e39 X-Filterd-Recvd-Size: 4054 Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Tue, 23 Jun 2020 06:14:28 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id k6so8664355pll.9 for ; Mon, 22 Jun 2020 23:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sJhG/EECQU60fMMJwW7ZSgqGSJ0Sa1bGibgzSWunQu4=; b=vWo1IvstvoWznzT3ERU5FriztuAmiopI/sb+aB05u1jaMs3PN5oYl4yHyzRG6CJCb8 FzJfFKI6Llo0xezihbIfX/06+y6IXBAAdNyF9D59mmFqGZZNQUWtrUocg909mXZVDg4t ZImR5hNQzQwUdZTlvNz3Juk8WhWsThIKMlz8Fygekl3e1lh5Kf2S4PSJSWCHtj31ARRa lxZ+SBxhHUiRstrhg0wcC7E7qmJEFr4ZS9/lwEh+tUus3J5XaGgqB9j1NiOJ4dq6+jNu drx814lJrhLFKLRUwXfEPoQxu6F5oarFFZ4euvZEB2a1wNEQIuKVxy53AoOuZLG+Yu7b BtTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sJhG/EECQU60fMMJwW7ZSgqGSJ0Sa1bGibgzSWunQu4=; b=kcs21oqsmqaynIukIywA4NA9TjKqa9ldV6xi9OuUpl8dwYMB7eq3aPORBFDuhsrcRl 6rsTYs9aUuBXT9AjJf1gApFFq+xbEUFPnt2pMnDftvw1jsuMbzGRCtOqLLriHr2BkDhb K1wSGcivpXF5csFXSgQE2y8V/bwYIUOWI/kZibqCJNBCI+FGJT22lH70/0uH6535BoMt nV4aMEQHtjLqRnIgX0Bt8ifxCzzwpzKaebF8x6VdIsBGw8FO29yTjZK/4ssPh55sYEIY PaIhe6/j5eRgLuc8Ex59yUVcsrd0aRk0yB6tgsVgzm0itm1tW9Kj3jykzlfHdQStnZgF N7cA== X-Gm-Message-State: AOAM531G0g7kbo1yLb75PQP/NnDhpFberQNZunPcrqhDEwGVCXmNQFEF 7GIDWqsJ9+VcBgA7/PvI3GU= X-Google-Smtp-Source: ABdhPJylyWj57oSOyabKM1yxMkK1RxlL58E4vg04DIQfNVXGZdk+uFb/jTvDgkSA1CxgA9+zBkNyig== X-Received: by 2002:a17:90a:e50b:: with SMTP id t11mr22522184pjy.109.1592892867815; Mon, 22 Jun 2020 23:14:27 -0700 (PDT) Received: from localhost.localdomain ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id m15sm12801093pgv.45.2020.06.22.23.14.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2020 23:14:27 -0700 (PDT) From: js1304@gmail.com X-Google-Original-From: iamjoonsoo.kim@lge.com To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, Vlastimil Babka , Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi , Michal Hocko , Joonsoo Kim Subject: [PATCH v3 1/8] mm/page_isolation: prefer the node of the source page Date: Tue, 23 Jun 2020 15:13:41 +0900 Message-Id: <1592892828-1934-2-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592892828-1934-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1592892828-1934-1-git-send-email-iamjoonsoo.kim@lge.com> X-Rspamd-Queue-Id: 03DDA1819E764 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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: From: Joonsoo Kim For locality, it's better to migrate the page to the same node rather than the node of the current caller's cpu. Acked-by: Roman Gushchin Acked-by: Michal Hocko Reviewed-by: Vlastimil Babka Signed-off-by: Joonsoo Kim --- mm/page_isolation.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/page_isolation.c b/mm/page_isolation.c index f6d07c5..aec26d9 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -309,5 +309,7 @@ int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn, struct page *alloc_migrate_target(struct page *page, unsigned long private) { - return new_page_nodemask(page, numa_node_id(), &node_states[N_MEMORY]); + int nid = page_to_nid(page); + + return new_page_nodemask(page, nid, &node_states[N_MEMORY]); }