All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Krasnyansky <maxk@domain.hid>
To: Paolo Mantegazza <mantegazza@domain.hid>
Cc: Fillod Stephane <stephane.fillod@domain.hid>,
	Wolfgang Grandegger <wolfgang.grandegger@domain.hid>,
	rtai@domain.hid, adeos-main@gna.org
Subject: Re: [Adeos-main] Re: Interrupt Latency Question
Date: Tue, 19 Apr 2005 11:35:42 -0700	[thread overview]
Message-ID: <42654F7E.5090209@domain.hid> (raw)
In-Reply-To: <425EA538.5000306@domain.hid>

Hi Paolo,

> If you have a multicpus machine and can reserve CPUs to real time only,
> than the picture will change a lot. No Linux activity on them, just your
> real time programs and irq handlers, likely stuck and fully cached to 
> those CPUs.
> 
> This is the solution you'll see native in Linux soon. With true lowcost 
> multicpus on a single chip massively available within a short time at 
> the kids' game and mama's word processors store it will change the whole 
> picture.

Actually this is kind of available right now with vanilla 2.6 kernel.
I'm talking about CPU reservation. Here is an example.
Let's say we have dual CPU box and we want to dedicate CPU 1 to
our application:
- Configure the kernel with following boot options:
	isolcpus=1 acpi_irq_nobalance noirqbalance

   This excludes CPU 1 from the scheduler balancing logic. And disables
   ACPI and SW irq balancing.
   Make sure that you don't run user-space IRQ balancer.

- Redirect all interrupts to CPU 0
   for i in /proc/irq/*; do
	echo 1 > $i/smp_affinity;
   done

- Your app call now migrate to CPU 1
   int cpu = 1;
   uint32_t mask = (1 << cpu);
   sched_setaffinity(0, sizeof(mask), (cpu_set_t *) &mask);

That's it. CPU 1 is yours. There will be almost zero activity on it, besides
your task of course.

Max


  reply	other threads:[~2005-04-19 18:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-14 14:55 [Adeos-main] RE: Interrupt Latency Question Fillod Stephane
2005-04-14 15:47 ` Philippe Gerum
2005-04-14 20:20   ` Michael Neuhauser
2005-04-14 17:15 ` [Adeos-main] " Paolo Mantegazza
2005-04-19 18:35   ` Max Krasnyansky [this message]
2005-04-20  8:06     ` Paolo Mantegazza
2005-04-20 18:10       ` Max Krasnyansky
2005-04-17  9:32 ` Wolfgang Grandegger
2005-05-03  7:12   ` Der Herr Hofrat
2005-05-03 16:11     ` Wolfgang Grandegger

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=42654F7E.5090209@domain.hid \
    --to=maxk@domain.hid \
    --cc=adeos-main@gna.org \
    --cc=mantegazza@domain.hid \
    --cc=rtai@domain.hid \
    --cc=stephane.fillod@domain.hid \
    --cc=wolfgang.grandegger@domain.hid \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.