From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.52 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381489; b=lNKVesP9bMUMqixyDD2iQyTgekFK9OtwWkUQeAzbhX+hyu+Prurx1oSjTIKUrMaM6RRd s8swwcC43DZdVBZZR1z9lSLN3A1YQAr6vvGu4LpOsup0iryXuFB+xcRFP0Al9ZtfPgU0s ZR4Tsj0t2mdgT4l8cjdLF5dYId4vILXrtXriTg8oeRbplXSSLp+Hq4wWJGdBJWdjnC6rS b6WrfgU4LHhyBL0dmJNj+RcPxOQB01SFiNRsWiVurwh/UtojiXnz3h+SDuFh4b5y4aTeo 2hcrbWK0PYoeSFxkfkd+9zVQgsffaYXOgIqgUl8EIsUuKk/18t8t2As4jhx7NJvzLKg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381489; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=cDCFZdvR8IyNqzDuJPcHMc7z4+5W4azgoLKZaqtbexY=; b=XX497tV9pU6uESWqXgzs5vaE873VoXmhGM/QRElmimZMd0L5NFC6QL7Our9wMEiLZ6Ld XrtmCJ3z9ed9JEuHsxWlwEu+QDOsAvYb5Yo9Jf4cEaxJb3wUbPVIzJjjlerb0/O6tNGNa GjvIDWhCVfkKcmQTu/C6QP01EMLnLjqSBP2gmw1uSEIgtqSoPihvp8km7BCTB7pYajIWo sgIa8Q4Wtohy+cD5x27wcwxyGrJjuWt31jsqblQgT/M0+hBJ6A8iXmnPhT/dlWK+P7FMT 6bKJ1IcTkMPPykYuOMxOulCButbPZ370tpO8m7hQ4kynRQheN0q8aOS0LstKPo3tVOw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=rLy4SNj4; arc=none smtp.remote-ip=209.85.221.52 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C651D606A686 for ; Fri, 4 Dec 2026 10:51:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C651D606A686 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=rLy4SNj4 Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-4cf418d85bbso389836f8f.2 for ; Fri, 04 Dec 2026 02:51:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796381487; x=1796986287; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=cDCFZdvR8IyNqzDuJPcHMc7z4+5W4azgoLKZaqtbexY=; b=rLy4SNj4vQsAUeWGIE9WYsZDUcX41m4LskgOiFZyotpzTLaNQeXs6pwCUX/BMaxK7/ d7swm++HssT5qEIPy9sZIA/Nr+c/V7imqe7JYCk/TmzX8spNlok7JjTYr4MqSADR566Y +/lDIEdaGd/9WpsnraOAdBVg1fNVVwT1j2d3h79A5OGYjXyl8SXuNfc0ApgDRBs6TL8e bqOolNSI2jg3L4unUmKwq5gtU10uglS44nbJLd8MulvEXQrU5DDNdaUrVoLaWVyq0ua3 2LHx1hfpf4XXdmmA5MOy670SH1v8qiBu8Ch0nB65WxqKcdnzwOM+5XgH6SoAmLwTSb0b Y02A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796381487; x=1796986287; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=cDCFZdvR8IyNqzDuJPcHMc7z4+5W4azgoLKZaqtbexY=; b=QJHNf7I8V2FAEpThqU3Gb+aa1442Twx63RmUr/WYwuwHzDAjnm9GjgzBlTAbVOv9ur zdIGI8oCwxUC3R8n0H+KMe9vtcao4LMlUQ9uzOY78VZlqg8YTcsYy4Stq4e9a2B/Gusi ZdiAuojy+WDp9zS8SSZwG1+Edpm+wSiprZ0z8GMEO7NmUJzJgEkqyUQ70/kEb7ptobdL 0sAGhEw0e+mTZED6AaBU4FAXVirzTmhn1Jf16go0ptZdx+jwPc7+ErTJP6efIjbClxyp 5tE+LPdiBB+rbesP4KQF5fVO+b1HJj8yDVlWfFyZI1vSbWzfCaVbp4KFDoi085ufd8Bo 6IGw== X-Forwarded-Encrypted: i=1; AL+hErF7NiOG7OdyQtDjm9UCXeDBiyuooji2awhvAiEq3dAkm4+sMtkMExTG8/lV3ZsZ0p+IjYFBzxAnitlQAAU=@vger.kernel.org X-Gm-Message-State: APuU4Z9EZoN7kMCpSOJtpZdkEzi2BdOFehtP4uJlbW7a3F3X5mqrASbn AApN5jgHX8SfTNglXY7TgY2Z3pJ3eEiXCdRnfclBAdDhfgB1SfIGn7v0 X-Gm-Gg: AZFdTZcI+0yPqGJRmk3lTYuA82GQrWqck9zmIK4Favou4Ggk8elkhyo5gVIh6gz/aZ1 EiLhLnggXDhjzri8CpvqV7lqkXgE0C891klqf+PMuZf30RC3y5fCRA7mgPCS5s9U3mqDm8ZRgvc 3ztbG/DNYWrCvP7Y/8G/NJw/IxBWDIOhRmf+SOGi8bBv7yA1ndNoIWGUFs+S6YqZWaFLzLv2JjJ c/ZApx2OUOVf4mLuwlVbcVstEAOEVPsTKuy0iG2sr5Pt9g+d8sOjtcXnQgC/91CSOsLF9Vk3Ey0 kwgH3w8QqjPuwEv8mOEr+lJg1LVE/pnsuH5oMQZZWPPzTLSW6lo1FjXvuAZij6E5rZzLycVrwId NdobOziEIY3mUapxCoqBpWKjAuIX5zc5Vcq8vahWlRrcajwoMTnbt4LoYs0stYuxUT2Cg26t02p vlgV/jY7lPBhG+YPES4RXpCuGG56tN+3LZ1bSW4zEecphHNsRqVqUQUiNRKI/O4bNlQTSRm+Oxc ajoxLJcgnactrf9ZdggcfiToI+R38fltTpA3pu6A1TEpeJqwmGxFtQtupSCLHK40pB4XGGlsdrF jwvplqSPJrB5+Ie5jNTtF1UhXJkF9yHC+4YYPHEKxn5phBWofHNsHEE= X-Received: by 2002:a05:6000:2487:b0:49d:7e8c:e89c with SMTP id ffacd0b85a97d-4d1ebca0904mr3369325f8f.42.1796381484798; Fri, 04 Dec 2026 02:51:24 -0800 (PST) Received: from [192.168.1.22] ([83.231.69.9]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4d172f363b8sm4959509f8f.22.2026.12.04.02.51.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2026 02:51:24 -0800 (PST) Message-ID: <140d3731-fe1b-4bad-ad47-90bc426494fe@gmail.com> Date: Fri, 4 Dec 2026 11:51:21 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 11/35] mm/hugetlb_cma: reset hugetlb_cma_size if the arch doesn't support it To: "David Hildenbrand (Arm)" , Muchun Song , Oscar Salvador , Andrew Morton , Hongfu Li , Jinmeng Zhou , Mina Almasry , Davidlohr Bueso , Naoya Horiguchi , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Michal Hocko , Jonathan Corbet , Shuah Khan , Randy Dunlap , Vivek Kasireddy , Mel Gorman , Hugh Dickins , Baolin Wang , Dave Airlie , Jason Gunthorpe , Andy Whitcroft , Roman Gushchin , Barry Song , Andrea Arcangeli , Lorenzo Stoakes , Suren Baghdasaryan , Shakeel Butt , Pedro Falcato , Jann Horn , Guillaume Morin , Yang Shi , James Houghton , Rik van Riel , Harry Yoo , Lance Yang , Axel Rasmussen , Peter Xu , Sasha Levin , Kiryl Shutsemau , Christian Brauner , "Steven Rostedt (Google)" , Hongbo Li , Gregory Price , Zi Yan , Joshua Hahn , Rakie Kim , Ying Huang , Matthew Brost , Byungchul Park , Alistair Popple , Andi Kleen , David Rientjes , Joern Engel , "Aneesh Kumar K.V" Cc: linux-mm@kvack.org, linux-doc@vger.kernel.org, Gerd Hoffmann , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Johannes Weiner , Chris Mason , Jiaqi Yan , Sashiko References: <20261203-hugetlb_fixes_2-v2-0-9bbeabb555d2@kernel.org> <20261203-hugetlb_fixes_2-v2-11-9bbeabb555d2@kernel.org> Content-Language: en-US From: "Jose A. Perez de Azpillaga" In-Reply-To: <20261203-hugetlb_fixes_2-v2-11-9bbeabb555d2@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/3/26 12:37 PM, David Hildenbrand (Arm) wrote: > With hugetlb_cma=, hugetlb_cma_reserve() reserves CMA areas for gigantic > huge pages. If it ends up not reserving anything, it sets > hugetlb_cma_size to 0, as it is the signal to the rest of hugetlb that > the hugetlb CMA area exists. > > However, if the architecture does not support hugetlb CMA, > hugetlb_cma_reserve() only warns and returns, but leaves > hugetlb_cma_size as set by the command line. > > Consequently, we skip the boot-time allocation of gigantic huge pages, > which matters on architectures where gigantic huge pages are allocated at > boot, like powerpc with the hash MMU in an LPAR, where the firmware > provides 16G pages. Further, we disable demotion of small huge pages and > don't clear hugetlb_cma_only, so gigantic huge pages cannot be allocated > at all. > > This only affects architectures with gigantic huge pages but without > hugetlb CMA support, such as sparc64, sh, or powerpc with the hash MMU in > an LPAR. > > The fix is trivial, so let's just reset hugetlb_cma_size like we do on > the other paths that don't reserve anything. > > This has low urgency, as it requires passing hugetlb_cma= on one of these > architectures. No need to CC stable. > > Fixes: dbda8feadfa4 ("mm/hugetlb: avoid hardcoding while checking if cma is enabled") > Reported-by: Sashiko > Signed-off-by: David Hildenbrand (Arm) LGTM: Reviewed-by: Jose A. Perez de Azpillaga -- cheers, jose a. p-a