From: Esben Nielsen <nielsen.esben@googlemail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Esben Nielsen <nielsen.esben@googlemail.com>,
Esben Nielsen <nielsen.esben@gogglemail.com>,
Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org
Subject: Re: Why can't I set the priority of softirq-hrt? (Re: 2.6.17-rt1)
Date: Thu, 22 Jun 2006 11:32:59 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0606221129110.10550@localhost.localdomain> (raw)
In-Reply-To: <1150959972.25491.40.camel@localhost.localdomain>
On Thu, 22 Jun 2006, Thomas Gleixner wrote:
> On Thu, 2006-06-22 at 00:35 +0100, Esben Nielsen wrote:
>> On Wed, 21 Jun 2006, Thomas Gleixner wrote:
>>
>>> On Wed, 2006-06-21 at 22:29 +0100, Esben Nielsen wrote:
>>>>> Find an version against the code in -mm below. Not too much tested yet.
>>>>
>>>> What if setscheduler is called from interrup context as in the hrt timers?
>>>
>>> It simply gets stuff going, nothing else.
>>>
>> What I mean is that we will then do the full priority inheritance boost
>> with interrupts off.
>
> Only in the case when its called from IRQ context.
>
>> Before setscheduler() was O(1), now it is O(<lock depth of what ever lock
>> the target task might be locked on>).
>>
>> This is not a problem for your use of setscheduler() as the task involved
>> only can be blocked on kernel mutexes, but when the function is used on a
>> userspace process the lock depth can be deep.
>
> Damn, I missed that this is still in the irq off section, when called
> from do_sched_setscheduler().
>
There is more to it than that:
What if you for some reason try to set the priority of a low level task
from a high priority one? It could be that your application have some kind
of watchdog or manager process dynamically adjusting the priorities of the
other tasks. You simply don't want to be concerned about those tasks being
blocked in some strange (maybe even buggy) logging structure. You want to
do it O(1) and then let those tasks handle it.
> Good catch. I fix that.
>
I know you hate to let the scheduler do the work for you, but I find it
very elegant and easy once in a while :-)
Esben
> tglx
>
>
next prev parent reply other threads:[~2006-06-22 9:32 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 [this message]
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
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.0606221129110.10550@localhost.localdomain \
--to=nielsen.esben@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nielsen.esben@gogglemail.com \
--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®