Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp758820ybh; Sun, 12 Jul 2020 23:43:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyQIAj1jQRxR4qKNf+J5LzI8qvZPiArtn1l8N4tnt1ts9Up16G0ToU9DrH+65Cq7H8hUvh X-Received: by 2002:a17:906:1986:: with SMTP id g6mr62420813ejd.404.1594622587320; Sun, 12 Jul 2020 23:43:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594622587; cv=none; d=google.com; s=arc-20160816; b=C7KMPxyMORSyr1lKTcy4wKYfS/Ac21jbJsqNtAXJ/IgsJxhLP21NS0VoAG3EQfz6BZ 9Bqqd7OsU2jFoJ6nEdsmq4KaheXxQjwQ/2DJ9y5gV5igm5Za2F1cg9+UGKFOM9aWdzbC YiRK3p+2SxUw4noCATRhwePpls4Irxnr6HlHUevvaaKpePzoSsQvkUJYQwHcmrjO7kOr 3nO0J+J1n6pPYzukUpciOEg97iXCiAiYyudc7PxEdpALHSN/DIAgFTqPrVi1NGshFs9h 1vOubj8tv6Fx0ajyX6+ya/AjZeLCce4+j1qUgSxnyw3X/3T7viS0QMw8WYvZbiyYrdQQ bg1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=noldTA6TKGUO86OIVB7oA9T0/eymsgYb8B93ohzbuus=; b=rj+gZKcCSyR5OKnbtr5cIJ85MzlVPTaOyQPj4qSAm3SBINP76kF8TmARQ9smlxGD7Z wUYy36LvpDrOFZw4PGxEXZZeZUmCfuev02UtKNGnYYiyFmYNeL71UhvfCrTpbrOttOgR XQqF+Ly+RAavsrawBSPEqRjpfE95LJJwJOoVchbm2fJ3tOkyrJ/K/KuvRXNAtnustidR XGvCYR+WLDMSl9vqL90vjwDO25F0TybmbuXlScO8//T5TpVgnDGRvO8Jiv/ZkwXJbXnd +npkqr01tgy/zbBVUkO40W2KadEdqlC4dWcrf8najReGjUU9bCmezTyZlKa1n4bAhr8B swWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fJ2wAWd8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mj23si8822993ejb.746.2020.07.12.23.42.44; Sun, 12 Jul 2020 23:43:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fJ2wAWd8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728738AbgGMGmU (ORCPT + 99 others); Mon, 13 Jul 2020 02:42:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbgGMGmT (ORCPT ); Mon, 13 Jul 2020 02:42:19 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3865C061794 for ; Sun, 12 Jul 2020 23:42:19 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id gc9so5747030pjb.2 for ; Sun, 12 Jul 2020 23:42:19 -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=noldTA6TKGUO86OIVB7oA9T0/eymsgYb8B93ohzbuus=; b=fJ2wAWd8sVBowfNQlIYjTQgKE97koI1YqDvDAfd6uHrehSwNDh+QUIAWbXchLGE53T FO7SDKQBdY7BFhSnrxslfGgCGXHhSNRO0N6yZZ2HmUj1F5m/19tehni4HYoQY3gcT/8z Ds0wQ2ds0+bpJlNXyTCEj1dUR5G/rrimdM7a2VkzBXedNUK42Au4AeBre8ww++9pcMcQ vGOoXH6aGvhfQ75S4tnMBS2sH7e/NAhaysv1I2AMuqrflUr7w8HAMzzLGABi/jGfRU6j lLXyRu70tyicI0MyGZpyK6umgi4AQMlbIqZMWyRF7Ab5kyxDzagzK4LUm8DLiaoiQnbo q91w== 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=noldTA6TKGUO86OIVB7oA9T0/eymsgYb8B93ohzbuus=; b=p7g5ci66HApCnJzrBuFNkQHcvlLHzeKPNo9d0vzBOHBst4ObFr1WGnXwjQ9fbxs1wN vKmrc7mZgjYA1ISzUFgBYNnUCGgqA23A7ayjw+cHznoSvDdsGeGICjLl4AhhNljb+Tdk wg61fTStd+CUvfNZaxQMf37jceEXSttJxuDPXOLigkRzDCYC2NDNcdWU2B5RcuHVWvqz la+Y8u8ZwbFfW0TkoXok9qCpeh9emvh9mt2wT60O0GZjN2V4YPar1k1es+Xory6MMRde CL/PmV0e7Fm3FIDpY/ocXB/iUjNWD6Q2r3y7B/UEaeMuHfqDBtrWLAcduUrFlqi7VfZx zebw== X-Gm-Message-State: AOAM532NbyH3Qw+/laGUGnVoisQjPIbSqUT99hZY94GT6QX9aMFfM9Mx xIepHAE1lTbOdjTA1zRAaSA= X-Received: by 2002:a17:90b:488:: with SMTP id bh8mr19357095pjb.49.1594622539325; Sun, 12 Jul 2020 23:42:19 -0700 (PDT) Received: from localhost.localdomain ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id l134sm12448695pga.50.2020.07.12.23.42.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Jul 2020 23:42:18 -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 v5 1/9] mm/page_isolation: prefer the node of the source page Date: Mon, 13 Jul 2020 15:41:49 +0900 Message-Id: <1594622517-20681-2-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594622517-20681-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1594622517-20681-1-git-send-email-iamjoonsoo.kim@lge.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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]); } -- 2.7.4