From: Mike Galbraith <efault@gmx.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>,
Peter Williams <pwil3058@bigpond.net.au>,
LKML <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [patch] f83f9ac causes tasks running at MAX_PRIO
Date: Wed, 02 Dec 2009 13:49:10 +0100 [thread overview]
Message-ID: <1259758150.6167.8.camel@marge.simson.net> (raw)
In-Reply-To: <1259754383.4003.610.camel@laptop>
On Wed, 2009-12-02 at 12:46 +0100, Peter Zijlstra wrote:
> init_idle() doing:
> idle->prio = idle->normal_prio = MAX_PRIO;
>
> Which will propagate... like reported.
>
> Now, since the idle-threads usually run on &idle_sched_class, nobody
> will actually look at their ->prio, so having that out-of-range might
> make sense.
>
> Just needs to get fixed up when we fork a normal thread, which would be
> in sched_fork(), now your call to normal_prio() fixes this by setting
> everything to ->static_prio for SCHED_OTHER tasks, however
>
> migration_call()
> CPU_DEAD:
> rq->idle->static_prio = MAX_PRIO;
>
> spoils that too..
Darn.
> Ingo, any particular reason we set idle threads at MAX_PRIO? Can't we
> simply do something like below and be done with it?
Hysterical reasons? That might have been a doorstop conversion kit for
O(1), but boots fine with CFS, and prio 40 tasks are history.
> ---
> kernel/sched.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sched.c b/kernel/sched.c
> index c0e4e9d..5ad5a66 100644
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -6963,7 +6963,6 @@ void __cpuinit init_idle(struct task_struct *idle,
> int cpu)
> __sched_fork(idle);
> idle->se.exec_start = sched_clock();
>
> - idle->prio = idle->normal_prio = MAX_PRIO;
> cpumask_copy(&idle->cpus_allowed, cpumask_of(cpu));
> __set_task_cpu(idle, cpu);
>
> @@ -7667,7 +7666,6 @@ migration_call(struct notifier_block *nfb,
> unsigned long action, void *hcpu)
> spin_lock_irq(&rq->lock);
> update_rq_clock(rq);
> deactivate_task(rq, rq->idle, 0);
> - rq->idle->static_prio = MAX_PRIO;
> __setscheduler(rq, rq->idle, SCHED_NORMAL, 0);
> rq->idle->sched_class = &idle_sched_class;
> migrate_dead_tasks(cpu);
>
next prev parent reply other threads:[~2009-12-02 12:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-29 13:23 Mike Galbraith
2009-12-02 11:46 ` Peter Zijlstra
2009-12-02 12:49 ` Mike Galbraith [this message]
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=1259758150.6167.8.camel@marge.simson.net \
--to=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=pwil3058@bigpond.net.au \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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