Skip to content

Commit c6804c6

Browse files
bagasmeJonathan Corbet
authored andcommitted
Documentation: taskstats: Reindent payload kinds list
Payload kinds list text is indented at the first text column, rather than aligned to the list number. As an effect, the third item becomes sublist of second item's third sublist item (TASKTYPE_TYPE_STATS). Reindent the list text. Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20251104130751.22755-1-bagasdotme@gmail.com>
1 parent 1f37cae commit c6804c6

1 file changed

Lines changed: 28 additions & 26 deletions

File tree

Documentation/accounting/taskstats.rst

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -76,41 +76,43 @@ The messages are in the format::
7676
The taskstats payload is one of the following three kinds:
7777

7878
1. Commands: Sent from user to kernel. Commands to get data on
79-
a pid/tgid consist of one attribute, of type TASKSTATS_CMD_ATTR_PID/TGID,
80-
containing a u32 pid or tgid in the attribute payload. The pid/tgid denotes
81-
the task/process for which userspace wants statistics.
82-
83-
Commands to register/deregister interest in exit data from a set of cpus
84-
consist of one attribute, of type
85-
TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK and contain a cpumask in the
86-
attribute payload. The cpumask is specified as an ascii string of
87-
comma-separated cpu ranges e.g. to listen to exit data from cpus 1,2,3,5,7,8
88-
the cpumask would be "1-3,5,7-8". If userspace forgets to deregister interest
89-
in cpus before closing the listening socket, the kernel cleans up its interest
90-
set over time. However, for the sake of efficiency, an explicit deregistration
91-
is advisable.
79+
a pid/tgid consist of one attribute, of type TASKSTATS_CMD_ATTR_PID/TGID,
80+
containing a u32 pid or tgid in the attribute payload. The pid/tgid denotes
81+
the task/process for which userspace wants statistics.
82+
83+
Commands to register/deregister interest in exit data from a set of cpus
84+
consist of one attribute, of type
85+
TASKSTATS_CMD_ATTR_REGISTER/DEREGISTER_CPUMASK and contain a cpumask in the
86+
attribute payload. The cpumask is specified as an ascii string of
87+
comma-separated cpu ranges e.g. to listen to exit data from cpus 1,2,3,5,7,8
88+
the cpumask would be "1-3,5,7-8". If userspace forgets to deregister
89+
interest in cpus before closing the listening socket, the kernel cleans up
90+
its interest set over time. However, for the sake of efficiency, an explicit
91+
deregistration is advisable.
9292

9393
2. Response for a command: sent from the kernel in response to a userspace
94-
command. The payload is a series of three attributes of type:
94+
command. The payload is a series of three attributes of type:
9595

96-
a) TASKSTATS_TYPE_AGGR_PID/TGID : attribute containing no payload but indicates
97-
a pid/tgid will be followed by some stats.
96+
a) TASKSTATS_TYPE_AGGR_PID/TGID: attribute containing no payload but
97+
indicates a pid/tgid will be followed by some stats.
9898

99-
b) TASKSTATS_TYPE_PID/TGID: attribute whose payload is the pid/tgid whose stats
100-
are being returned.
99+
b) TASKSTATS_TYPE_PID/TGID: attribute whose payload is the pid/tgid whose
100+
stats are being returned.
101101

102-
c) TASKSTATS_TYPE_STATS: attribute with a struct taskstats as payload. The
103-
same structure is used for both per-pid and per-tgid stats.
102+
c) TASKSTATS_TYPE_STATS: attribute with a struct taskstats as payload. The
103+
same structure is used for both per-pid and per-tgid stats.
104104

105105
3. New message sent by kernel whenever a task exits. The payload consists of a
106106
series of attributes of the following type:
107107

108-
a) TASKSTATS_TYPE_AGGR_PID: indicates next two attributes will be pid+stats
109-
b) TASKSTATS_TYPE_PID: contains exiting task's pid
110-
c) TASKSTATS_TYPE_STATS: contains the exiting task's per-pid stats
111-
d) TASKSTATS_TYPE_AGGR_TGID: indicates next two attributes will be tgid+stats
112-
e) TASKSTATS_TYPE_TGID: contains tgid of process to which task belongs
113-
f) TASKSTATS_TYPE_STATS: contains the per-tgid stats for exiting task's process
108+
a) TASKSTATS_TYPE_AGGR_PID: indicates next two attributes will be pid+stats
109+
b) TASKSTATS_TYPE_PID: contains exiting task's pid
110+
c) TASKSTATS_TYPE_STATS: contains the exiting task's per-pid stats
111+
d) TASKSTATS_TYPE_AGGR_TGID: indicates next two attributes will be
112+
tgid+stats
113+
e) TASKSTATS_TYPE_TGID: contains tgid of process to which task belongs
114+
f) TASKSTATS_TYPE_STATS: contains the per-tgid stats for exiting task's
115+
process
114116

115117

116118
per-tgid stats

0 commit comments

Comments
 (0)