L4linux: cpu and core [comprehension question]

Adam Lackorzynski adam at os.inf.tu-dresden.de
Thu Apr 24 23:40:57 CEST 2014


On Thu Apr 24, 2014 at 16:47:59 +0900, Irvanda Kurniadi wrote:
> I am a little bit confused about the term of cpu and core in l4linux. I
> have a system with 8 processor intel xeon E5606 with 4 cores in each cpu.

According to the Internet, an E5606 is a quadcore CPU without
hyperthreading. Do you mean that you have an 8 socket system and thus 32

> I'm going to maximize it to become the maximum number of cores in all cpus.
> But I am confused in determining the l4x_cpus that what is the term cpu in
> here? Is it literally cpu or the number of threads that can be handled in
> each core?

l4x_cpus describes how many virtual CPU (L4) threads L4Linux shall
create. This is purely software and has no relation to Hyperthreads or

> I run an openmp hello world apps over l4linux. I call the
> omp_get_thread_num() and I got 4 threads in the result. Are these 4 threads

So you L4Linux is running with 4 vCPUs? (See /proc/cpuinfo for example.)

> obtained from 4 cores in single cpu? So, if I'm right, how can I optimize
> to use all of the cpu existed in the system? I've tried to use l4x_cpus=8
> and l4x_cpus=32, but those commands doesn't work for me. In my opinion, if

Doesn't work means it does not get larger than 4? Your L4Linux
configuration also needs to support as many CPUs.

> I can maximize until the maximum number of cores and I have 32 threads that
> run concurrently, then it will be served by each core in those 8 cpus.

Yes, that should work this way.

> In fiasco configuration, there is maximal supported number of CPUs. So
> referring to my case, the maximum is supposed to be 8, am I right? In case

I'm not sure. The number should be
nr_sockets * nr_cores * nr_hyperthreads.

> of thread migration in example ex_thread_migrate, I create 16 threads and
> will be migrated to each cpu. Here is the result:
> migrate | Migrated Thread00 -> CPU02
> migrate | Migrated Thread01 -> CPU03
> migrate | Migrated Thread02 -> CPU04
> migrate | Migrated Thread03 -> CPU05
> migrate | Migrated Thread04 -> CPU06
> migrate | Migrated Thread05 -> CPU07
> migrate | Migrated Thread06 -> CPU00
> migrate | Migrated Thread07 -> CPU01
> migrate | Migrated Thread08 -> CPU02
> migrate | Migrated Thread09 -> CPU03
> migrate | Migrated Thread10 -> CPU04
> migrate | Migrated Thread11 -> CPU05
> migrate | Migrated Thread12 -> CPU06
> migrate | Migrated Thread13 -> CPU07
> migrate | Migrated Thread14 -> CPU00
> migrate | Migrated Thread15 -> CPU01
> My question is do the thread00 and thread08 share the same core in CPU02 or
> they use different core in CPU02 which run concurrently? And also, is it

CPU here means a hyperthread (assuming there is just one hyperthread per
core, it also means a core).

> normal to get the output like cpu[1] to cpu[7] goes to idle loop?

Yes, it's an informational message by the kernel.

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

More information about the l4-hackers mailing list