Skip to content

Commit 1195d58

Browse files
committed
Merge tag 'sched-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar: "Two fixes: fix a new tracepoint's output value, and fix the formatting of show-state syslog printouts" * tag 'sched-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/debug: Fix the alignment of the show-state debug output sched: Fix use of count for nr_running tracepoint
2 parents 7f5faaa + cc172ff commit 1195d58

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

kernel/sched/core.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6431,10 +6431,10 @@ void sched_show_task(struct task_struct *p)
64316431
if (!try_get_task_stack(p))
64326432
return;
64336433

6434-
printk(KERN_INFO "%-15.15s %c", p->comm, task_state_to_char(p));
6434+
pr_info("task:%-15.15s state:%c", p->comm, task_state_to_char(p));
64356435

64366436
if (p->state == TASK_RUNNING)
6437-
printk(KERN_CONT " running task ");
6437+
pr_cont(" running task ");
64386438
#ifdef CONFIG_DEBUG_STACK_USAGE
64396439
free = stack_not_used(p);
64406440
#endif
@@ -6443,8 +6443,8 @@ void sched_show_task(struct task_struct *p)
64436443
if (pid_alive(p))
64446444
ppid = task_pid_nr(rcu_dereference(p->real_parent));
64456445
rcu_read_unlock();
6446-
printk(KERN_CONT "%5lu %5d %6d 0x%08lx\n", free,
6447-
task_pid_nr(p), ppid,
6446+
pr_cont(" stack:%5lu pid:%5d ppid:%6d flags:0x%08lx\n",
6447+
free, task_pid_nr(p), ppid,
64486448
(unsigned long)task_thread_info(p)->flags);
64496449

64506450
print_worker_info(KERN_INFO, p);
@@ -6479,13 +6479,6 @@ void show_state_filter(unsigned long state_filter)
64796479
{
64806480
struct task_struct *g, *p;
64816481

6482-
#if BITS_PER_LONG == 32
6483-
printk(KERN_INFO
6484-
" task PC stack pid father\n");
6485-
#else
6486-
printk(KERN_INFO
6487-
" task PC stack pid father\n");
6488-
#endif
64896482
rcu_read_lock();
64906483
for_each_process_thread(g, p) {
64916484
/*

kernel/sched/sched.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1999,7 +1999,7 @@ static inline void sub_nr_running(struct rq *rq, unsigned count)
19991999
{
20002000
rq->nr_running -= count;
20012001
if (trace_sched_update_nr_running_tp_enabled()) {
2002-
call_trace_sched_update_nr_running(rq, count);
2002+
call_trace_sched_update_nr_running(rq, -count);
20032003
}
20042004

20052005
/* Check if we still need preemption */

0 commit comments

Comments
 (0)