SMP

Adam Lackorzynski adam at os.inf.tu-dresden.de
Tue Nov 11 23:07:49 CET 2014


On Tue Nov 11, 2014 at 13:05:50 -0500, teclis High Elf wrote:
> How does the fiasco L4Re do SMP?

Broad question. Maybe a simple answer is ok: It does it. :)

> Are there commands for CPU affinity?

There are. Fiasco does not migrate threads around itself, so CPU
affinity is the default.
Wth L4::Scheduler::run_thread() / l4_scheduler_run_thread() threads can
be migrated.

> How can I assign a specific process to a CPU?

By using run_thread(). In the start script one can add a line such as
  scheduler = L4.Env.user_factory:create(L4.Proto.Scheduler, 0xa0, 0x80, 0x6),

The 0xa0 and 0x80 are the max and base prio, as usual.
The last param is a cpumask which describes the CPUs the started program
can access. So 6 means second and third CPU. If nothing is explicitly
done wrt migration, all threads of that program and any other possibly
spawned tasks by this program will run on the second CPU. They will not
have access to other CPUs except those two.

Check l4/conf/example for how to integrate that line.



Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/




More information about the l4-hackers mailing list