From: Tejun Heo <tj@kernel.org>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
Zefan Li <lizefan.x@bytedance.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Firo Yang <firo.yang@suse.com>
Subject: Re: [PATCH] cgroup: Remove duplicates in cgroup v1 tasks file
Date: Mon, 9 Oct 2023 06:32:38 -1000 [thread overview]
Message-ID: <ZSQrJtNAw9K4nNiG@slm.duckdns.org> (raw)
In-Reply-To: <20231009135811.2627-1-mkoutny@suse.com>
On Mon, Oct 09, 2023 at 03:58:11PM +0200, Michal Koutný wrote:
> One PID may appear multiple times in a preloaded pidlist.
> (Possibly due to PID recycling but we have reports of the same
> task_struct appearing with different PIDs, thus possibly involving
> transfer of PID via de_thread().)
>
> Because v1 seq_file iterator uses PIDs as position, it leads to
> a message:
> > seq_file: buggy .next function kernfs_seq_next did not update position index
>
> Conservative and quick fix consists of removing duplicates from `tasks`
> file (as opposed to removing pidlists altogether). It doesn't affect
> correctness (it's sufficient to show a PID once), performance impact
> would be hidden by unconditional sorting of the pidlist already in place
> (asymptotically).
>
> Link: https://lore.kernel.org/r/20230823174804.23632-1-mkoutny@suse.com/
> Suggested-by: Firo Yang <firo.yang@suse.com>
> Signed-off-by: Michal Koutný <mkoutny@suse.com>
Applied to cgroup/for-6.6-fixes.
Thanks.
--
tejun
prev parent reply other threads:[~2023-10-09 16:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 13:58 Michal Koutný
2023-10-09 16:32 ` Tejun Heo [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=ZSQrJtNAw9K4nNiG@slm.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=firo.yang@suse.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=mkoutny@suse.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®