Re: running only 1 process on 1 cpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/05/06, fritzsch <[email protected]> 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 <[email protected]>
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux