* running only 1 process on 1 cpu
@ 2006-05-16 19:31 fritzsch
2006-05-16 19:49 ` Jesper Juhl
2006-05-17 7:45 ` Andreas Mohr
0 siblings, 2 replies; 3+ messages in thread
From: fritzsch @ 2006-05-16 19:31 UTC (permalink / raw)
To: linux-kernel
Hallo,
i have one process, which i want to run on a cpu (> CPU0). The special
thing here is, that this process is very time critical and should NOT
be interrupted by anything (cpusets/cpus_allowed would not be enough).
(the process is not doing any system calls and is communicating to the
world by shared memory).
so i wanted to run the process on a CPU1, when all irqs are disabled and
so the process could not be interrupted.
I tried very simple to
(1) migrate all processes to CPU0 by cpu_set_allowed
(2) gave my process (running on CPU1) the highest priority
(3) run schedule and make sure that the irqs are disables
(disable_irqs())
...
but well, it didnt work ...
actually i wanted to ask if this could work and if there is maybe sth
like this already somewhere implemented (or easily adaptable).
thx
patrick
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: running only 1 process on 1 cpu
2006-05-16 19:31 running only 1 process on 1 cpu fritzsch
@ 2006-05-16 19:49 ` Jesper Juhl
2006-05-17 7:45 ` Andreas Mohr
1 sibling, 0 replies; 3+ messages in thread
From: Jesper Juhl @ 2006-05-16 19:49 UTC (permalink / raw)
To: fritzsch; +Cc: linux-kernel
On 16/05/06, fritzsch <fritzsch@cip.physik.uni-muenchen.de> wrote:
> Hallo,
> i have one process, which i want to run on a cpu (> CPU0). The special
> thing here is, that this process is very time critical and should NOT
> be interrupted by anything (cpusets/cpus_allowed would not be enough).
> (the process is not doing any system calls and is communicating to the
> world by shared memory).
> so i wanted to run the process on a CPU1, when all irqs are disabled and
> so the process could not be interrupted.
>
>
> I tried very simple to
>
> (1) migrate all processes to CPU0 by cpu_set_allowed
> (2) gave my process (running on CPU1) the highest priority
> (3) run schedule and make sure that the irqs are disables
> (disable_irqs())
> ...
>
Some ideas :
- Play with CPU affinity : "man sched_setaffinity" / "man sched_getaffinity" [1]
- Try a RealTime patched kernel (Ingo's -rt patchset) and set the
processes nice level to least nice & RT priority to the max [2]
- Implement the code as a kernel module if it really is that time critical
[1] http://www.linuxjournal.com/article/6799
[2] http://www.captain.at/howto-linux-real-time-patch.php
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: running only 1 process on 1 cpu
2006-05-16 19:31 running only 1 process on 1 cpu fritzsch
2006-05-16 19:49 ` Jesper Juhl
@ 2006-05-17 7:45 ` Andreas Mohr
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Mohr @ 2006-05-17 7:45 UTC (permalink / raw)
To: fritzsch; +Cc: linux-kernel
Hi,
On Tue, May 16, 2006 at 09:31:42PM +0200, fritzsch wrote:
> actually i wanted to ask if this could work and if there is maybe sth
> like this already somewhere implemented (or easily adaptable).
Implementing exactly this feature (a whole cpu dedicated to one process only
for extremely ambitious rt tasks) has been mentioned shortly during some
scheduler discussion here at most 4 weeks ago, but I don't recall the exact
thread.
Some Google keywords that might help:
lkml cpu exclusive scheduler rt latency reserve
Andreas Mohr
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-17 7:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-16 19:31 running only 1 process on 1 cpu fritzsch
2006-05-16 19:49 ` Jesper Juhl
2006-05-17 7:45 ` Andreas Mohr
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®