Question about function l4_sched_set_cpu_set

Adam Lackorzynski adam at
Tue Jul 15 23:49:12 CEST 2014

On Tue Jul 15, 2014 at 17:18:15 -0400, Yuxin Ren wrote:
> I cannot understand the second and third arguments of this function.
> Could someone tell me how to use those arguments?

I'm sure you mean l4_sched_cpu_set(). Generally, a CPU set describes a
set of CPUs. Using a flat bitmap to describe all CPUs in a system might
make this bitmap quite large. And since most of the time this bitmap is
only sparsely populated it is also not very space efficient. One
alternative to that is to describe the bitmap using an offset, a
granularity and the actual bitmap. The offset describes where 'map'
starts and granularity says how many bits a represented by a single bit
in 'map'. So for example (9, 1, 10) point to CPUs 11, 12, 15 and 16.

Adam                 adam at

More information about the l4-hackers mailing list