From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E381C433DF for ; Mon, 6 Jul 2020 08:44:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4A3D520724 for ; Mon, 6 Jul 2020 08:44:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cdQJzqUG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A3D520724 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 C84AE6B000C; Mon, 6 Jul 2020 04:44:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C355B6B000D; Mon, 6 Jul 2020 04:44:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B25326B000E; Mon, 6 Jul 2020 04:44:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0219.hostedemail.com [216.40.44.219]) by kanga.kvack.org (Postfix) with ESMTP id 986BB6B000C for ; Mon, 6 Jul 2020 04:44:28 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 455AB181AC9CB for ; Mon, 6 Jul 2020 08:44:28 +0000 (UTC) X-FDA: 77007014616.27.sugar45_16096e726eaa Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 14AE83D668 for ; Mon, 6 Jul 2020 08:44:28 +0000 (UTC) X-HE-Tag: sugar45_16096e726eaa X-Filterd-Recvd-Size: 4763 Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Mon, 6 Jul 2020 08:44:27 +0000 (UTC) Received: by mail-qk1-f196.google.com with SMTP id c139so34005299qkg.12 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=n8WxlSGOEfD/hegRgjeKmJ4HmKt3LcvbjcDq0YQVy6ZW6rZTu51mTg8L+JwkYX2WQb jNkM9Bxd3zKT+JjWTIvjPDT7fKLqOezdD3GU9c4aMbqvA5vtvTfiNipH7VQqTZ+CrVsd 8C8XVueHKTTVczP/bjLs85IoIl2iDlTJljrVMy7gd/Fs2SBNi8yBt+wHgKZRFI8k86R0 h5RJbg7uChMjXPHeBidnQBmz+sbpnnxQiM97dJEIven0Gla+QVzDGJIDNwGWz6GzCXTj 14Z9BNXKYQ4xI5Ys3641CJa4pjJXEFkZCpeSGLZBcHl1SJ3HhPYHIlzkYxm7NHAu7ncZ RzBg== X-Gm-Message-State: AOAM532FD5QRtKY6Kyxqv3zUPXWscRO79iAlGvwWEuyD8aRmP/xHDT+k FRuyT/X33AT+iDAcwhOMURsaBqZC3fs0Aheol8s= X-Google-Smtp-Source: ABdhPJzZUVL5o8BCUoCBFqtyIPeg7e3XR2TIpizms/2OXb5Q5c5XHfTYyZg0aJGM+abWNaEIiI3FmWc2blK3/WvlOLw= 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 X-Rspamd-Queue-Id: 14AE83D668 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.