public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Max Krasnyanskiy <maxk@qualcomm.com>
To: Mark Hounschell <dmarkh@cfl.rr.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Ingo Oeser <ioe-lkml@rameria.de>, Paul Jackson <pj@sgi.com>,
	linux-kernel@vger.kernel.org, Con Kolivas <kernel@kolivas.org>,
	"Derek L. Fults" <dfults@sgi.com>, devik <devik@cdi.cz>,
	Dimitri Sivanich <sivanich@sgi.com>,
	Dinakar Guniguntala <dino@in.ibm.com>,
	Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr>,
	Frederik Deweerdt <deweerdt@free.fr>, Ingo Molnar <mingo@elte.hu>,
	Matthew Dobson <colpatch@us.ibm.com>,
	rostedt@goodmis.org, Oleg Nesterov <oleg@tv-sign.ru>,
	"Paul E. McKenney" <paulmck@us.ibm.com>,
	Paul Menage <menage@google.com>,
	"Randy.Dunlap" <rddunlap@osdl.org>,
	suresh.b.siddha@intel.com, Thomas Gleixner <tglx@linutronix.de>
Subject: Re: Inquiry: Should we remove "isolcpus= kernel boot option? (may have realtime uses)
Date: Fri, 06 Jun 2008 15:28:10 -0700	[thread overview]
Message-ID: <4849B9FA.3090403@qualcomm.com> (raw)
In-Reply-To: <4847D1B9.3080609@cfl.rr.com>

Mark Hounschell wrote:
> 
> Thanks for the detailed tutorial Max. I'm personally still very 
> skeptical. I really don't believe you'll ever be able to run multiple
> _demanding_ RT environments on the same machine. Now matter how many 
> processors you've got. But even though I might be wrong there, thats 
> actually OK with me. I, and I'm sure most, don't have a problem with 
> dedicating a machine to a single RT env.
> 
> You've got to hold your tongue just right, look at the right spot on the 
> wall, and be running the RT patched kernel, all at the same time, to run 
> just one successfully. I just want to stop using my tongue and staring 
> at the wall. 

I understand your scepticism but it's quite easy to do these days. Yes there 
are certain restrictions on how RT applications have to be designed, but 
definitely not a rocket science. It can be summed up in a few words:
   "cpu isolation, lock-free communication and memory management,
    and direct HW access"
In other words you want to talk using lock-free queues and mempools between 
soft- and hard- RT components and use something like libe1000.sf.net to talk 
to the outside world.
There are other approaches of course, those involve RT kernels, Xenomai, etc.

As I mentioned awhile ago we (here at Qualcomm) actually implemented full 
blown UMB (one of the 4G broadband technologies) basestation that runs entire 
MAC and part of PHY layers in the user-space using CPU isolation techniques. 
Vanilla 2.6.17 to .24 kernel + cpuisol and off-the-shelf dual-Opteron and 
Core2Duo based machines. We have very very tight deadlines and yet everything 
works just fine. And no we don't have to do any special tong holding or other 
rituals :) for it to work. In fact quite the opposite. I can do full SW 
(kernel, etc) builds and do just about anything else while our basestation 
application is running. Worst case latencies in the RT thread running on the 
isolated CPU is about ~1.5usec.

Now I switched to 8way Core2Quad machines. I can run 7 RT engines on 7 
isolated CPUs and load cpu0. Latencies are a bit higher 5-6 usec (I guessing 
due to shared caches and stuff) but otherwise it works fine.  This is with the 
2.6.25.4-cpuisol2 and syspart (syspart is a set of scripts for setting up 
system partitions). I'll release both either later today or early next week.

So I think you're underestimating the power of Linux and CPU isolation ;-).

> I personally feel that a single easy method of completely 
> isolating a single processor from the rest of the machine _might_ 
> benefit the RT community more than all this fancy stuff coming down the 
> pipe. Something like your original proposed isolcpus or even a simple 
> SCHED_ISOLATE arg to the setschedular call.

Yes it may seem that way. But as I explained in the previous email. In order 
to actually implement something like that we'd need to do reimplement parts of 
the cpusets and cpu hotplug. I'm not sure if you noticed or not but my 
original patch actually relied on the cpu hotplug anyway. Just because it 
makes no sense not to awesome powers of hotplug that can migrate _everything_ 
running on one cpu to an other cpu.
And cpuset.sched_load_balance flag provides equivalent functionality for 
controlling scheduler domains and load balancer.
Other stuff like workqueue have to be dealt with in either case. So what I'm 
getting at is that you get equivalent functionality.

Max






      reply	other threads:[~2008-06-06 22:28 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02  2:30 Inquiry: Should we remove "isolcpus= kernel boot option? (may have realtime uses) Paul Jackson
2008-06-02 16:42 ` Dimitri Sivanich
2008-06-02 18:39   ` Max Krasnyansky
2008-06-02 21:41     ` Dimitri Sivanich
2008-06-02 21:59       ` Max Krasnyansky
2008-06-03 14:40         ` Dimitri Sivanich
2008-06-03 17:57           ` Max Krasnyanskiy
2008-06-04 14:00           ` Dimitri Sivanich
2008-06-04 18:07             ` Stop machine threads are getting preemted by the rt period enforcement Max Krasnyansky
2008-06-04 18:18               ` Peter Zijlstra
2008-06-04 18:24                 ` Max Krasnyansky
2008-06-04 18:55                   ` Peter Zijlstra
2008-06-04 20:14                     ` Max Krasnyansky
2008-06-02 22:35 ` Inquiry: Should we remove "isolcpus= kernel boot option? (may have realtime uses) Ingo Oeser
2008-06-02 22:45   ` Peter Zijlstra
2008-06-02 23:04     ` Max Krasnyansky
2008-06-02 23:55       ` Ingo Oeser
2008-06-03  3:32         ` Max Krasnyansky
2008-06-03 23:47           ` Max Krasnyanskiy
2008-06-04  0:41             ` Paul Jackson
2008-06-04  4:32               ` Max Krasnyansky
2008-06-04  4:47                 ` Paul Jackson
2008-06-04 12:18                 ` Andi Kleen
2008-06-04 17:41                   ` Paul Jackson
2008-06-04 18:29                     ` Max Krasnyansky
2008-06-04 18:56                       ` Peter Zijlstra
2008-06-04 19:34                         ` Max Krasnyansky
2008-06-04 18:58                       ` Paul Jackson
2008-06-04 19:31                         ` Max Krasnyansky
2008-06-04 19:37                           ` Paul Jackson
2008-06-04 19:45                             ` Max Krasnyansky
2008-06-04 20:05                       ` Andi Kleen
2008-06-04 20:23                         ` Paul Jackson
2008-06-04 20:03                     ` Andi Kleen
2008-06-04 20:16                       ` Paul Jackson
2008-06-04 20:33                         ` Andi Kleen
2008-06-04 20:38                           ` Paul Jackson
2008-06-04 21:16                             ` Max Krasnyansky
2008-06-04 21:17                               ` Paul Jackson
2008-06-04 21:20                                 ` Max Krasnyansky
2008-06-04 21:26                                   ` Paul Jackson
2008-06-04  1:18             ` Nick Piggin
2008-06-04  3:00               ` Max Krasnyansky
2008-06-04 16:18             ` Ingo Oeser
2008-06-04 17:47               ` Max Krasnyansky
2008-06-03  6:03     ` Nick Piggin
2008-06-04  9:58       ` Mark Hounschell
2008-06-04 17:26         ` Paul Jackson
2008-06-04 21:00           ` Mark Hounschell
2008-06-04 21:03             ` Paul Jackson
2008-06-04 19:26         ` Max Krasnyansky
2008-06-04 20:25           ` Peter Zijlstra
2008-06-04 21:44             ` Michael Trimarchi
2008-06-04 21:52               ` Peter Zijlstra
2008-06-05 11:16                 ` Michael Trimarchi
2008-06-05 12:07                   ` Peter Zijlstra
2008-06-05 14:57                     ` Michael Trimarchi
2009-05-08  2:48               ` GeunSik Lim
2008-06-05 11:44             ` Mark Hounschell
2008-06-06 22:28               ` Max Krasnyanskiy [this message]

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=4849B9FA.3090403@qualcomm.com \
    --to=maxk@qualcomm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=colpatch@us.ibm.com \
    --cc=devik@cdi.cz \
    --cc=deweerdt@free.fr \
    --cc=dfults@sgi.com \
    --cc=dino@in.ibm.com \
    --cc=dmarkh@cfl.rr.com \
    --cc=emmanuel.pacaud@univ-poitiers.fr \
    --cc=ioe-lkml@rameria.de \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=oleg@tv-sign.ru \
    --cc=paulmck@us.ibm.com \
    --cc=pj@sgi.com \
    --cc=rddunlap@osdl.org \
    --cc=rostedt@goodmis.org \
    --cc=sivanich@sgi.com \
    --cc=suresh.b.siddha@intel.com \
    --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