From: Mike Galbraith <efault@gmx.de>
To: Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Peter Williams <pwil3058@bigpond.net.au>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [patch] f83f9ac causes tasks running at MAX_PRIO
Date: Sun, 29 Nov 2009 14:23:47 +0100 [thread overview]
Message-ID: <1259501027.6268.9.camel@marge.simson.net> (raw)
top - 11:33:19 up 1 min, 21 users, load average: 4.47, 1.44, 0.51
Tasks: 288 total, 1 running, 287 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2%us, 0.5%sy, 0.0%ni, 99.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ P COMMAND
568 root 20 0 0 0 0 S 1 0.0 0:00.02 3 scsi_eh_1
4724 root 40 0 358m 22m 4008 S 1 0.7 0:01.69 0 Xorg
6064 root 40 0 8872 1316 852 R 1 0.0 0:00.07 3 top
1 root 40 0 1064 388 324 S 0 0.0 0:01.30 2 init
2 root 40 0 0 0 0 S 0 0.0 0:00.00 1 kthreadd
3 root RT 0 0 0 0 S 0 0.0 0:00.00 0 migration/0
WARN_ON(current->normal_prio == MAX_PRIO);
[ 0.092016] ------------[ cut here ]------------
[ 0.096008] WARNING: at kernel/sched.c:2591 sched_fork+0xe4/0x1ae()
[ 0.100002] Hardware name: MS-7502
[ 0.104002] Modules linked in:
[ 0.108191] Pid: 0, comm: swapper Not tainted 2.6.32-tip-smpx #956
[ 0.112002] Call Trace:
[ 0.116004] [<ffffffff810365ab>] ? sched_fork+0xe4/0x1ae
[ 0.120004] [<ffffffff81038eb8>] warn_slowpath_common+0x77/0xa4
[ 0.124004] [<ffffffff81038ef4>] warn_slowpath_null+0xf/0x11
[ 0.128003] [<ffffffff810365ab>] sched_fork+0xe4/0x1ae
[ 0.132005] [<ffffffff81059a9f>] ? monotonic_to_bootbased+0x26/0x34
[ 0.136004] [<ffffffff8103783b>] copy_process+0x4b9/0x10e4
[ 0.140006] [<ffffffff810bd38b>] ? __get_vm_area_node+0x175/0x1bf
[ 0.144004] [<ffffffff810385b2>] do_fork+0x14c/0x304
[ 0.148005] [<ffffffff810200dd>] ? __ioremap_caller+0x292/0x2fb
[ 0.152005] [<ffffffff812838b0>] ? acpi_os_map_memory+0x12/0x1b
[ 0.156006] [<ffffffff810038d2>] kernel_thread+0x82/0xe0
[ 0.160006] [<ffffffff8146c510>] ? kernel_init+0x0/0x1af
[ 0.164004] [<ffffffff81003930>] ? child_rip+0x0/0x20
[ 0.168004] [<ffffffff81281a48>] ? rest_init+0x1c/0x76
[ 0.172003] [<ffffffff8146cc54>] start_kernel+0x351/0x35c
[ 0.176004] [<ffffffff8146c29a>] x86_64_start_reservations+0xaa/0xae
[ 0.180004] [<ffffffff8146c37f>] x86_64_start_kernel+0xe1/0xe8
[ 0.184007] ---[ end trace 4eaa2a86a8e2da22 ]---
sched: fix task priority bug.
f83f9ac removed a call to effective_prio() in wake_up_new_task(), which
leads to tasks running at MAX_PRIO. That call set both the child's prio
and normal_prio fields to normal_prio(child). Do the same fork time by
setting both to normal_prio(parent).
Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Williams <pwil3058@bigpond.net.au>
LKML-Reference: <new-submission>
---
kernel/sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c
+++ linux-2.6/kernel/sched.c
@@ -2609,7 +2609,7 @@ void sched_fork(struct task_struct *p, i
/*
* Make sure we do not leak PI boosting priority to the child.
*/
- p->prio = current->normal_prio;
+ p->prio = p->normal_prio = normal_prio(current);
if (!rt_prio(p->prio))
p->sched_class = &fair_sched_class;
next reply other threads:[~2009-11-29 13:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-29 13:23 Mike Galbraith [this message]
2009-12-02 11:46 ` Peter Zijlstra
2009-12-02 12:49 ` Mike Galbraith
2009-12-03 1:25 ` Peter Williams
2009-12-03 1:44 ` Mike Galbraith
2009-12-03 10:02 ` Peter Zijlstra
2009-12-02 14:03 ` Steven Rostedt
2009-12-02 16:51 ` Mike Galbraith
2009-12-09 9:55 ` [tip:sched/urgent] sched: Fix task priority bug tip-bot for Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1259501027.6268.9.camel@marge.simson.net \
--to=efault@gmx.de \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pwil3058@bigpond.net.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome