Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3346191ybt; Mon, 22 Jun 2020 23:16:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJZeRssEYPzrndiLpWOUHIr4X/KwYEAucBJy6v3RXSMiKofj7H7Ff5OotOHkOL2Tpc4gUg X-Received: by 2002:a17:906:b15:: with SMTP id u21mr13800821ejg.520.1592893002249; Mon, 22 Jun 2020 23:16:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592893002; cv=none; d=google.com; s=arc-20160816; b=xBi29jbq7pIhDcTXadA8CzKkU8d7WsWDKBmaaZqQpW6Msg0o4uhXPxZvVNeJ5ypsY/ hFQNt/K5k+6rhBD1UlAnSIvJ5xpmKdO0Pwf5kva+WDR2yHw7xAJKxR0ljEty3qEM0WHh yAuyd9Rn8P1puIaiWYJMFQ2TxCt78P7EO2OKNBlOC7qjrikonNw3bQpzx45UO05d8yR9 gZxJkJ3ImxpPL4FBd543lzIMWoTbr5b5ovxynehGxHJ9iecUL+y/fZU1nNmnMpgGh935 M47VT9HufIbYmdFzG7qbF7nFUDheW8JJvKFR2UKkcByZV9OhbaibtwBCgaMXsnPVnZSM /xIQ== 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=sJhG/EECQU60fMMJwW7ZSgqGSJ0Sa1bGibgzSWunQu4=; b=1JfGOe13JlmYwNmvnXVPeSnsU65uc0nH3iKCZkJh8EHtfCJpiEDiKbnZ3H4ZUBzjrC 4Wl3bBDcJCSRk4YSgk2/+BxwslT/XmKJqwNcPwVxIaGLhM2m6KRav1PfFJvtLY+Yjyjw 5QKxWHsMnOu5qZzbTWvXn63DwTtQMfKvBUICX3QHohrZahJnkNkIN5UIsvsnqv9yA3JU KCYpsV5FqADFu8ZD4UJU8UlqRuEDrZ3jJSL4bbBzSQM3qyurxQ9UlmOUwoW/MYhPIkds csuWFBWWSNgUQd40r0SjWBUawTpyTLMWuamJttK6uUM8wnJL8iMBVabB/m8UfkDudusK nIUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vWo1Ivst; 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 o17si11170306edz.304.2020.06.22.23.16.19; Mon, 22 Jun 2020 23:16:42 -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=vWo1Ivst; 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 S1730793AbgFWGOa (ORCPT + 99 others); Tue, 23 Jun 2020 02:14:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730742AbgFWGO3 (ORCPT ); Tue, 23 Jun 2020 02:14:29 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46832C061573 for ; Mon, 22 Jun 2020 23:14:28 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id b7so767005pju.0 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=iaBXV9GhtOTUtwHKWWJGHmWjw9o4mUMcPI/RIPkw1JEItUeqUXoGF1hDTBeoHV9tIF QGIAdx5iOfPicu63vS1mz5i5uNyUeGno3+6iGhJ4a4eAbPSttlazmaKTdNrZnv30VqQt EEvgmEmSFBeeCrpOEMukRHePiHMbvObHhI2S6Dzx47/X4GNxpI/Zirb7gT7sVU63Hrzu EFYQzL4/AEEZxZSO67W0mjqQN9LXHC/67bu2DKhbjc9ETleSxXF5fji385r0myxCmR43 3ZFpO+KvdPyhR06VaMbJmhOjtKrJZt0xy8Y3J/sP1rRPFOgYpuluBHSGGbJByBl1yA6D OXxg== X-Gm-Message-State: AOAM532KnoZq2mSoKmQYmjSRGd72cLP03NKa6JWcUWCYQfyb6ZNU7wB5 y0TJWKUJnakFeDnaOSkD8l2qpQLkGWs= 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> 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