From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Max Krasnyansky <maxk@qualcomm.com>
Cc: Mark Hounschell <dmarkh@cfl.rr.com>,
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: Wed, 04 Jun 2008 22:25:47 +0200 [thread overview]
Message-ID: <1212611148.19205.22.camel@lappy.programming.kicks-ass.net> (raw)
In-Reply-To: <4846EC77.1020900@qualcomm.com>
On Wed, 2008-06-04 at 12:26 -0700, Max Krasnyansky wrote:
> Mark Hounschell wrote:
> > IMHO,
> >
> > What is an abonination, is that cpusets are equired for this type of
> > isolation to begin with, even on a 2 processor machine.
> >
> > I would like the option to stay and be extended like Max originally
> > proposed. If cpusets/hotplug are configured isolation would be obtained
> > using them. If not then isolcpus could be used to get the same isolation.
> >
> > From a user land point of view, I just want an easy way to fully isolate
> > a particular cpu. Even a new syscall or extension to sched_setaffinity
> > would make me happy. Cpusets and hotplug don't.
> >
> > Again this is just MHO.
>
> Mark, I used to be the same way and I'm a convert now. It does seems like an
> overkill for 2cpu machine to have cpusets and cpu hotplug. But both options
> cost around 50KB worth of text and maybe another 10KB of data. That's on the
> x86-64 box. Let's say it's a 100KB. Not a terribly huge overhead.
>
> Now if you think about it. In order to be able to dynamically isolate a cpu we
> have to do exact same thing that CPU hotplug does. Which is to clear all
> timers, kernel, threads, etc from that CPUs. It does not make sense to
> implement a separate logic for that. You could argue that you do not need
> dynamic isolation but it's too inflexible in general even on 2way machines
> it's waste to not be able to use second cpu for general load even when RT app
> is not running. Given that CPU hotplug is necessary for many things, including
> suspend on multi-cpu machines it's practically guaranteed to be very stable
> and well supported. In other words we have a perfect synergy here :).
>
> Now, about the cpusets. You do not really have to do anything fancy with them.
> If all you want to do is to disable systemwide load balancing
> mount -tcgroup -o cpuset cpuset /dev/cpuset
> echo 0 > /dev/cpuset/cpuset.sched_load_banace
>
> That's it. You get _exactly_ the same effect as with isolcpus=. And you can
> change that dynamically, and when you switch to quad- and eight- core machines
> then you'll be to do that with groups of cpus, not just system wide.
>
> Just to complete the example above. Lets say you want to isolate cpu2
> (assuming that cpusets are already mounted).
>
> # Bring cpu2 offline
> echo 0 > /sys/devices/system/cpu/cpu2/online
>
> # Disable system wide load balancing
> echo 0 > /dev/cpuset/cpuset.sched_load_banace
>
> # Bring cpu2 online
> echo 1 > /sys/devices/system/cpu/cpu2/online
>
> Now if you want to un-isolate cpu2 you do
>
> # Disable system wide load balancing
> echo 1 > /dev/cpuset/cpuset.sched_load_banace
>
> Of course this is not a complete isolation. There are also irqs (see my
> "default irq affinity" patch), workqueues and the stop machine. I'm working on
> those too and will release .25 base cpuisol tree when I'm done.
Furthermore, cpusets allow for isolated but load-balanced RT domains. We
now have a reasonably strong RT balancer, and I'm looking at
implementing a full partitioned EDF scheduler somewhere in the future.
This could never be done using isolcpus.
next prev parent reply other threads:[~2008-06-04 20:26 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-02 2:30 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 [this message]
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
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=1212611148.19205.22.camel@lappy.programming.kicks-ass.net \
--to=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=maxk@qualcomm.com \
--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
Powered by JetHome