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=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 D48CDC433DF for ; Wed, 10 Jun 2020 03:07:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 89A9720734 for ; Wed, 10 Jun 2020 03:07:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N8gpG2Mf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89A9720734 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 152C86B0002; Tue, 9 Jun 2020 23:07:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1038E6B0005; Tue, 9 Jun 2020 23:07:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 019026B0006; Tue, 9 Jun 2020 23:07:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0216.hostedemail.com [216.40.44.216]) by kanga.kvack.org (Postfix) with ESMTP id DEAD76B0002 for ; Tue, 9 Jun 2020 23:07:32 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 96E903575 for ; Wed, 10 Jun 2020 03:07:32 +0000 (UTC) X-FDA: 76911816744.14.song11_3800fb726dc7 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 6E59418229835 for ; Wed, 10 Jun 2020 03:07:32 +0000 (UTC) X-HE-Tag: song11_3800fb726dc7 X-Filterd-Recvd-Size: 4801 Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Wed, 10 Jun 2020 03:07:32 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id w9so698612qtv.3 for ; Tue, 09 Jun 2020 20:07:31 -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=Pp/qlAbI1TYog4rTQTyigrN+bIJRX23zhDU2fxPKerg=; b=N8gpG2MfNEeCZAi7wb/OaVJRGW80WDIAEt+1kte5r+MLh3hqA8HDtwwboGczXjJjtl 0PRz/UMRbrSQjdybI6B9s8l1qWpk0Of6Du+63felYtswZJ78tznHbPs6xuXOzL9UeBJU c61ifXvqwMN+Ey4XlwodKUCWkE4tN5ec1wjJ+xCDc62K3FDwulpiJGhpXUVzNcw9thYu Kgz1XvAGMJeJb4fFk0PctyvoxFF56QmFvzAo5i+XO0+vyAxx/ByJU2dwQTZjxn2cQ2Oy zbjqb08xplMJb77Q55KNwfzLKg214FTe1Lyqli+ykrNPwFPPg6MB06Yy92xwsS4572E+ 8aJg== 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=Pp/qlAbI1TYog4rTQTyigrN+bIJRX23zhDU2fxPKerg=; b=LN5nHSYPp2D7SqZNXjoAtnBanVC4RLdg1sgo3dBAcvN9NGrkSCOUtwkOr6axYl3Zd1 TaFl8F9u6Hss/fq6bho4JRrsB5BxWkYFj1N5VFN5Tpvoitvl9y8KVFz5k3Z4CGWjBZxo QfaC0CMlMX6T9cmrm5SlablSx4omaOv6YqjtiIePX55gTxaodihYrV4DZeo7XBCacqhW 60EtCQhaHZ4bu3aRWygX/3cpSpKBg13Pod/o4KCAa6H6omIkCKYprKP7mySqgulW76Im JIkdo7D/gUZtYomlf78vGqyeJlH3NN//ioDWP1OR6aui3gMOQfjPabMckFWYvS4dm7DF Q2JA== X-Gm-Message-State: AOAM532mu0ObYK9h97a/C5UQixafRdq0bAa4IhMxQJucZ26EoWQK83Ay WNb0ttrT0HmQBoGeHVp4smNbRcvUS/8h7RNZwy0= X-Google-Smtp-Source: ABdhPJxLyoSMn/N3QznHvELiBCI9Wonu2ALWZfIQOPd967qBid40hkbkFKSrParbIZsm+ShNs1B0hZK2SWiUZIaO+f8= X-Received: by 2002:ac8:70da:: with SMTP id g26mr1008875qtp.333.1591758451245; Tue, 09 Jun 2020 20:07:31 -0700 (PDT) MIME-Version: 1.0 References: <1590561903-13186-1-git-send-email-iamjoonsoo.kim@lge.com> <1590561903-13186-4-git-send-email-iamjoonsoo.kim@lge.com> <20200609132438.GE22623@dhcp22.suse.cz> In-Reply-To: <20200609132438.GE22623@dhcp22.suse.cz> From: Joonsoo Kim Date: Wed, 10 Jun 2020 12:07:17 +0900 Message-ID: Subject: Re: [PATCH v2 03/12] mm/hugetlb: introduce alloc_control structure to simplify migration target allocation APIs To: Michal Hocko Cc: Andrew Morton , Linux Memory Management List , LKML , kernel-team@lge.com, Vlastimil Babka , Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi , Joonsoo Kim Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 6E59418229835 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 2020=EB=85=84 6=EC=9B=94 9=EC=9D=BC (=ED=99=94) =EC=98=A4=ED=9B=84 10:24, M= ichal Hocko =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On Wed 27-05-20 15:44:54, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > Currently, page allocation functions for migration requires some argume= nts. > > More worse, in the following patch, more argument will be needed to uni= fy > > the similar functions. To simplify them, in this patch, unified data > > structure that controls allocation behaviour is introduced. > > > > For clean-up, function declarations are re-ordered. > > This is really hard to review without having a clear picture of the > resulting code so bear with me. I can see some reasons why allocation > callbacks might benefit from a agragated argument but you seem to touch > the internal hugetlb dequeue_huge_page_vma which shouldn't really need > that. I wouldn't mind much but I remember the hugetlb allocation > functions layering is quite complex for hugetlb specific reasons (see > 0c397daea1d4 ("mm, hugetlb: further simplify hugetlb allocation API") > for more background). > > Is there any reason why the agregated argument cannot be limited only to > migration callbacks. That would be alloc_huge_page_node, alloc_huge_page_= nodemask > and alloc_huge_page_vma. I did it since it's simple for me, but, yes, it's not good to touch the internal functions. Anyway, Vlastimil already suggested not to introduce alloc_control for any hugetlb functions. I will try it on the next version so the next version would not = have alloc_control in any hugetlb functions. Thanks.