From: Peter Zijlstra <peterz@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
raistlin@linux.it, juri.lelli@gmail.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] [ tip/sched/core ] System unresponsive after booting
Date: Wed, 15 Jan 2014 12:00:18 +0100 [thread overview]
Message-ID: <20140115110018.GA31570@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20140115092245.GA15190@gmail.com>
On Wed, Jan 15, 2014 at 10:22:45AM +0100, Ingo Molnar wrote:
> 1)
>
> There's this change to __setscheduler():
>
> -__setscheduler(struct rq *rq, struct task_struct *p, int policy, int prio)
> +/* Actually do priority change: must hold pi & rq lock. */
> +static void __setscheduler(struct rq *rq, struct task_struct *p,
> + const struct sched_attr *attr)
> {
> + int policy = attr->sched_policy;
> +
> p->policy = policy;
> - p->rt_priority = prio;
> +
> + if (rt_policy(policy))
> + p->rt_priority = attr->sched_priority;
> + else
> + p->static_prio = NICE_TO_PRIO(attr->sched_nice);
> +
>
>
> doesnt this change keep p->rt_priority uninitialized in the
> normalize_task() case?
>
> I.e. rt_priority should still be set unconditionally. In the
> SCHED_NORMAL case that will be a zero initialization.
But why? SCHED_NORMAL doesn't care about rt_priority afaict. And once it
gets priority boosted we'll set the rt_priority again to whatever is
propagated from the pi-chain.
> 2)
>
> It's not clear why this change to __setscheduler() was done:
>
> /*
> * Allow unprivileged RT tasks to decrease priority:
> */
> if (user && !capable(CAP_SYS_NICE)) {
> + if (fair_policy(policy)) {
> + if (!can_nice(p, attr->sched_nice))
> + return -EPERM;
> + }
> +
> if (rt_policy(policy)) {o
Bah, I'm pretty sure I wrote that :/ And I can't for the life of me
remember why I did that. Complete fail there.
next prev parent reply other threads:[~2014-01-15 11:00 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 8:27 Daniel Lezcano
2014-01-15 9:22 ` Ingo Molnar
2014-01-15 10:39 ` Peter Zijlstra
2014-01-15 11:00 ` Peter Zijlstra [this message]
2014-01-15 14:05 ` Peter Zijlstra
2014-01-15 9:25 ` Michael wang
2014-01-15 11:30 ` Peter Zijlstra
2014-01-15 13:28 ` Daniel Lezcano
2014-01-16 13:40 ` [tip:sched/core] sched: Preserve the nice level over sched_setscheduler() and sched_setparam() calls tip-bot for Peter Zijlstra
2014-01-15 13:27 ` [BUG] [ tip/sched/core ] System unresponsive after booting Daniel Lezcano
2014-01-15 12:04 ` Peter Zijlstra
2014-01-15 12:24 ` Ingo Molnar
2014-01-15 13:45 ` Daniel Lezcano
2014-01-15 13:09 ` Daniel Lezcano
2014-01-16 13:48 ` Daniel Lezcano
2014-01-16 14:17 ` Peter Zijlstra
2014-01-16 14:20 ` Daniel Lezcano
2014-01-16 14:25 ` Peter Zijlstra
2014-01-16 14:30 ` Daniel Lezcano
2014-01-16 15:42 ` Peter Zijlstra
2014-01-16 15:50 ` Daniel Lezcano
2014-01-16 16:54 ` [PATCH] sched: Fix __sched_setscheduler() nice test Peter Zijlstra
2014-01-16 18:33 ` Peter Zijlstra
2014-01-16 18:39 ` [tip:sched/core] " tip-bot for Peter Zijlstra
2014-01-16 15:28 ` [BUG] [ tip/sched/core ] System unresponsive after booting Daniel Lezcano
2014-01-16 15:48 ` Peter Zijlstra
2014-01-16 15:51 ` Daniel Lezcano
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=20140115110018.GA31570@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=daniel.lezcano@linaro.org \
--cc=juri.lelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=raistlin@linux.it \
/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