From: raz ben yehuda <raziebe@gmail.com>
To: Mike Galbraith <efault@gmx.de>
Cc: riel@redhat.com, mingo@elte.hu, peterz@infradead.org,
andrew motron <akpm@osdl.org>,
wiseman@macs.biu.ac.il, lkml <linux-kernel@vger.kernel.org>,
linux-rt-users@vger.kernel.org
Subject: Re: RFC: THE OFFLINE SCHEDULER
Date: Sun, 23 Aug 2009 14:05:57 +0300 [thread overview]
Message-ID: <1251025557.3810.65.camel@raz> (raw)
In-Reply-To: <1251012621.14003.71.camel@marge.simson.net>
On Sun, 2009-08-23 at 09:30 +0200, Mike Galbraith wrote:
> On Sun, 2009-08-23 at 12:09 +0300, raz ben yehuda wrote:
> > On Sun, 2009-08-23 at 07:21 +0200, Mike Galbraith wrote:
>
> > > Seems to me this boils down to a different way to make a SW box in a HW
> > > box, which already exists. What does this provide that partitioning a
> > > box with csets and virtualization doesn't?
> > OFFSCHED does not compete with cpu sets nor virtualization.it is
> > different.
> >
> > 1. Neither virtuallization nor cpu sets provide hard real time. OFFSCHED
> > does this with a little cost and no impact on the OS.OFFSCHED is not
> > just accurate , it is also extremely fast,after all, it is NMI'ed
> > processor.
>
> Why not? Why can't I run an RT kernel with an RTOS guest and let it do
> it's deadline management thing?
Have you ever tested how long a single context switch cost ? can you run
this system with a 1us accuracy ? you cannot.try ftrac'ing your system.
the interrupt alone costs several hundreds nano seconds. By the time you
will be reaching your code, the deadline will be nearly gone.
> > 2. OFFSCHED has a access to every piece of memory in the system. so it
> > can act as a centry for the system, or use linux facilities. Also, the
> > kernel can access OFFSCHED memory, it is the same address space.
>
> Hm. That appears to be a self negating argument.
correct. but I can receive packets over napi and transmit packets over hard_start_xmit
much faster than any guest OS. I can disable interrupts and move to poll
mode, thus helping the operating system. can a guest OS help linux?
> > 3. OFFSCHED can improve the linux OS ( NAPI,OFFSCHED firewall,RTOP ),
> > while a guest OS cannot.
> >
> > 4. cpu sets cannot replace softirqs and hardirqs. OFFSCHED can. cpu sets
> > deals with kernel threads and user space threads. in OFFSCHED we use
> > offlets.
>
> Which still looks like OS-fu to me.
I do not understand this remark.
> > 5. cpu sets and virtualization are services provided by the kernel to
> > the "system".who serves the kernel ? who protects the kernel ?
>
> If either one can diddle the others ram, they are in no way isolated or
> protected, so can't even defend against their own bugs.
correct. but the same applies for a hosting OS. as you said , it is a
self negating argument. what if your system is attacked by a RT task
that saturate all cpu time, you will not even be able to know what is
wrong with your system. in OFFSCHED-RTOP I show that even when attacked
by a malicious task, I still can see the problem because I can access
the task list and dump it to a remote machine. It is even possible to
"kill it" with the offlet-server ( still need to write the killing
thing ).
> What protects a hard RT deadline from VM pressure, memory bandwidth
> consumption etc etc? Looks to me like it's soft RT, because you can't
> control the external variables.
what does protect guest OS from the host ? also, In one of my
applications I wrote my own pre-allocation system, OFFSCHED used only
its own pools. so VM was never a problem and it is a true hard real time
system. as for memory bandwidth pressure OFFSCHED is not protected from.
But if you design your application to use small footprint, you will be
able to stay in the processor cache. when you have a kernel thread, lazy
TLB is not always promised. Can you say your RT task will never be
preempted ?
And again, if RTAI or anything of the like has facilities for this kind
of problems, OFFSCHED can use them as well.
> > 6. offlets gives the programmer full control over an entire processor.
> > no preemption, no interrupts, no quiesce. you know what happens , and
> > when it happens.
>
> If I can route interrupts such that only say network interrupts are
> delivered to my cset/vm core, and the guest OS is a custom high speed
> low drag application, I just don't see much difference.
There are other tasks a system must walk through , for example, a
processor must walk through a quiesce state, which means you cannot have
your real time thread running forever without loosing processor from
time to time. and how would you prevent RCU starvation ? what about
IPI ?
> > I have this hard real time system several years on my SMP/MC/SMT
> > machines. It serves me well. The core of OFFSCHED patch was 4 lines.
> > So,i simply compile a ***entirely regular*** linux bzImage and that's
> > it. It did not mess with drivers, spinlocks, softirqs ..., OFFSCHED just
> > directed the cpu_down to my own hard real time piece of code. The rest
> > of the kernel remained the same.
>
> Aaaaanyway, I'm not saying it's not a useful thing to do, just saying I
> don't see any reason you can't get essentially the same result with
> what's in the kernel now.
I thank you for your interest.
> -Mike
>
next prev parent reply other threads:[~2009-08-23 8:05 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1250983671.5688.21.camel@raz>
[not found] ` <1251004897.7043.70.camel@marge.simson.net>
2009-08-23 9:09 ` RFC: THE OFFLINE SCHEDULER raz ben yehuda
2009-08-23 7:30 ` Mike Galbraith
2009-08-23 11:05 ` raz ben yehuda [this message]
2009-08-23 9:52 ` Mike Galbraith
2009-08-25 15:23 ` Christoph Lameter
2009-08-25 17:56 ` Mike Galbraith
2009-08-25 18:03 ` Christoph Lameter
2009-08-25 18:12 ` Mike Galbraith
[not found] ` <5d96567b0908251522m3fd4ab98n76a52a34a11e874c@mail.gmail.com>
2009-08-25 22:32 ` Fwd: " Raz
2009-08-25 19:08 ` Peter Zijlstra
2009-08-25 19:18 ` Christoph Lameter
2009-08-25 19:22 ` Chris Friesen
2009-08-25 20:35 ` Sven-Thorsten Dietrich
2009-08-26 5:31 ` Peter Zijlstra
2009-08-26 10:29 ` raz ben yehuda
2009-08-26 8:02 ` Mike Galbraith
2009-08-26 8:16 ` Raz
2009-08-26 13:47 ` Christoph Lameter
2009-08-26 14:45 ` Maxim Levitsky
2009-08-26 14:54 ` raz ben yehuda
2009-08-26 15:06 ` Pekka Enberg
2009-08-26 15:11 ` raz ben yehuda
2009-08-26 15:30 ` Peter Zijlstra
2009-08-26 15:41 ` Christoph Lameter
2009-08-26 16:03 ` Peter Zijlstra
2009-08-26 16:16 ` Pekka Enberg
2009-08-26 16:20 ` Christoph Lameter
2009-08-26 18:04 ` Ingo Molnar
2009-08-26 19:15 ` Christoph Lameter
2009-08-26 19:32 ` Ingo Molnar
2009-08-26 20:40 ` Christoph Lameter
2009-08-26 20:50 ` Andrew Morton
2009-08-26 21:09 ` Christoph Lameter
2009-08-26 21:15 ` Chris Friesen
2009-08-26 21:37 ` raz ben yehuda
2009-08-27 16:51 ` Chris Friesen
2009-08-27 17:04 ` Christoph Lameter
2009-08-27 21:09 ` Thomas Gleixner
2009-08-27 22:22 ` Gregory Haskins
2009-08-28 2:15 ` Rik van Riel
2009-08-28 3:33 ` Gregory Haskins
2009-08-28 4:27 ` Gregory Haskins
2009-08-28 10:26 ` Thomas Gleixner
2009-08-28 18:57 ` Christoph Lameter
2009-08-28 19:23 ` Thomas Gleixner
2009-08-28 19:52 ` Christoph Lameter
2009-08-28 20:00 ` Thomas Gleixner
2009-08-28 20:21 ` Christoph Lameter
2009-08-28 20:34 ` Thomas Gleixner
2009-08-31 19:19 ` Christoph Lameter
2009-08-31 17:44 ` Roland Dreier
2009-09-01 18:42 ` Christoph Lameter
2009-09-01 16:15 ` Roland Dreier
2009-08-29 17:03 ` jim owens
2009-08-31 19:22 ` Christoph Lameter
2009-08-31 15:33 ` Peter Zijlstra
2009-09-01 18:46 ` Christoph Lameter
2009-08-28 6:14 ` Peter Zijlstra
2009-08-27 23:51 ` Chris Friesen
2009-08-28 0:44 ` Thomas Gleixner
2009-08-28 21:20 ` Chris Friesen
2009-08-28 18:43 ` Christoph Lameter
2009-08-27 21:33 ` raz ben yehuda
2009-08-27 22:05 ` Thomas Gleixner
2009-08-28 8:38 ` raz ben yehuda
2009-08-28 10:05 ` Thomas Gleixner
2009-08-28 13:25 ` Rik van Riel
2009-08-28 13:37 ` jim owens
2009-08-28 15:22 ` raz ben yehuda
2009-08-26 21:34 ` Ingo Molnar
2009-08-27 2:55 ` Frank Ch. Eigler
2009-08-26 21:34 ` raz ben yehuda
2009-08-26 21:08 ` Ingo Molnar
2009-08-26 21:26 ` Christoph Lameter
2009-08-26 21:32 ` raz ben yehuda
2009-08-27 7:15 ` Mike Galbraith
2009-08-26 15:37 ` Chetan.Loke
2009-08-26 15:21 ` Pekka Enberg
2009-08-25 21:09 ` Éric Piel
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=1251025557.3810.65.camel@raz \
--to=raziebe@gmail.com \
--cc=akpm@osdl.org \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=wiseman@macs.biu.ac.il \
/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;
as well as URLs for NNTP newsgroup(s).