Re: [PATCH 0/4] mm/vmstat: simplify folio stat APIs

From: Ye Liu

Date: Wed Apr 15 2026 - 01:55:22 EST




在 2026/4/15 11:59, Matthew Wilcox 写道:
> On Wed, Apr 15, 2026 at 08:47:24AM +0800, Ye Liu wrote:
>> Thank you for your feedback, Matthew. I acknowledge that this change may
>> introduce additional calls to folio_nr_pages() in some cases where the
>> value was previously computed once and reused. However, the new
>> add_folio/sub_folio functions provide clearer semantics, explicitly
>> indicating that we're accounting for the entire folio rather than
>> potentially partial pages. The overhead of recomputing folio_nr_pages()
>> is minimal in most scenarios, and the improved readability and reduced
>> argument passing outweigh this concern.
>
> I disagree.

Thanks for the direct feedback.

--
Thanks,
Ye Liu