mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Muchun Song <muchun.song@linux.dev>
To: Xuewen Wang <wangxuewen_ky@163.com>
Cc: Muchun Song <muchun.song@linux.dev>,
	akpm@linux-foundation.org, david@fromorbit.com,
	qi.zheng@linux.dev, roman.gushchin@linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, Xuewen Wang <wangxuewen@kylinos.cn>
Subject: Re: [PATCH] mm: shrinker: stop counting when the seq buffer overflows
Date: Fri, 20 Nov 2026 19:48:54 +0800	[thread overview]
Message-ID: <04D634C5-9E6D-4AB4-8863-63CAFFC60D8E@linux.dev> (raw)
In-Reply-To: <20261120110538.3256962-1-wangxuewen_ky@163.com>



> On Nov 20, 2026, at 19:05, Xuewen Wang <wangxuewen_ky@163.com> wrote:
> 
> From: Xuewen Wang <wangxuewen@kylinos.cn>
> 
> The shrinker debugfs count file uses single_open(), so all memcg rows
> belong to one seq_file record. When the buffer overflows, seq_file grows
> it and retries the entire record. Queries for subsequent memcgs in
> an overflowing pass cannot contribute to the final output.
> 
> Stop the traversal once seq_has_overflowed() is true, using the existing
> mem_cgroup_iter_break() path to release the current memcg reference.
> Leave the overflow state intact and return zero so seq_file can retry.
> 
> Signed-off-by: Xuewen Wang <wangxuewen@kylinos.cn>

Acked-by: Muchun Song (ByteDance) <muchun.song@linux.dev>



      reply	other threads:[~2026-11-20 11:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 11:05 Xuewen Wang
2026-11-20 11:48 ` Muchun Song [this message]

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=04D634C5-9E6D-4AB4-8863-63CAFFC60D8E@linux.dev \
    --to=muchun.song@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=david@fromorbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=qi.zheng@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=wangxuewen@kylinos.cn \
    --cc=wangxuewen_ky@163.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

all inboxes | Powered by JetHome®