From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.21 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796364700; b=Y8yhQyzLZG/HQRpqZnM/YmKR2qvQCab5gYk8R40XlLAcurvoc1w3RjI8I+dBZVCw9Qtu WyDiomOPQKarDC4eDexCLkVBs28AbYLHEmbflkXWhGRU47YI80hlAF6iwChLRss32iJeB LY7cE4/dBH21X9QGxxlwqsopExpzQXR1FbIq8He8AFW0eg7wcIVVtMjmZ8ZFjw7ZZ4Q/H ozS3b9SSTn6XHi9zgSXSqojmRMVEXhAL0PfFcEvFLvGKrYQj4urjscVDLdy3m+AbH7JmO IN/14SpNF5vbFSuF7AHzAXowX5OVqYIa/f8dM3xXaj4vxVbFhhl+5jGZYYHNuWV+/0Q== 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=izPnVB+FwGUMcv3PGin1YTjhXhTgJRbx4ByzbWJAAyG69udjTruvE2jD26ieqZxlo6vi Q4Li6YWGORjbb6Lz4E65sIFxfs20N9I3gMKGsHjzh3M899Bh63pj38010i/eEaZgKjkga tAgBzX18aS/p97eufnSxpbXLYmm4sRx5rbFKIFjm0hn6HaKoSx1+GBVgTNXr5eyWWf8Ir SliCkyhttPFb+1SBNBXBPqDDcBkH2NuK7CAtdf5OaYRqilD5tMYqEenhNfgJ7y5W5aQL2 tH5mbHQQrNsg7ujh9Zo6QBTt9XqKRbHIuCH4TE6xQI+4hcf4w1ziZA38X1e/Zo06Tpw== 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=SxeMioI2; arc=none smtp.remote-ip=91.218.175.21 Received: from mta0.migadu.com (out-21.mta0.migadu.com [91.218.175.21]) (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 8A35A606A322 for ; Fri, 4 Dec 2026 06:11:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8A35A606A322 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=SxeMioI2 X-Envelope-To: linux-kernel@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=1796364697; v=1; x=1796969497; b=SxeMioI2hqjXA2yzxwY4yJ+pU92LhLm3cHfWhaSfvZf+HV89IducaS85Dfgl/cCfwMKqd0eV 67ufY4Ac7Tl+mDuUngd/ZeiGPSmZAJSEG+QdpzLI55jDkqIqGEmAufUf8l97VEoEz1xfXEpiKIu 2ZHrA2uV9YZOD2R2lrSo7S34= X-Envelope-To: linux-kernel@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-kernel@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.