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.

Merge tag 'sched-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fix from Thomas Gleixner:
"The recent expansion of the sched switch tracepoint inserted a new
argument in the middle of the arguments. This reordering broke BPF
programs which relied on the old argument list.

While tracepoints are not considered stable ABI, it's not trivial to
make BPF cope with such a change, but it's being worked on. For now
restore the original argument order and move the new argument to the
end of the argument list"

* tag 'sched-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched/tracing: Append prev_state to tp args instead

+21 -21
+3 -3
include/trace/events/sched.h
··· 222 222 TRACE_EVENT(sched_switch, 223 223 224 224 TP_PROTO(bool preempt, 225 - unsigned int prev_state, 226 225 struct task_struct *prev, 227 - struct task_struct *next), 226 + struct task_struct *next, 227 + unsigned int prev_state), 228 228 229 - TP_ARGS(preempt, prev_state, prev, next), 229 + TP_ARGS(preempt, prev, next, prev_state), 230 230 231 231 TP_STRUCT__entry( 232 232 __array( char, prev_comm, TASK_COMM_LEN )
+1 -1
kernel/sched/core.c
··· 6382 6382 migrate_disable_switch(rq, prev); 6383 6383 psi_sched_switch(prev, next, !task_on_rq_queued(prev)); 6384 6384 6385 - trace_sched_switch(sched_mode & SM_MASK_PREEMPT, prev_state, prev, next); 6385 + trace_sched_switch(sched_mode & SM_MASK_PREEMPT, prev, next, prev_state); 6386 6386 6387 6387 /* Also unlocks the rq: */ 6388 6388 rq = context_switch(rq, prev, next, &rf);
+2 -2
kernel/trace/fgraph.c
··· 404 404 405 405 static void 406 406 ftrace_graph_probe_sched_switch(void *ignore, bool preempt, 407 - unsigned int prev_state, 408 407 struct task_struct *prev, 409 - struct task_struct *next) 408 + struct task_struct *next, 409 + unsigned int prev_state) 410 410 { 411 411 unsigned long long timestamp; 412 412 int index;
+2 -2
kernel/trace/ftrace.c
··· 7420 7420 7421 7421 static void 7422 7422 ftrace_filter_pid_sched_switch_probe(void *data, bool preempt, 7423 - unsigned int prev_state, 7424 7423 struct task_struct *prev, 7425 - struct task_struct *next) 7424 + struct task_struct *next, 7425 + unsigned int prev_state) 7426 7426 { 7427 7427 struct trace_array *tr = data; 7428 7428 struct trace_pid_list *pid_list;
+4 -4
kernel/trace/trace_events.c
··· 773 773 774 774 static void 775 775 event_filter_pid_sched_switch_probe_pre(void *data, bool preempt, 776 - unsigned int prev_state, 777 776 struct task_struct *prev, 778 - struct task_struct *next) 777 + struct task_struct *next, 778 + unsigned int prev_state) 779 779 { 780 780 struct trace_array *tr = data; 781 781 struct trace_pid_list *no_pid_list; ··· 799 799 800 800 static void 801 801 event_filter_pid_sched_switch_probe_post(void *data, bool preempt, 802 - unsigned int prev_state, 803 802 struct task_struct *prev, 804 - struct task_struct *next) 803 + struct task_struct *next, 804 + unsigned int prev_state) 805 805 { 806 806 struct trace_array *tr = data; 807 807 struct trace_pid_list *no_pid_list;
+2 -2
kernel/trace/trace_osnoise.c
··· 1168 1168 */ 1169 1169 static void 1170 1170 trace_sched_switch_callback(void *data, bool preempt, 1171 - unsigned int prev_state, 1172 1171 struct task_struct *p, 1173 - struct task_struct *n) 1172 + struct task_struct *n, 1173 + unsigned int prev_state) 1174 1174 { 1175 1175 struct osnoise_variables *osn_var = this_cpu_osn_var(); 1176 1176
+2 -2
kernel/trace/trace_sched_switch.c
··· 22 22 23 23 static void 24 24 probe_sched_switch(void *ignore, bool preempt, 25 - unsigned int prev_state, 26 - struct task_struct *prev, struct task_struct *next) 25 + struct task_struct *prev, struct task_struct *next, 26 + unsigned int prev_state) 27 27 { 28 28 int flags; 29 29
+2 -2
kernel/trace/trace_sched_wakeup.c
··· 426 426 427 427 static void notrace 428 428 probe_wakeup_sched_switch(void *ignore, bool preempt, 429 - unsigned int prev_state, 430 - struct task_struct *prev, struct task_struct *next) 429 + struct task_struct *prev, struct task_struct *next, 430 + unsigned int prev_state) 431 431 { 432 432 struct trace_array_cpu *data; 433 433 u64 T0, T1, delta;
+3 -3
samples/trace_events/trace_custom_sched.h
··· 25 25 * that the custom event is using. 26 26 */ 27 27 TP_PROTO(bool preempt, 28 - unsigned int prev_state, 29 28 struct task_struct *prev, 30 - struct task_struct *next), 29 + struct task_struct *next, 30 + unsigned int prev_state), 31 31 32 - TP_ARGS(preempt, prev_state, prev, next), 32 + TP_ARGS(preempt, prev, next, prev_state), 33 33 34 34 /* 35 35 * The next fields are where the customization happens.