Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4687338imu; Sat, 19 Jan 2019 16:01:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN6vBe36snT+pkxdssgEAJsvGeenIs3NrJW0upMZ/yDqDK3JIxg3vFTdo2lYPzduEJxNCsy0 X-Received: by 2002:a17:902:9a9:: with SMTP id 38mr24065613pln.204.1547942494021; Sat, 19 Jan 2019 16:01:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547942493; cv=none; d=google.com; s=arc-20160816; b=xRwKSNuY8xJ58JETdN9RT5pykDuHOR0wkDv0YQfNpTVqmhD6sk2CRH1Cio23m8gpKj K+fKix0HZKBnxEfuTGosRrxg65W91HldPcgmbt6E6YtvX4NLhLcwkG8119Wtbk3BDFWR xNbMFrmHJJWyUFXbUZs3eNZNxlZrM025IKEk9JKrvhIMkeJ6f6Y708NPk4s9Ula/xnPF 2EHcI28vYaib1darJ1+64t9CUur68EggpGcnZKKBl9oTm6Ld6pxDYeesgd64E+K7Wu+6 Lu2hmXXl3BncOMuEvSYlo7+eNiXZ16+WTJmT00dAjbvX3onLj1xn3auz0+oivevRnxg9 t5iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=7YlVAwYQxXgnLMrWemUDFv2uvMO2f+r5WfgSfGCV7/o=; b=ceTclGF2U2k+evNEQt2PsB35sGoxgu4N6a/M8uetO1I4GPA3+UtXAZsMR/65JXTCCE B0jYAjJpYtyNiSoYKgK7ToMZfQqPhiEw0kPu+jIagEFfQ13MqHOOAPaHnBh6TW1Max1a JH/e7CuV8tIERuMOc7eJAeQDYO/X0YfbzTae34KSkPK76dTh2uTfrxkeH2a87GMYnqlA wJ8iA1CisRsNmLKdDsjZ093GudIl3sewRnkuX3YO7wzFr1cFJadbQIV6J7Ith9PYSg6+ 9m7iP5sfPT4hvRXEFpLU6tkmSy/hKMOIjZfvbVPe9+63TCM4r9F5wm/8wxL59n8EJMDu qARA== 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 d18si8801131pgm.212.2019.01.19.16.01.18; Sat, 19 Jan 2019 16:01: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 S1730037AbfASX6H (ORCPT + 99 others); Sat, 19 Jan 2019 18:58:07 -0500 Received: from foss.arm.com ([217.140.101.70]:46810 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729803AbfASX6H (ORCPT ); Sat, 19 Jan 2019 18:58:07 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DFDD0A78; Sat, 19 Jan 2019 15:58:06 -0800 (PST) Received: from brain-police (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8586F3F6A8; Sat, 19 Jan 2019 15:58:01 -0800 (PST) Date: Sat, 19 Jan 2019 23:57:57 +0000 From: Will Deacon To: Alexandre Ghiti Cc: Catalin Marinas , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Martin Schwidefsky , Heiko Carstens , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org, 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, hch@infradead.org, linux-riscv@lists.infradead.org, Alexandre Ghiti Subject: Re: [PATCH] hugetlb: allow to free gigantic pages regardless of the configuration Message-ID: <20190119235756.GF26876@brain-police> References: <20190117183953.5990-1-aghiti@upmem.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190117183953.5990-1-aghiti@upmem.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 17, 2019 at 06:39:53PM +0000, Alexandre Ghiti wrote: > From: Alexandre Ghiti > > 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 patchs simply enables the possibility to hand back > those pages to memory allocator. > > This commit then renames gigantic_page_supported and > ARCH_HAS_GIGANTIC_PAGE to make them more accurate. Indeed, those values > 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 > --- > > - Compiled on all architectures > - Tested on riscv architecture > > arch/arm64/Kconfig | 2 +- > arch/arm64/include/asm/hugetlb.h | 7 +++-- The arm64 bits look straightforward enough to me... Acked-by: Will Deacon Will