linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kaiyang Zhao <kaiyang2@cs.cmu.edu>
To: Li Zhijian <lizhijian@fujitsu.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mm/vmscan: Accumulate nr_demoted for accurate demotion statistics
Date: Fri, 10 Jan 2025 12:49:49 +0000	[thread overview]
Message-ID: <Z4EXbSq2Rov78WVF@localhost.localhost> (raw)
In-Reply-To: <20250110122133.423481-1-lizhijian@fujitsu.com>

On Fri, Jan 10, 2025 at 08:21:32PM +0800, Li Zhijian wrote:
> In the shrink_folio_list() function, demote_folio_list() can be called
> multiple times, which can lead to inaccurate demotion statistics if the
> number of demoted pages is not accumulated correctly.

It looks like demotion will only be attempted once. On the second pass,
do_demote_pass will be false, demote_folios will be empty and
demote_folio_list() will do nothing. But I guess there is no harm in
making nr_demoted  an accumulation for less confusion in the future...


  parent reply	other threads:[~2025-01-10 12:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10 12:21 [PATCH 1/2] mm/vmscan: Accumulate nr_demoted for accurate demotion statistics Li Zhijian
2025-01-10 12:21 ` [PATCH 2/2] mm/vmscan: Fix pgdemote_* accounting with lru_gen_enabled Li Zhijian
2025-01-15 21:51   ` Yu Zhao
2025-01-10 12:49 ` Kaiyang Zhao [this message]
2025-01-10 14:19   ` [PATCH 1/2] mm/vmscan: Accumulate nr_demoted for accurate demotion statistics Zhijian Li (Fujitsu)
2025-01-10 14:24     ` Zhijian Li (Fujitsu)
2025-01-10 15:24       ` Kaiyang Zhao

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=Z4EXbSq2Rov78WVF@localhost.localhost \
    --to=kaiyang2@cs.cmu.edu \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizhijian@fujitsu.com \
    /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;
as well as URLs for NNTP newsgroup(s).