Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1695318imj; Thu, 14 Feb 2019 10:27:00 -0800 (PST) X-Google-Smtp-Source: AHgI3IaSCZe5j4pcIGdZIjXmEpqeWmnosbyb5bCFzoE1DD7CGOrEHWmhN2aiD29QRPTiyoPWA45m X-Received: by 2002:a17:902:b690:: with SMTP id c16mr5723732pls.230.1550168820650; Thu, 14 Feb 2019 10:27:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550168820; cv=none; d=google.com; s=arc-20160816; b=PKFWHAqRukO8eH3ZWsrgwaJsiHhhUbA+ko2PMvunJ4jJzkyQchrEnaYTbk+5bGdnCx cTT+yccvudPkJzK7w3LurTrOOPsg+aDTK1P6iPQdJNXP49XEOVmJcvFdwjRkGhdKHchn kYAp23a3QTXeWUM+oudhI1yD55U0iDAEu81bzDF4/4pc9iuQHrZmSPsFOllBcq5gMTsB PG5tyx9u7Pk5oEk3Cn9Q/jOJGyQjHfE4NibEh6JaWsSW6hhNK1g5App/MaQnfmoptF4T 9V2VeTQrmOILkQsAv7N+8F5AUSmXfAmplCyunnBcQodmtjyXFKNd6jkUO02etMBAQBMP DIcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=1xZMdwQdfY9N0X/0yrJb3tFIpsNNrczV59J++hWZHRg=; b=U2Sgc134MZVAxHdOceCN01tRsJgmte9Ujyz/eqtEXxSQO20fV8roBb2zvSM0bbIxJn oelsj9qghbdbRKsnseuJd6gPOYkG2mQDpNBZ9M3V0cv2X7XYXy4+FfmNsrIyggiinFZz /mlzFMhgNOsopB4Beyik1tTMU1amRIPPI7n4nGS6hSKV64lDaYhpTWOD9P3qEUeQzVIe EzzBYPpOnEEDfVVeHdt/APpsnE54WMiQzrPlWhKfWiJVPM1CR5bOhwL+FxGJHk5IROIG lbqW769+AtwsU+b/MJ01x1ljo2tK1hbLOkPhYSf6GjUbvTnd0i7qzwyaTbPmtZrkVKFq uWEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i66si3134506pfb.91.2019.02.14.10.26.44; Thu, 14 Feb 2019 10:27:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405046AbfBNKt3 (ORCPT + 99 others); Thu, 14 Feb 2019 05:49:29 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:54409 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391837AbfBNKt3 (ORCPT ); Thu, 14 Feb 2019 05:49:29 -0500 X-Originating-IP: 81.250.144.103 Received: from [10.30.1.20] (lneuilly-657-1-5-103.w81-250.abo.wanadoo.fr [81.250.144.103]) (Authenticated sender: alex@ghiti.fr) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 066C61BF221; Thu, 14 Feb 2019 10:49:19 +0000 (UTC) Subject: Re: [PATCH v2] hugetlb: allow to free gigantic pages regardless of the configuration To: Dave Hansen , Vlastimil Babka , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Martin Schwidefsky , Heiko Carstens , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org, Dave Hansen , Andy Lutomirski , Peter Zijlstra , Alexander Viro , Mike Kravetz , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org References: <20190213192610.17265-1-alex@ghiti.fr> From: Alexandre Ghiti Message-ID: Date: Thu, 14 Feb 2019 11:49:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/13/2019 08:30 PM, Dave Hansen wrote: >> -#if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA) >> +#ifdef CONFIG_COMPACTION_CORE >> static __init int gigantic_pages_init(void) >> { >> /* With compaction or CMA we can allocate gigantic pages at runtime */ >> diff --git a/fs/Kconfig b/fs/Kconfig >> index ac474a61be37..8fecd3ea5563 100644 >> --- a/fs/Kconfig >> +++ b/fs/Kconfig >> @@ -207,8 +207,9 @@ config HUGETLB_PAGE >> config MEMFD_CREATE >> def_bool TMPFS || HUGETLBFS >> >> -config ARCH_HAS_GIGANTIC_PAGE >> +config COMPACTION_CORE >> bool >> + default y if (MEMORY_ISOLATION && MIGRATION) || CMA > This takes a hard dependency (#if) and turns it into a Kconfig *default* > that can be overridden. That seems like trouble. > > Shouldn't it be: > > config COMPACTION_CORE > def_bool y > depends on (MEMORY_ISOLATION && MIGRATION) || CMA > > ? Thanks for that, Alex