[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aCYOCYsXisQH6mi_@mtj.duckdns.org>
Date: Thu, 15 May 2025 11:53:45 -0400
From: Tejun Heo <tj@...nel.org>
To: Muchun Song <songmuchun@...edance.com>
Cc: jiangshanlai@...il.com, linux-kernel@...r.kernel.org,
muchun.song@...ux.dev
Subject: Re: [PATCH] workqueue: show the latest function name in
/proc/PID/{comm,stat,status}
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
Powered by blists - more mailing lists