From: Esben Nielsen <nielsen.esben@googlemail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Esben Nielsen <nielsen.esben@googlemail.com>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: New PriorityInheritanceTest - bug in 2.6.17-rt7 confirmed
Date: Thu, 6 Jul 2006 15:11:48 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0607061443050.30970@localhost.localdomain> (raw)
In-Reply-To: <1152189293.24611.146.camel@localhost.localdomain>
On Thu, 6 Jul 2006, Thomas Gleixner wrote:
> On Thu, 2006-07-06 at 14:07 +0100, Esben Nielsen wrote:
>> So this is a real bug.
>
> True
>
>> In the previous mail I posted a fix for that problem (and other problems).
>
> I had not much time to look at the patch, but I doubt that we need such
> a complex hack to achieve that. I will look at it later.
The problem is that the deboosting code have to run somewhere.
It can run within try_to_wake_up(). But then it the whole lock chain is
traversed in an atomic section. That unpredictable overall system
latencies since the locks can be in userspace.
So it has to run in some task. That task has to be high priority enough
to preempt the boosted tasks, but it can't be so high priority that it bothers
any higher priority threads than those involved in this. So it can't be,
forinstance a general priority 99 task we just use for this. We thus need
something running at a slightly higher priority than the priority to
which the tasks are boosted, but not a full +1 priority. I.e. we need to
run it at priority "+0.5".
I also think that other stuff, like high resolution timers and others
doing "scheduler plumbing work" in the kernel could benifit from a +0.5
priority.
I thought about some improvements:
1) Make a general TSK_LIFO flag, That would remove some of the direct
references in sched.c to the rtmutex system. In effect it will be the
same, but be more usefull to other subsystems.
2) Double the number of in-kernel priorities. I.e. simply add a number of
"hidden" priorities in which this kind of "plumbing" work can be run:
Kernel priority User space
0 hidden
1 RT 99
2 hidden
3 RT 98
....
199 0
...
This might turn out more clean than a TSK_LIFO. There will be no need to
hack the core scheduler code, which can have some strange side-effect.
But to be honest I don't think the hacks I have done are that bad - except
they refer directly to the rtmutex subsystem. Also adding priorities would
slow down the system.
>
> tglx
>
>
Esben
next prev parent reply other threads:[~2006-07-06 13:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-06 13:07 Esben Nielsen
2006-07-06 12:34 ` Thomas Gleixner
2006-07-06 14:11 ` Esben Nielsen [this message]
2006-07-06 13:32 ` Ingo Molnar
2006-07-06 16:20 ` Esben Nielsen
2006-07-07 0:02 ` Esben Nielsen
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=Pine.LNX.4.64.0607061443050.30970@localhost.localdomain \
--to=nielsen.esben@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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
all inboxes | Powered by JetHome®