From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.222 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796364700; b=LxQ8oUVn5Q0qiahj1hC8o4sd6N4gdNQ75jD0MXSLoUDJ7PLrDN+SKMLJ+nUWC9GiMZ+6 bUz2t+yWomz0BaKRCMQwSEGD4rx2RrEKFWAl8rDqr4pZRfK7vEaw/MsuYvEpv/RNGverC MItCDSXnpe4e/mGjQS/SAiRSNc1ByYCBXAnhcmF3ex2seEXo1Zj540uyU5b7QrBlK4QiF tF/pph+bYA2ieq3d63G/k6gvWv7h2TY9RnBpzVloQMCZg4+BReam+8uOVoCAC0eVWfVGW DpjwFedFZnBug9CBWmQdFL9/4Kpat3sQn4Sh7/c9eZDvdjW3qPH5lQfh0UveOhowjPg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796364700; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Content-Type:Mime-Version:Subject:From: In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References: To:X-Mailer; bh=4kOCzKdWukWq/0RiPrWDMDsLbNgdDUcMmzxmfV/qzak=; b=ZmukHdtqXVZnBR0tDdDoK/FzMOfWKSgL/AkLN7RRoTjDPbu3lUvb4n+0gTK/vTDtlwgO LMwYFaTI9i66IjtMZOZnqLtQaAdRS2VFQPqTzcOndFiJQEd9KfiVRRp1+yWT3qwD9VZrK yc3Gcb4V9mHvyE3S76wVwxozOcZVvRI0DMwBb6Hn7QtHuWqgscVC8W15tIVDAAiNTEMLi iLcBulAmrbQmkB8hztj11NaRBdV1wmAixW8/U6bP4xw2FSOnMkonxwETtD6LASIZFbdez Li6Xh02krSsxYAI4byW9dYEB54OyD/cOHbs9SbRX0hDBmtN8fEXeApxeLnp4SqcIZog== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=eZA9LtKJ; arc=none smtp.remote-ip=95.215.58.222 Received: from mta1.migadu.com (out-222.mta1.migadu.com [95.215.58.222]) (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 E38D6606A32D for ; Fri, 4 Dec 2026 06:11:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E38D6606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=eZA9LtKJ X-Envelope-To: linux-doc@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=4kOCzKdWukWq/0RiPrWDMDsLbNgdDUcMmzxmfV/qzak=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796364698; v=1; x=1796969498; b=eZA9LtKJoSNT4Ha80cHL1GmS9ETbpLCjQlqDLsEO8O9fNG9ECU2Oj+wYmAAWHTqqtjH8lsvt lbaINFlPYpTcIcflE8iMKY6bhFeDJHKCWr883R4dKbCVi8JcSPORJyL+/6x3R+wpL8MNIJzCr+y z7TqAHp36WOVU+P+XCZIhe98= X-Envelope-To: linux-doc@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 237dab307d616922; Fri, 04 Dec 2026 06:11:36 +0000 X-Mizu-Trace-ID: 237dab307d616922 X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset=us-ascii X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3901.200.71.1.16\)) Subject: Re: [PATCH v2 11/35] mm/hugetlb_cma: reset hugetlb_cma_size if the arch doesn't support it From: Muchun Song In-Reply-To: <20261203-hugetlb_fixes_2-v2-11-9bbeabb555d2@kernel.org> Date: Fri, 4 Dec 2026 14:11:10 +0800 Cc: 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" , 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 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20261203-hugetlb_fixes_2-v2-0-9bbeabb555d2@kernel.org> <20261203-hugetlb_fixes_2-v2-11-9bbeabb555d2@kernel.org> To: "David Hildenbrand (Arm)" X-Mailer: Apple Mail (2.3901.200.71.1.16) > On Dec 3, 2026, at 19:37, David Hildenbrand (Arm) = wrote: >=20 > With hugetlb_cma=3D, 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. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > The fix is trivial, so let's just reset hugetlb_cma_size like we do on > the other paths that don't reserve anything. >=20 > This has low urgency, as it requires passing hugetlb_cma=3D on one of = these > architectures. No need to CC stable. >=20 > Fixes: dbda8feadfa4 ("mm/hugetlb: avoid hardcoding while checking if = cma is enabled") > Reported-by: Sashiko > Signed-off-by: David Hildenbrand (Arm) Acked-by: Muchun Song (ByteDance) Thanks.