From: "Dmitry Adamushko" <dmitry.adamushko@gmail.com>
To: "Ingo Molnar" <mingo@elte.hu>
Cc: "Gregory Haskins" <ghaskins@novell.com>,
"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
linux-kernel@vger.kernel.org
Subject: Re: [sched-devel, patch-rfc] rework of "prioritize non-migratabletasks over migratable ones"
Date: Wed, 18 Jun 2008 13:58:30 +0200 [thread overview]
Message-ID: <b647ffbd0806180458o6603adabgb80c88954981d47a@mail.gmail.com> (raw)
In-Reply-To: <20080618103919.GH15255@elte.hu>
2008/6/18 Ingo Molnar <mingo@elte.hu>:
>
> * Gregory Haskins <ghaskins@novell.com> wrote:
>
>> >>> On Mon, Jun 16, 2008 at 3:17 PM, in message
>> <1213643862.16944.142.camel@twins>, Peter Zijlstra <a.p.zijlstra@chello.nl>
>> wrote:
>> > On Mon, 2008-06-16 at 19:59 +0200, Dmitry Adamushko wrote:
>> >
>> >> One way or another, we have different aritifacts (and mine have likely
>> >> more) but conceptually, both "violates" POSIX if a strict round-robin
>> >> scheduling is required.
>> >
>> > http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_08.html#t
>> > ag_02_08_04_01
>> >
>> > Is quite strict on what FIFO should do, and I know of two points where
>> > we deviate and should work to match.
>>
>> Thanks for the link, Peter. When you read that, its pretty clear that
>> this whole concept violates the standard. Its probably best to just
>> revert the patch and be done with it.
>
> no, there's no spec violation here - the spec is silent on SMP issues.
>
> the spec should not be read to force a global runqueue for RT tasks.
> That would be silly beyond imagination.
I don't think it would actually make sense to specify behavior in
terms of per-cpu queues. This is an implementation detail. So the
_global_ (system-wise) queue makes more sense (at least to me :-) if
one wants to define user-visible scheduling behavior.
e.g. as follows:
(http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_08.html#tag_02_08_04_01)
[quote]
"Threads scheduled under this policy are chosen from a thread list
that is ordered by the time its threads have been on the list without
being executed;"
[/quote]
>From the POV of users, I think only the "global" queue would make
sense. Otherwise, the sentence is rather useless.
[quote]
"generally, the head of the list is the thread that has been on the
list the longest time, and the tail is the thread that has been on the
list the shortest time."
[/quote]
OTOH, some differences can be justified by this "generally" word :-)
so it might be understood as something like this:
task_N can get a CPU only if all other pending runnable tasks that
have been enqueued earlier than task_N (of the same class and prio)
can _not_ start running on this CPU (e.g. due to their affinity).
Note, that our case is somewhat more subtle. We preempt a currently
running task in the hope that it can start running on another CPU
immediately, but we can't guarantee it.
Anyway, we are likely to win wrt cpu time distribution, but this fact
of 'preemption' is a new 'artifact' indeed.
if POSIX can be understood as : a SCHED_FIFO/RR task can be preempted
_only_ by a task with a higher prio and has to consume cpu-time as
long as it wants (FIFO) or till its timeslice expires (RR) , then we
violate it with this new behavior.
>
> Ingo
>
--
Best regards,
Dmitry Adamushko
next prev parent reply other threads:[~2008-06-18 11:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-10 22:58 [sched-devel, patch-rfc] rework of "prioritize non-migratable tasks " Dmitry Adamushko
2008-06-11 8:53 ` Peter Zijlstra
2008-06-11 10:05 ` Dmitry Adamushko
2008-06-13 13:08 ` Peter Zijlstra
2008-06-16 14:26 ` Gregory Haskins
2008-06-16 17:59 ` Dmitry Adamushko
2008-06-16 18:44 ` Gregory Haskins
2008-06-16 19:17 ` Peter Zijlstra
2008-06-16 19:54 ` [sched-devel, patch-rfc] rework of "prioritize non-migratabletasks " Gregory Haskins
2008-06-18 10:39 ` Ingo Molnar
2008-06-18 10:47 ` Peter Zijlstra
2008-06-18 11:52 ` [sched-devel, patch-rfc] rework of "prioritizenon-migratabletasks " Gregory Haskins
2008-06-18 11:58 ` Dmitry Adamushko [this message]
2008-07-01 10:46 ` [sched-devel, patch-rfc] rework of "prioritize non-migratable tasks " Dmitry Adamushko
2008-07-15 12:48 ` Peter Zijlstra
2008-06-18 10:44 ` Ingo Molnar
[not found] <48524EDA0200005A00038BA4@sinclair.provo.novell.com>
2008-06-13 14:41 ` [sched-devel, patch-rfc] rework of "prioritize non-migratabletasks " Gregory Haskins
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=b647ffbd0806180458o6603adabgb80c88954981d47a@mail.gmail.com \
--to=dmitry.adamushko@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=ghaskins@novell.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®