public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ye Liu <ye.liu@linux.dev>
To: Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Ye Liu <liuye@kylinos.cn>,
	Vlastimil Babka <vbabka@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] mm/vmstat: simplify folio stat APIs
Date: Wed, 15 Apr 2026 08:47:24 +0800	[thread overview]
Message-ID: <6c0ab55e-a687-4ad1-b18e-b4ca97305a44@linux.dev> (raw)
In-Reply-To: <ad4-kpPTPqOuDF_E@casper.infradead.org>



在 2026/4/14 21:18, Matthew Wilcox 写道:
> On Tue, Apr 14, 2026 at 05:15:17PM +0800, Ye Liu wrote:
>> From: Ye Liu <liuye@kylinos.cn>
>>
>> This series simplifies folio statistics accounting by:
>> 1. Replacing node_stat_mod_folio/zone_stat_mod_folio with more semantic
>>    add_folio/sub_folio functions
>> 2. Removing unused __node_stat_* and __zone_stat_* wrapper functions
> 
> I'm not convinced this is the right approach.  We've often computed
> folio_nr_pages() for use by several different functions, and you're
> making us recompute it.


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.

-- 
Thanks,
Ye Liu


  reply	other threads:[~2026-04-15  0:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-14  9:15 [PATCH 0/4] mm/vmstat: simplify folio stat APIs Ye Liu
2026-04-14  9:15 ` [PATCH 1/4] mm/vmstat: use node_stat_add_folio/sub_folio for folio_nr_pages operations Ye Liu
2026-04-14 17:52   ` David Hildenbrand (Arm)
2026-04-15  0:48     ` Ye Liu
2026-04-14  9:15 ` [PATCH 2/4] mm/vmstat: use zone_stat_add_folio/sub_folio " Ye Liu
2026-04-14  9:15 ` [PATCH 3/4] mm/vmstat: remove unused __node_stat_* wrappers Ye Liu
2026-04-14 14:59   ` Joshua Hahn
2026-04-15  0:50     ` Ye Liu
2026-04-15  2:29       ` Joshua Hahn
2026-04-14  9:15 ` [PATCH 4/4] mm/vmstat: remove unused __zone_stat_* wrappers Ye Liu
2026-04-14 13:18 ` [PATCH 0/4] mm/vmstat: simplify folio stat APIs Matthew Wilcox
2026-04-15  0:47   ` Ye Liu [this message]
2026-04-15  3:59     ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c0ab55e-a687-4ad1-b18e-b4ca97305a44@linux.dev \
    --to=ye.liu@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liuye@kylinos.cn \
    --cc=vbabka@kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox