Re: [PATCH v4 2/5] mm/vmscan: extract folio_free() from shrink_folio_list()
From: Zhang Peng
Date: Sun Jun 28 2026 - 12:10:21 EST
On Wed, Jun 17, 2026 at 02:17:53PM +0200, David Hildenbrand wrote:
> I don't quite like the function name, as it sounds like something very
> generic, when it's really specific to memory reclaim code ...
On Wed, Jun 17, 2026 at 02:24:24PM +0200, David Hildenbrand wrote:
> Stumbling over patch #4, I think if we call this something with a
> "try", a bool would be fine.
Right, renamed to folio_try_reclaim_free(). try_ + bool reads
naturally, and the name makes it obvious this isn't a generic free.
> You can just drop the "else", no?
> VM_WARN_ON_FOLIO_ONCE(folio_ref_count(folio), folio);
> Likely can shorten ... Or just drop the comment completely
All done — dropped the else, added the refcount assert at free_it,
removed the stale "swapped out as a whole" comment. Also made
nr_pages const and reflowed the buffer-release comment to use the
extra columns.