Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp186492ybg; Tue, 9 Jun 2020 20:38:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz923QEgcQIkwRminDpWTY2UQPgGiD88axgJdIy7gFoy+DyyqW41h3KPE3Hrljsv7yney5x X-Received: by 2002:a17:906:68c5:: with SMTP id y5mr1427111ejr.436.1591760326449; Tue, 09 Jun 2020 20:38:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591760326; cv=none; d=google.com; s=arc-20160816; b=W+/SIeA1FD/YsVkVFubil6FgpvzY5tbzBKN8uLtLgLJt0laF/67Kl/KOIjRYi4Nq1O Hv3lt8152OI6Vm6NZuF1ibF65KTHeTpJx42HzaciXBdmV/1sYROTX5x5N7Tv3PY2+xBR ESKMzD9Eywh+GAdixjJKGvFQiM3QYR5D7D5MGvZigaOQ2aUXtwUSqM7cxYrY1wkEAvKU PDKsvzCgPp9XUBGlpx4ZG3OVM4qnPTyQmuKn271It+EHql2KXQ0evnzeArefvgGX4S3o 0Wf25hcc/A5K2L+WBluHwNdR453uQ9gKoSlmKMf9koPcv8D0DJ5QbqO4QmHaBO/BkKDg Qh4w== 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=aBzWfu6PYILWg2j3aS8PQuGNOo2mBUXz1sdOHwFASq8=; b=HBjyg5/RBCOnPovWB6McfoP0a1MprEIu3eZo1XHHLR/LDGSibJDgQNeQIaFcDZLvHg QoGHS5AaYG+WMfJ6fAskO/uRb+tSTIdbb7VfBt0euc+nLuVijm2EygCkhRED19Aq+cgC QSaCQS4yrzPo++K/RsH+aws9/U8FRNj/+9EluCYBVryqhAYgMvJHmigIbclV6+FWHhsG JAcoEVxEuUSOy9sn8jKwL71h84BxBHNZzLo5LuvRg36fSKORiy/8GkLptpvxfdg+LXTT zKeEt1MpjhFhQSI5Z5B5PBDsIFst+fzBMhrJAUhFMsikzXOZC+3rmFNx6ut1EoiKMJzd c0nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GTT4UOjn; 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 jp23si11319316ejb.749.2020.06.09.20.38.23; Tue, 09 Jun 2020 20:38:46 -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=GTT4UOjn; 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 S1726085AbgFJDge (ORCPT + 99 others); Tue, 9 Jun 2020 23:36:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbgFJDge (ORCPT ); Tue, 9 Jun 2020 23:36:34 -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 6B55BC05BD1E for ; Tue, 9 Jun 2020 20:36:33 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id n141so817527qke.2 for ; Tue, 09 Jun 2020 20:36:33 -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=aBzWfu6PYILWg2j3aS8PQuGNOo2mBUXz1sdOHwFASq8=; b=GTT4UOjnbvADpeBBDcqmxNG7mHejYGDfpXDJ1EFsXzrEr70MiZnHVa4vgWWKPZGG2F RDxFGHM+yyXzc31YyIYvQMJ1NP6uXQJQ9SldIiN9Tzy+mZOseaJWV9urIK2zzmcvFDbE m9VW+McKLnbvEps+GK1vMatvQxd8fH+UNu72DBJ5dDIKURp/gnYIJX2s4Jg1nwLIwEH6 Yt5Vr2VTgcWHBC6TnvK0UASfK7nzC7YohvTmfMqoGvj0HlYOkEH7uzmml3iiZiM3EOJj ivDHKwWNLfp1jlnMuNVkAG1HVtM/8kD9l9aehvhG6jlqGiPf27xuwkK6UUL4Xee0ZLsj F+vA== 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=aBzWfu6PYILWg2j3aS8PQuGNOo2mBUXz1sdOHwFASq8=; b=o8nb28C/pq+o9P8aWDHsmCMq3R2lnfKSmxwt6B0xWaoiWWsLbLZSiPaLkGL7uhDqmz tb99qiNgzdhjEfbBeyH0HZFECH0DAJ2bLLp6R6RIDdFLReYNPNwSjjNCual3I36OYO4/ C8kbt0VHWTrHhImjO/FDiEg6PQhyUSPeWkx2WoO8WBvju7moNAS/86PVPhdmqofpkNDd rDuye94NKZFmF/0xfIzk92Z7f4zYy1YdiiwjH/sW+9K9WC3gs8cbBxllq8WV83aPsOTL 9kmia9TPKI436j3Aa7suBescbW14gnlBRnHo/lqusJ7WgYL1okdK1fDNidnquNmXocs4 hpmQ== X-Gm-Message-State: AOAM533VS6D8qxXuQpFUvV7zsoaYaEH6rjdBAQBR3VquSE+teYy4U/W6 5HNNZwO+V70ZWPwg0effEotHC4HDL4DMYmkE6aw= X-Received: by 2002:a05:620a:a4a:: with SMTP id j10mr1076370qka.272.1591760188869; Tue, 09 Jun 2020 20:36:28 -0700 (PDT) MIME-Version: 1.0 References: <1590561903-13186-1-git-send-email-iamjoonsoo.kim@lge.com> <1590561903-13186-7-git-send-email-iamjoonsoo.kim@lge.com> <20200609135325.GH22623@dhcp22.suse.cz> In-Reply-To: <20200609135325.GH22623@dhcp22.suse.cz> From: Joonsoo Kim Date: Wed, 10 Jun 2020 12:36:14 +0900 Message-ID: Subject: Re: [PATCH v2 06/12] mm/hugetlb: make hugetlb migration target allocation APIs CMA aware 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:53, M= ichal Hocko =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On Wed 27-05-20 15:44:57, Joonsoo Kim wrote: > > From: Joonsoo Kim > > > > There is a user who do not want to use CMA memory for migration. Until > > now, it is implemented by caller side but it's not optimal since there > > is limited information on caller. This patch implements it on callee si= de > > to get better result. > > I do not follow this changelog and honestly do not see an improvement. > skip_cma in the alloc_control sound like a hack to me. I can now see new_non_cma_page() want to allocate the new page that is not on the CMA area. new_non_cma_page() implements it by not specifying __GFP_MOVALBE mask or removing this mask. hugetlb page allocation has two steps. First is dequeing from the pool. And= , if there is no available page on the pool, allocating from the page allocat= or. new_non_cma_page() can control allocating from the page allocator in hugetl= b via the gfp flags. However, dequeing cannot be controlled by this way so it skips dequeing completely. This is why new_non_cma_page() uses alloc_migrate_huge_page() instead of alloc_huge_page_nodemask(). My patch makes hugetlb code CMA aware so that new_non_cma_page() can get the benefit of the hugetlb pool. > why your earlier patch has started to or the given gfp_mask. If anything > this should be folded here. But even then I do not like a partial > gfp_mask (__GFP_NOWARN on its own really has GFP_NOWAIT like semantic). Will not use partial gfp_mask. Thanks.