From: Tejun Heo <tj@kernel.org>
To: Muchun Song <songmuchun@bytedance.com>
Cc: jiangshanlai@gmail.com, linux-kernel@vger.kernel.org,
muchun.song@linux.dev
Subject: Re: [PATCH] workqueue: show the latest function name in /proc/PID/{comm,stat,status}
Date: Thu, 15 May 2025 11:53:45 -0400 [thread overview]
Message-ID: <aCYOCYsXisQH6mi_@mtj.duckdns.org> (raw)
In-Reply-To: <20250515040523.430181-1-songmuchun@bytedance.com>
Hello, Muchun.
On Thu, May 15, 2025 at 12:05:23PM +0800, Muchun Song wrote:
> Workqueues, such as system_unbound_wq, are shared across the system,
> making it difficult to determine which tasks are being executed by
> each worker. This patch improves clarity by displaying the latest
> function name associated with each workqueue worker in the
> /proc/PID/{comm,stat,status}. For example:
>
> Before:
> # ps 64 67 68
> PID TTY STAT TIME COMMAND
> 64 ? I 0:00 [kworker/u34:0-events_unbound]
> 67 ? I 0:00 [kworker/u33:1-events_unbound]
> 68 ? I 0:00 [kworker/u33:2-events_unbound]
>
> After:
> # ps 64 67 68
> PID TTY STAT TIME COMMAND
> 64 ? I 0:00 [kworker/u34:0-events_unbound:flush_memcg_stats_dwork]
> 67 ? I 0:00 [kworker/u33:1-events_unbound:flush_to_ldisc]
> 68 ? I 0:00 [kworker/u33:2-events_unbound:idle_cull_fn]
>
> This change provides a clearer view of the tasks being performed by
> each worker, enhancing system monitoring and debugging.
One worry I have about this is that these will likely be stale most of the
time as kworkers are just sitting and waiting, and there's no connection
between what a kworker ran before and what it's going to run next, so I'm
unsure how useful the extra information is.
Thanks.
--
tejun
next prev parent reply other threads:[~2025-05-15 15:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 4:05 [PATCH] workqueue: show the latest function name in /proc/PID/{comm,stat,status} Muchun Song
2025-05-15 15:53 ` Tejun Heo [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-05-16 4:44 Muchun Song
2025-05-19 20:07 ` Tejun Heo
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=aCYOCYsXisQH6mi_@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=muchun.song@linux.dev \
--cc=songmuchun@bytedance.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