Re: [PATCH v2 0/2] workqueue: Fix rescuer task's name truncated

From: Wenchao Hao
Date: Wed May 22 2024 - 21:37:10 EST


On 2024/5/13 22:01, Wenchao Hao wrote:
Task comm of task is limitted to 16, prefix "kworker/R-" is added for
rescuer worker's task, which cause most task name is truncated as
following:

root 81 0.0 0.0 0 0 ? I< 11:18 0:00 [kworker/R-xprti]
root 82 0.0 0.0 0 0 ? I< 11:18 0:00 [kworker/R-cfg80]
root 85 0.0 0.0 0 0 ? I< 11:18 0:00 [kworker/R-nfsio]
root 86 0.0 0.0 0 0 ? I< 11:18 0:00 [kworker/R-xfsal]
root 87 0.0 0.0 0 0 ? I< 11:18 0:00 [kworker/R-xfs_m]
root 88 0.0 0.0 0 0 ? I< 11:18 0:00 [kworker/R-acpi_]
root 93 0.0 0.0 0 0 ? I< 11:18 0:00 [kworker/R-iscsi]
root 95 0.0 0.0 0 0 ? I< 11:18 0:00 [kworker/R-scsi_]
root 97 0.0 0.0 0 0 ? I< 11:18 0:00 [kworker/R-scsi_]
root 99 0.0 0.0 0 0 ? I< 11:18 0:00 [kworker/R-scsi_]

I want to fix this issue by split rescuer name to 2 part like other
kworker, the normal part is "kworker/R" which is set to task_struct's comm,
another part is wq->name which is added to kworker's desc. These 2 parts
would be merged in wq_worker_comm().

The first patch fix the rescuer task's name truncated;
The second patch fix workqueue_struct's name truncated.


Friendly ping...

V2:
Add another patch to increased worker desc's length to 32 to fix compile
warning reported:
https://lore.kernel.org/oe-kbuild-all/202405131400.sEYZHYk2-lkp@xxxxxxxxx/

Wenchao Hao (2):
workqueue: Fix rescuer task's name truncated
workqueue: Increase worker desc's length to 32

include/linux/workqueue.h | 2 +-
kernel/workqueue.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)