Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp174193ybg; Tue, 9 Jun 2020 20:10:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWEizjoDYzW35rLEyANU1WNPUI2mmYRLz1rV3c+hhvJpzx4Pf50nutSA+fh15r2h7GBght X-Received: by 2002:a17:906:3da1:: with SMTP id y1mr1304005ejh.109.1591758608197; Tue, 09 Jun 2020 20:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591758608; cv=none; d=google.com; s=arc-20160816; b=x+i77gHwZaGBpySHD6Xm5iG+JV8ryv7NSbseksOwQGYSMnc2EmGA1yjk4An374ta4v o/TFG0BIK3Lu+sxvaJf+nRmlYD9j7iYRxNGTulwm67ef2CXBmtcjVA1+FAxV2hPUnaSC nZIYUczGYfn/Nz1o7jrhF3Ae78WS1qckNCYY5o5WNNT/aK231sCoVqS3rJjTcj0kcKcV DT0A0PnDGICDfkNLqM3trbjKz8BpElb8EAYFpQik4ABI23J4uRW0uD5thbsEabOEfNAX L9mi71vbIkiEKd3B5n5LYSMuA8BxlRjrl6q4/MYqiT5Plcyzcxw9rUPzddZbgY5XgQoE FH1A== 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=Pp/qlAbI1TYog4rTQTyigrN+bIJRX23zhDU2fxPKerg=; b=xrDfERvnpBSKMPv6BKX6YJ+4JWY6I6FXDZ9F+zMRZEkOPwdOImvHG/TAdxyPGaliWW kWmOfjJp4XYpS/d1H6t7nZb/Sgc4Of9IJ0TcHydcMLU5arKxIg65KcCRFTmVIH/oJ4nr Dd7SLXz/92XkgiLDOox50glqSnIfbQyqy4lxDen8r1NDr3KoWEOGQjhLLuwt0BW+WjSA t1mKnBxEvzepYeRNSXW3hv6o4o6SYdquVvPd8tzd50ug1moSijlFLTAF6JT6qmlqKrzU O92jiC1NChfyn8imv/v8iVda9esXD41Ao9jjatOCPXJ+LKYd8Z6fefL5grZPwjxs9HFr nr2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N8gpG2Mf; 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 pw24si972844ejb.518.2020.06.09.20.09.42; Tue, 09 Jun 2020 20:10:08 -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=N8gpG2Mf; 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 S1726042AbgFJDHe (ORCPT + 99 others); Tue, 9 Jun 2020 23:07:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbgFJDHd (ORCPT ); Tue, 9 Jun 2020 23:07:33 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B80AC05BD1E for ; Tue, 9 Jun 2020 20:07:32 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id j32so666178qte.10 for ; Tue, 09 Jun 2020 20:07:32 -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=H62t/JdlIuyIYzghWFCAVoSqpH0Jzx40GlVt32/9DClMNzBLUQhgTVby0isnXwmFp4 SM0wdnAp7TPP5YI4Bf5OJY8FplWhtFL545Mfw3Ocqgje2VL8Kehoczedvzbb9mMY/tA9 I7nSHy/xFhgYto/WoGllSu+qCMkJHbK5DMuy6EMVhAM4iN5RMPKgYDCjSrfj7u2WHTI1 PUjVQ5POQGOacqspWTEZYSMR9mFAixGdhSuO2Q6fvTBAlk4/q7Yeb49nMVKMJgR2ZUTt bpxyIL/99IKBwbn+OVbnnUv4FRDTjpzhP7fTPydiJyRirP3l6a3p19O4sagX1bBYj/uP 4AkA== X-Gm-Message-State: AOAM532mv7NKfw/Xtx7qg8WdeWfqd61K9y0zZ+UfsBzFE7z2rMMJNAa+ 5Gixy2SWrmmlImbbRvvqDN9M8hVA64+rsh/suFw= 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.