Re: [RFC PATCH] mm/cma: don't release CMA pages still in use

Rik van Riel <[email protected]>
Newsgroups org.kvack.linux-mm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Sun, 2026-08-09 at 21:06 -0400, Rik van Riel wrote:
> 
> This change should be safe because nothing can get reallocated while
> it
> is still in use.

And of course Sashiko found something I overlooked.

I'll spin a v2 tomorrow.

https://sashiko.dev/#/patchset/20260809210608.06b5ccb9@fangorn

The hugetlb CMA code uses order 9 as the smallest
size that may be returned to the CMA allocator,
which I suppose works because when mTHPs, THPs,
and other movable large folios end up in the hugetlb
CMA area, those do not go through the CMA allocator,
and never touch the bitmap?

That additional bitmap alongside of the pages and
page blocks looks like trouble.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.