Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Bagas Sanjaya and committed by
Jonathan Corbet
c6804c6a 1f37cae5

+27 -25
+27 -25
Documentation/accounting/taskstats.rst
··· 76 76 The taskstats payload is one of the following three kinds: 77 77 78 78 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. 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 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. 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. 92 92 93 93 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: 95 95 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. 98 98 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. 101 101 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. 104 104 105 105 3. New message sent by kernel whenever a task exits. The payload consists of a 106 106 series of attributes of the following type: 107 107 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 114 116 115 117 116 118 per-tgid stats