Debian Codegraph @

schedutils/coresched.1.adoc

raw
1 //po4a: entry man manual
2
3 = coresched(1)
4 :doctype: manpage
5 :man manual: User Commands
6 :man source: util-linux {release-version}
7 :page-layout: base
8 :command: coresched
9 :colon: :
10 :copyright: ©
11
12 == NAME
13
14 coresched - manage core scheduling cookies for tasks
15
16 == SYNOPSIS
17
18 *{command}* [*get*] [*-s* _pid_]
19
20 *{command}* *new* [*-t* _type_] *-d* _pid_
21
22 *{command}* *new* [*-t* _type_] \-- _command_ [_argument_...]
23
24 *{command}* *copy* [*-s* _pid_] [*-t* _type_] *-d* _pid_
25
26 *{command}* *copy* [*-s* _pid_] [*-t* _type_] \-- _command_ [_argument_...]
27
28 == DESCRIPTION
29 The *{command}* command is used to retrieve or modify the core scheduling cookies of a running process given its _pid_, or to spawn a new _command_ with core scheduling cookies.
30
31 Core scheduling permits the definition of groups of tasks that are allowed to share a physical core.
32 This is done by assigning a cookie to each task.
33 Only tasks have the same cookie are allowed to be scheduled on the same physical core.
34
35 It is possible to either assign a new random cookie to a task, or copy a cookie from another task. It is not possible to choose the value of the cookie.
36
37 == FUNCTIONS
38 *get*::
39 Retrieve the core scheduling cookie of the PID specified in *-s*.
40 If *-s* is omitted, it will get the cookie of the current *{command}* process.
41
42 *new*::
43 Assign a new cookie to an existing PID specified in *-d*, or execute _command_ with a new cookie.
44
45 *copy*::
46 Copy the cookie from an existing PID (*-s*) to another PID (*-d*), or execute _command_ with that cookie.
47 If *-s* is omitted, it will get the cookie of the current *{command}* process.
48
49 If no function is specified, it will run the *get* function.
50
51 == OPTIONS
52 *-s*, *--source* _PID_::
53 Which _PID_ to get the cookie from.
54 If this option is omitted, it will get the cookie from the current *{command}* process.
55
56 *-d*, *--dest* _PID_::
57 Which _PID_ to modify the cookie of.
58
59 *-t*, *--dest-type* _TYPE_::
60 The type of the PID whose cookie will be modified. This can be one of three values:
61 - *pid*, or process ID
62 - *tgid*, or thread group ID (default value)
63 - *pgid*, or process group ID
64
65 *-v*, *--verbose*::
66 Show extra information when modifying cookies of tasks.
67
68 include::man-common/help-version.adoc[]
69
70 == EXAMPLES
71 Get the core scheduling cookie of the {command} task itself, usually inherited from its parent{colon}::
72 *{command} get*
73
74 Get the core scheduling cookie of a task with PID _123_{colon}::
75 *{command} get -s* _123_
76
77 Give a task with PID _123_ a new core scheduling cookie{colon}::
78 *{command} new -d* _123_
79
80 Spawn a new task with a new core scheduling cookie{colon}::
81 *{command} new* \-- _command_ [_argument_...]
82
83 Copy the cookie from the current {command} process another task with pid _456_{colon}::
84 *{command} copy -d* _456_
85
86 Copy the cookie from a task with pid _123_ to another task with pid _456_{colon}::
87 *{command} copy -s* _123_ *-d* _456_
88
89 Copy the cookie from a task with pid _123_ to a new task _command_{colon}::
90 *{command} copy -s* _123_ \-- _command_ [_argument_...]
91
92 Copy the cookie from a task with pid _123_ to the process group ID _456_{colon}::
93 *{command} copy -s* _123_ *-t* _pgid_ *-d* _456_
94
95 == PERMISSIONS
96 Retrieving or modifying the core scheduling cookie of a process requires *PTRACE_MODE_READ_REALCREDS* ptrace access to that process.
97 See the section "Ptrace access mode checking" in *ptrace*(2) for more information.
98
99 == EXIT STATUS
100 On success, *{command}* returns 0.
101 If *{command}* fails, it will print an error and return 1.
102
103 If a _command_ is being executed, the return value of *{command}* will be the return value of _command_.
104
105 == NOTES
106 *{command}* requires core scheduling support in the kernel.
107 This can be enabled via the *CONFIG_SCHED_CORE* kernel config option.
108
109 == AUTHORS
110 mailto:[email protected][Thijs Raymakers],
111 mailto:[email protected][Phil Auld]
112
113 == COPYRIGHT
114
115 Copyright {copyright} 2024 Thijs Raymakers and Phil Auld. This is free software licensed under the EUPL.
116
117 == SEE ALSO
118 *chrt*(1),
119 *nice*(1),
120 *renice*(1),
121 *taskset*(1),
122 *ptrace*(2),
123 *sched*(7)
124
125 The Linux kernel source files _Documentation/admin-guide/hw-vuln/core-scheduling.rst_
126
127 include::man-common/bugreports.adoc[]
128
129 include::man-common/footer.adoc[]
130
131 ifdef::translation[]
132 include::man-common/translation.adoc[]
133 endif::[]