Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp4330862ybt; Mon, 6 Jul 2020 01:47:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRhsu06PlGWNxKA62nJG0v2ZgnuZUsfqgPSI3fdSFiHvsYJsieaC9EoybId6ABKhFvxY1h X-Received: by 2002:a17:907:9484:: with SMTP id dm4mr44492637ejc.56.1594025241354; Mon, 06 Jul 2020 01:47:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594025241; cv=none; d=google.com; s=arc-20160816; b=cHjgomvEQd9/0mgH3VYYItECBWMkUs2tuEzrBXf0ln5SRMsV2b+eLawX4frkyNZj0P V2B1IYSMjFpEfuGxk4kJ5lMUgj1ydXcopIUdqFeRDyyJ3RnrUIRHiOLA6VwbxOCdbq2i z16U1mgbNuJXmOxcna5U1UMMFA2TDX7//NutslL7yakfzxagFNNSYHjAbKMKLSo9AxVx NndECbs486/rSd32j/ouleS1CeYcwNjnenEZp86X/1a8TMfN4glMtzne7woBdh3LFsLl CwcesRhob/mTHO/ka8A+RFSEKGY1fh8eISOfgzXSQmoCd1SHxyw9x/sosXxxvCwrpeAb /SLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=1gn4tP1a3mQ0vHJtA5M9X20sZ0Yx6VV0+93sudXEwpQ=; b=raMV35aKTQ2aHi+Xkr2KYoH39sATuN9EDKMK98hONFy2Bxml8nKsdVMoLagBMhAK3+ e/k3CNoG7cUrHXrQAMnhC8TXX8Z0pug1E5uYRibRs8aFkBWxpOGFESSA14GqCOhwsijE 9/oj1SgR1EK9sukbWkzCilWF1MXhVK/9kfKcaal+a4mz8dVtFAMBj1noQSZzedxGIYCS HGMTq+ukzHYesdaPzqqSjtRrhBoRsyhCyaQpU1xybCxKB+9EECi18EqytVMUr62LXxVr RHpp08lraw2l9LM5R86xyG6msSU9IjOlOFEB3xMUncoJZN5qzoxhA7/O6EK7aVvSg50G 1E7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cdQJzqUG; 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 qq26si12284137ejb.675.2020.07.06.01.46.58; Mon, 06 Jul 2020 01:47:21 -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=cdQJzqUG; 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 S1728575AbgGFIo2 (ORCPT + 99 others); Mon, 6 Jul 2020 04:44:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728024AbgGFIo2 (ORCPT ); Mon, 6 Jul 2020 04:44:28 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9C39C061794 for ; Mon, 6 Jul 2020 01:44:27 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id q198so34055371qka.2 for ; Mon, 06 Jul 2020 01:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1gn4tP1a3mQ0vHJtA5M9X20sZ0Yx6VV0+93sudXEwpQ=; b=cdQJzqUGdpZJEb5c20KqBi5IyiJX6jlv+5wpixruD3h7iTrHeUp6CWbiT1mtPFf35W AI5DH43th8SHrAGlwHViOUIJAO4oZqSa1Sl8k8uJ1AF0rn/HAa1RXBf0asQstvovFnXQ oQhythpoL3CircgvR/XSp48jqH8t60zel9R2+EpXMv9nZ2xsQxEdjDbcsqtdWtJMFHAs wsloBxalpVfzqchepeJ5XGmWQ4HjZd/HlCXgT5ECjgr4A0ICqKP9Gfr2QtRKB0nOLFOM nkq1RLSU2vWC5z4OZqrUrK4xEO4q3phx4caQUi0ObM4fDPHc9NVU6ATZAiJMUtJplRky hJxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1gn4tP1a3mQ0vHJtA5M9X20sZ0Yx6VV0+93sudXEwpQ=; b=dRaCdOHUR4BPIwNa6woH2w4W70tRWPn/XyiN3X4ZFecel0mzwUL6/pY2KLsK5Wzb1d 7Jl/EBCDI0btEeoqEsoZSDYEfivNNiq3kg4QM8DPIJt2HuoOBvKmjyaOs3+vQVGkjsNv rNVG3BsFED/dab1+bfxV8gdu/gG72dla11LSRbIkzlET1ei6hc6s+mjzlsmKrUdGlGd7 XJeixclx0MMhBXKYak2pNz9wLRSP78S4pAcVN91yEoXElBVHXABWUe1fy+o3wzLvfgfc GrRK1HI/v+BN8OG97vmCvaeLy5UsHTWZ3SAlu6EEvpdJzt3P/1LN5bJGEdU4uD40YK5g Lj2Q== X-Gm-Message-State: AOAM533Xh/iC735TusA59+pmyNXcBQhj0AHnaO3VHorxrIOc8asxf6zT QYYgOAibNqI851BieMQA482aaTQJJcjGzuOUGWU= X-Received: by 2002:a37:7d86:: with SMTP id y128mr36550994qkc.343.1594025067131; Mon, 06 Jul 2020 01:44:27 -0700 (PDT) MIME-Version: 1.0 References: <1592892828-1934-1-git-send-email-iamjoonsoo.kim@lge.com> <1592892828-1934-9-git-send-email-iamjoonsoo.kim@lge.com> In-Reply-To: From: Joonsoo Kim Date: Mon, 6 Jul 2020 17:44:16 +0900 Message-ID: Subject: Re: [PATCH v3 8/8] mm/page_alloc: remove a wrapper for alloc_migration_target() To: Vlastimil Babka Cc: Andrew Morton , Linux Memory Management List , LKML , kernel-team@lge.com, Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi , Michal Hocko , Joonsoo Kim Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2020=EB=85=84 7=EC=9B=94 4=EC=9D=BC (=ED=86=A0) =EC=98=A4=EC=A0=84 1:18, Vl= astimil Babka =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On 6/23/20 8:13 AM, js1304@gmail.com wrote: > > From: Joonsoo Kim > > > > There is a well-defined standard migration target callback. > > Use it directly. > > > > Signed-off-by: Joonsoo Kim > > Acked-by: Vlastimil Babka > > But you could move this to patch 5/8 to reduce churn. And do the same wit= h Yes, I now realize that it is possible to make this change earlier. However, reordering the patches would cause additional change so I will not change the order in the next version. Result would be the same. :) > mm/memory-failure.c new_page() there really, to drop the simple wrappers.= Only Okay. As you suggested below, with NUMA_NO_NODE handling, we can remove the more wrappers. I will do it. > new_node_page() is complex enough. > Hm wait, new_node_page() is only called by do_migrate_range() which is on= ly > called by __offline_pages() with explicit test that all pages are from a = single > zone, so the nmask could also be setup just once and not per each page, m= aking > it possible to remove the wrapper. I have tried this suggestion and found that code is not simpler than before= . However, there would be minor performance benefit so I will include this change, too. > But for new_page() you would have to define that mtc->nid =3D=3D NUMA_NO_= NODE means > alloc_migrate_target() does page_to_nid(page) by itself. Yes, I will use this suggestion. Thanks.