From: Esben Nielsen <nielsen.esben@googlemail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Esben Nielsen <nielsen.esben@googlemail.com>,
Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: Why can't I set the priority of softirq-hrt? (Re: 2.6.17-rt1)
Date: Fri, 23 Jun 2006 12:23:44 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0606230055390.13514@localhost.localdomain> (raw)
In-Reply-To: <1150999517.25491.151.camel@localhost.localdomain>
On Thu, 22 Jun 2006, Thomas Gleixner wrote:
> On Thu, 2006-06-22 at 19:06 +0100, Esben Nielsen wrote:
>>>
>>> Thats a seperate issue. Though you are right.
>>
>> Why not use my original patch and solve both issues?
>> I have even updated it to avoid the double traversal. It also removes
>> one other traversal which shouldn't be needed. (I have not had time
>> to boot the kernel with it, though, but it does compile...:-)
>
Let me comment on your last sentence first:
> We want an immidate propagation.
There is no such thing as "immidiate". The most you can say is that when
you return from setscheduler() everything is taken care off. I agree - it
has to be like that. But I just want to add _effectively_ taken care off. I.e.
when the within the time setscheduler() has returned _and_ the the
relevant priorities have time to run things get fixed. No, the users
should not have to worry about the priorities hanging around, but the
system can wait with fixing them it is relavant.
> Simply because it does not solve following scenario:
>
> High prio task is blocked on lock and boosts 3 other tasks. Now the
> higher prrio watchdog detects that the high prio task is stuck and
> lowers the priority. You can wake it up as long as you want, the boosted
> task is still busy looping.
Yes, you are right. I have thought about how to fix it, but it will be
rather ugly. I'll try to see what I can do though, but I am afraid the
patch might get too big. :-(
(
The same problem may actually always have been present in another corner
situation:
A boosts B whichs is blocked interruptible on a lock a boosts C, which
again boosts D (etc.). A and B are signalled roughly at the same time. A
wakes up first a decrease the priority of B but not C, because the B runs
on another CPU, but with lower priority and fixes C. A then stops because C is
fixed. but D still have the A's priority and preempts B, which should fix
it, but has it's low priority back.
This situation is not bad because A has already been in the and
therefore the designer has to think that C D etc already got it's
priority. That A is later on interrupted shouldn't matter.
)
May I suggest a compromise:
if (in_interrupt() ||
( increasing priority && current->prio < prio ) )
do it Esben's way;
else
do it Thomas's way;
Then will have fixed most of the problems. We still have the problem of a
the high priority watchdog task being unbound in setscheduler(), though.
And if it is called from interrupt and used to descrease the priority, it
wont work correctly. But it will work for the use in hrtimers, where the
priority is increased from interrupt.
> And I do not like the idea of invoking the scheduler to do those
> propagations. setscheduler is a synchronous effect in all other cases.
> So it has to be synchronous in the propagation case too.
See my note above about being "immediate". Syncronous is more precise but
the same argument holds.
>
> Preempt-RT and the dynamic priority adjustment of high resolution timers
> is a different playground and we have to think about that seperately.
*nod*
I agree, although we deffinitely don't want to have too many #ifdef
CONFIG_PREEMPT_RT around in the code. That makes it far harder to get into
the mainline tree.
I was bonked for using the other thread for preempt-realtime stuff, so I
assume this thread is for preempt-realtime stuff only :-)
>
> tglx
>
>
next prev parent reply other threads:[~2006-06-23 10:23 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-18 7:06 2.6.17-rt1 Ingo Molnar
2006-06-18 16:13 ` 2.6.17-rt1 Michal Piotrowski
[not found] ` <Pine.LNX.4.64.0606201656230.11643@localhost.localdomain>
2006-06-20 15:13 ` Why can't I set the priority of softirq-hrt? (Re: 2.6.17-rt1) Thomas Gleixner
2006-06-20 17:09 ` Esben Nielsen
2006-06-20 16:35 ` Thomas Gleixner
2006-06-20 21:16 ` Esben Nielsen
2006-06-20 20:35 ` Thomas Gleixner
2006-06-20 23:19 ` Esben Nielsen
2006-06-20 16:39 ` Steven Rostedt
2006-06-20 18:12 ` Esben Nielsen
2006-06-20 17:21 ` Thomas Gleixner
2006-06-20 21:26 ` Esben Nielsen
2006-06-20 20:51 ` Thomas Gleixner
2006-06-21 8:20 ` Steven Rostedt
2006-06-21 11:05 ` Esben Nielsen
2006-06-21 15:43 ` Esben Nielsen
2006-06-21 15:21 ` Steven Rostedt
2006-06-21 16:37 ` Esben Nielsen
2006-06-21 15:51 ` Steven Rostedt
2006-06-21 17:14 ` Esben Nielsen
2006-06-21 16:26 ` Thomas Gleixner
2006-06-21 18:30 ` Ingo Molnar
2006-06-22 10:28 ` Esben Nielsen
2006-06-21 21:29 ` Esben Nielsen
2006-06-21 20:33 ` Thomas Gleixner
2006-06-21 23:35 ` Esben Nielsen
2006-06-22 7:06 ` Thomas Gleixner
2006-06-22 10:32 ` Esben Nielsen
2006-06-22 13:33 ` Steven Rostedt
2006-06-22 13:45 ` Steven Rostedt
2006-06-22 14:20 ` Thomas Gleixner
2006-06-22 14:23 ` Steven Rostedt
2006-06-22 14:26 ` Thomas Gleixner
2006-06-22 18:06 ` Esben Nielsen
2006-06-22 18:05 ` Thomas Gleixner
2006-06-23 11:23 ` Esben Nielsen [this message]
2006-06-23 11:06 ` Steven Rostedt
2006-07-03 11:48 ` Esben Nielsen
2006-06-21 8:13 ` Steven Rostedt
2006-06-21 11:03 ` Esben Nielsen
2006-06-22 0:57 ` 2.6.17-rt1 Lee Revell
2006-06-22 2:51 ` More weird latency trace output (was Re: 2.6.17-rt1) Lee Revell
2006-06-23 1:24 ` Lee Revell
2006-06-24 22:15 ` Lee Revell
2006-06-24 22:12 ` Ingo Molnar
2006-06-24 22:31 ` Lee Revell
2006-06-24 23:49 ` Lee Revell
2006-06-23 20:56 ` 2.6.17-rt1 - mm_struct leak Vernon Mauery
2006-06-24 9:24 ` Mark Hounschell
2006-06-24 9:32 ` Mark Hounschell
2006-06-30 16:02 ` [PATCH -RT]Re: " Vernon Mauery
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.0606230055390.13514@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®