From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: linux-man@vger.kernel.org
Cc: "Alejandro Colomar" <alx@kernel.org>, "Tejun Heo" <tj@kernel.org>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Craig Small" <csmall@enc.com.au>,
"Alexey Dobriyan" <adobriyan@gmail.com>,
"Alejandro Colomar" <alx.manpages@gmail.com>,
"Michael Kerrisk" <mtk.manpages@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 2/2] proc.5: the "comm" field can be longer than 16 bytes
Date: Fri, 23 Dec 2022 18:59:53 +0100 [thread overview]
Message-ID: <patch-2.2-0d1254ecb-20221223T174835Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-0.2-000000000-20221223T174835Z-avarab@gmail.com>
Since torvalds/linux@6b59808bfe48 (workqueue: Show the latest
workqueue name in /proc/PID/{comm,stat,status}, 2018-05-18) the limit
of 15 character comm names hasn't applied to "kworker" processes. This
can be seen e.g. on my Linux v5.10 box:
$ awk '{print $2}' /proc/*/stat 2>/dev/null | grep kworker | sort -R | head -n 5
(kworker/3:1-mm_percpu_wq)
(kworker/0:0H-events_highpri)
(kworker/1:1H-kblockd)
(kworker/u16:1-events_unbound)
(kworker/u17:0)
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
man5/proc.5 | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/man5/proc.5 b/man5/proc.5
index 115c8592e..b23dd1479 100644
--- a/man5/proc.5
+++ b/man5/proc.5
@@ -2092,9 +2092,13 @@ The filename of the executable, in parentheses. Tools such as
may alternatively (or additionally) use
.IR /proc/ pid /cmdline.
.IP
-Strings longer than
+For userspace, strings longer than
.B TASK_COMM_LEN
(16) characters (including the terminating null byte) are silently truncated.
+Since Linux version 4.18.0 a longer limit of 64 (including the
+terminating null byte) has applied to the kernel's own workqueue
+workers (whose names start with "kworker/").
+.IP
This is visible whether or not the executable is swapped out.
.TP
(3) \fIstate\fP \ %c
--
2.39.0.1106.gf45ba805d1a
next prev parent reply other threads:[~2022-12-23 18:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-23 17:59 [PATCH 0/2] proc.5: note broken v4.18 userspace promise Ævar Arnfjörð Bjarmason
2022-12-23 17:59 ` [PATCH 1/2] proc.5: note that "cmdline" might be favored over "stat.comm" by ps(1) Ævar Arnfjörð Bjarmason
2022-12-28 20:27 ` Alejandro Colomar
2022-12-23 17:59 ` Ævar Arnfjörð Bjarmason [this message]
2022-12-23 18:12 ` [PATCH 0/2] proc.5: note broken v4.18 userspace promise Linus Torvalds
2022-12-28 20:26 ` Alejandro Colomar
2023-01-04 20:59 ` Ævar Arnfjörð Bjarmason
2023-01-04 17:19 ` 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=patch-2.2-0d1254ecb-20221223T174835Z-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=adobriyan@gmail.com \
--cc=alx.manpages@gmail.com \
--cc=alx@kernel.org \
--cc=csmall@enc.com.au \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
/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