Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp926757imj; Fri, 15 Feb 2019 09:05:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IbYNDT41WSEriTqzSkQDDzKTg1W1Ds13vGkGtXUrfKTPxl0grpycBGOK4W7fO/XmtKQz6DC X-Received: by 2002:a17:902:8687:: with SMTP id g7mr11153148plo.96.1550250333133; Fri, 15 Feb 2019 09:05:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550250333; cv=none; d=google.com; s=arc-20160816; b=aUhIMOafQ3aX0+uKJqYO0jR0r7jbknvtsfx/6MfmwAPAYJERbptp9h8DteVEogp7cM 3SM4MUqVkJZDAGRtIxuQ7MHYW0JXtmtCelTWSJBIVhVwp/Zto0zPZnlAeBO0+Nj6cNVC XbZRhakvrTK+f0AiC+GnW+UDnZetl/gBea3B9+jYyY2Ox9mkjTeTfufShzCEP/qQ3bGx lY6cuHhv9w26h2CVdNyZcl7aq973f8Z5CEND8pro4I0ZtDS1FInOJoAUf9WqGWWNYZaF eK20BJg1xy5n9MfkVobtqEnLQAo5rAp4kyijbqnhXbf+0fythvMx+hJZfuyn8xN90GPI f0gA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=hocUS+4WIVmLQlgxns18lkRc3VuCIgC1yKblcJJS3gE=; b=S+6nv7Hpo/A5e04ypmgCJsYQA7YzLTRm/bfPtSCwW2JJjbEWz9/IT/OZLIg3KyrMhg IOxRATkgpg1bexO/S/Yq/AQgKIuIJpOqEWFqC+qhdCnMxN/4yEBmO/PE5iWZxynyyabv M0rhz5SUIQVWCME4gJijMyHKfU3Br8VN0rL0jAnFbD/FdcdbsEUznsi7y2eBesQWftsj JO7joG7EYElz3Fs20yCVtc2c0x0rWUTy/M44u8Vd/3amQT3+0sbZs4VFqRoGPUFwetd6 cAejo8fEsYKIHyJ3LV7XzUperWlO1+gl6c+vhWNbn01of+RpZHu3HduV2LnrUI+R1zOr BtAQ== 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 189si6098504pfd.142.2019.02.15.09.05.15; Fri, 15 Feb 2019 09:05:33 -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 S2388244AbfBOQs4 (ORCPT + 99 others); Fri, 15 Feb 2019 11:48:56 -0500 Received: from mx2.suse.de ([195.135.220.15]:35658 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726122AbfBOQsz (ORCPT ); Fri, 15 Feb 2019 11:48:55 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CF894B03F; Fri, 15 Feb 2019 16:48:53 +0000 (UTC) Subject: Re: [PATCH v3] hugetlb: allow to free gigantic pages regardless of the configuration To: Alexandre Ghiti , 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, Andrew Morton References: <20190214193100.3529-1-alex@ghiti.fr> From: Vlastimil Babka Message-ID: <363365a7-f1ac-5bde-ff7f-bdb137c20628@suse.cz> Date: Fri, 15 Feb 2019 17:48:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190214193100.3529-1-alex@ghiti.fr> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/14/19 8:31 PM, Alexandre Ghiti wrote: > On systems without CMA or (MEMORY_ISOLATION && COMPACTION) activated but > that support gigantic pages, boottime reserved gigantic pages can not be > freed at all. This patch simply enables the possibility to hand back > those pages to memory allocator. > > This patch also renames: > > - the triplet CMA or (MEMORY_ISOLATION && COMPACTION) into CONTIG_ALLOC, > and gets rid of all use of it in architecture specific code (and then > removes ARCH_HAS_GIGANTIC_PAGE config). > - gigantic_page_supported to make it more accurate: this value being false > does not mean that the system cannot use gigantic pages, it just means that > runtime allocation of gigantic pages is not supported, one can still > allocate boottime gigantic pages if the architecture supports it. > > Signed-off-by: Alexandre Ghiti Acked-by: Vlastimil Babka Thanks! ... > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -252,12 +252,17 @@ config MIGRATION > pages as migration can relocate pages to satisfy a huge page > allocation instead of reclaiming. > > + Stray newline? No need to resend, Andrew can fix up. Ah, he wasn't in To:, adding. > config ARCH_ENABLE_HUGEPAGE_MIGRATION > bool > > config ARCH_ENABLE_THP_MIGRATION > bool > > +config CONTIG_ALLOC > + def_bool y > + depends on (MEMORY_ISOLATION && COMPACTION) || CMA > + > config PHYS_ADDR_T_64BIT > def_bool 64BIT >