Re: [PATCH 1/3] md: Use folio_alloc_buffers()
From: "David Hildenbrand (Arm)" <david@kernel.org>
Date: 2026-09-14 13:20:44
Also in:
linux-mm
On 9/14/26 15:17, Matthew Wilcox wrote:
On Mon, Sep 14, 2026 at 03:12:31PM +0200, David Hildenbrand (Arm) wrote:quoted
On 9/14/26 06:18, Matthew Wilcox (Oracle) wrote:quoted
Remove the last user of alloc_page_buffers(). This isn't _great_,You should tell us "why" this isn't great. Because we're allocating folios although these things are not actually folios? I can only speculate :)Well, we actually aren't allocating folios in md-bitmap: for ( ; pnum < num_pages; pnum++) { store->filemap[pnum] = alloc_page(GFP_KERNEL|__GFP_ZERO); and it's not clear to me that we should be allocating folios; they're internal memory to the md-bitmap code that are never mapped to userspace, nor enter the page cache. But they do have buffer heads attached to them.
Confusing indeed.
The md-bitmap code probably needs to be rewritten to not use buffer heads at all, but then I hear from some people that it's scheduled for deletion, so don't spend any time on it. But I can't find anything official about that anywhere.quoted
Code itself looks good.Thanks!
I'd assume Zi will pick up your patches and can massage the patch description to summarize why folios are awkward here, but that cleaning this up is future work. -- Cheers, David