Setting physical CPU for a task

Lluís Vilanova vilanova at
Tue Aug 6 22:47:58 CEST 2013

Adam Lackorzynski writes:
>> Still, L4::Scheduler::info says there's as many CPUs as the maximum number
>> configured into Fiasco (not the number offered by QEMU). I'm just not sure if
>> this should be considered a bug or a feature.

> Fiasco does not know what the maximum number of CPUs on that particular
> machine will ever be, so it just says what it can support. Also, one has
> to wait a bit until all CPUs are up because Fiasco does not wait to
> start sigma0+moe until all CPUs are up (e.g. see migrate example).

Sorry, I just realized that what I misunderstood is the output of the migrate
example, not the description of L4::Scheduler::info:

  static l4_umword_t         cpu_map, cpu_nrs;
  static int check_cpus(void)
    l4_sched_cpu_set_t cs = l4_sched_cpu_set(0, 0);

    if (l4_error(L4Re::Env::env()->scheduler()->info(&cpu_nrs, &cs)) < 0)
      return 1;

    cpu_map =;

    printf("Found %ld CPUs.\n", cpu_nrs);

Maybe changing it to "Supports up to %ld CPUs" would be clearer, or instead (or
in addition) calculating the number of detected/online CPUs.


 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom

More information about the l4-hackers mailing list