Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp820319ybt; Tue, 7 Jul 2020 00:45:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5I1wE7lm805qqwQo6Epml7Dh8Y52ftrQ7AOAhZlU8/xgmtigI/UFKBwi7tLUGLVo+nKLt X-Received: by 2002:a17:906:a892:: with SMTP id ha18mr47353567ejb.462.1594107952302; Tue, 07 Jul 2020 00:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594107952; cv=none; d=google.com; s=arc-20160816; b=Fbh7u4liUgyQGDvY0Xgo/XOdM4NApdeurDjRmnJg/lTeNrTEn1ChCy4ZEfhsazFxj6 aALP1RvrodAV+FhEolE+ivGtOVJhs8jhX5AgaBXwxnFLu+h2Y8mPGglc9qABSfc06MZI JWxdSY1xkzXgHqZ2ENIqieFTZkkAhIYUd6R5TjzkLhfY46hQzGLi33Z6RkYPHUDaUSEE vvgrfJYvKvLrip5MSRFDCmQUI7R6ePbhWaKJe2VuxK2NveQ69Vzol307NVlyp7NWOUSC lbmyuAMjpGO6p38fpgxxTrz78UEIDC0PmJ1+5lpgJ99ODZ/gWIeUA4Ri60MKWx3B3KVM 0e4w== 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=P/aiheJ0p6r7Izb+UhndcYD22dz84oVI4Omx/UK78HCQcxuDuAUCLVgC5FxBV7DRQR U/KmONylL6id0cDvAR1fpu3EzyMS1CShNc3YhNUTJ7Fq+4g3ohHZ60uDECnjVCNCY1zm eLkHR3I77J69ycYWZfSlp+x8XeT/EfWtZP/2T7dnaQuNiyswlvDiwaZM2mYVuZeb6S4p OygNPyyPlLzqJEIDZBPCABjssePqktaguSQcFi7BRzEYGnK/SPOv1Q7PQ3YJ6KN1waBV gIOKSnjEkOXJ46WzLu8jazUjzZ6n7StLe94BNLYDP580yMlkHZ8jBtgE92GnzhU2c1EH RbMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vbad23Al; 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 p18si14224690ejb.157.2020.07.07.00.45.28; Tue, 07 Jul 2020 00:45:52 -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=Vbad23Al; 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 S1728254AbgGGHpP (ORCPT + 99 others); Tue, 7 Jul 2020 03:45:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgGGHpO (ORCPT ); Tue, 7 Jul 2020 03:45:14 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A27CC061755 for ; Tue, 7 Jul 2020 00:45:14 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id u5so18079814pfn.7 for ; Tue, 07 Jul 2020 00:45:14 -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=Vbad23AlnQOk0GUC76j8CTK+/qKNN9hFL3i4/MhHD281K/tlIVzkVrKX4ZMncJqnqk 4XNfwEBuQgaHmn0Wl31LFSUeMY8sa0dLH3bKra/rBA0Qa1Qts+90pFXiFKK2ZLdsEDA7 k5+eacop/fCCryMmD+Qb8/3DA26WUItWVZVfjT8HKOoBwVuoYcb4YA+2TVsN2IrnZdkl P0I15QZfDAR1YhCB2DI4ZP1cwR1eXVgAJ4dX3cyIXs898jdTff6o0D8NGUQD2igFTqTR gpcn0NwM2KrjkJ8NrAhACysJ496YTc48AZgzHlAtVTePQXnO0TC4i3RifyjxCK4+GD9F O2Zw== 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=IJdc38BMIULpS6InuWTjJanTm7lzB9jcPkorNDeAcUJlYyslXHSvMRi0vaJCEBF/mY nGENqi/8y3kvhjNoE9hpR3brnWMf0fMLFP5CNv/b9ZgjuegOFqZBMsA78tu+oiagsfG0 RK7yaUIF24ae+4CHbXE9ywl0n1FAoPl6uizdZMksrU/qBDhCfvMewttFv96ncPmGkBWJ VHxoLvdETpWxFdzwbzGUWmrkp2ZjjVTy/ai78ohdnF2Jqg6M3XpuUqwvMCxtMcviEVCB Ntir3/k2kdQhwoKyoAJJztJU1LrE/LhuWnRUUeZBxyU4n0/Xj5XTY3J57uzmtF4tG0KG 45rA== X-Gm-Message-State: AOAM532zbhVbs8uWCR0XY+y2yFRVt6bWcYMpYjb2zCgeSZVFQmeyB7fF UjeoEG9DRT4c2tFtWZB8Btg= X-Received: by 2002:a63:d40d:: with SMTP id a13mr43580473pgh.225.1594107914104; Tue, 07 Jul 2020 00:45:14 -0700 (PDT) Received: from localhost.localdomain ([114.206.198.176]) by smtp.gmail.com with ESMTPSA id 191sm21330151pfw.150.2020.07.07.00.45.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jul 2020 00:45:13 -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 v4 01/11] mm/page_isolation: prefer the node of the source page Date: Tue, 7 Jul 2020 16:44:39 +0900 Message-Id: <1594107889-32228-2-git-send-email-iamjoonsoo.kim@lge.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594107889-32228-1-git-send-email-iamjoonsoo.kim@lge.com> References: <1594107889-32228-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