How to make task run on different cores?

Adam Lackorzynski adam at os.inf.tu-dresden.de
Wed Jun 12 22:45:48 CEST 2013


Hi,

On Wed Jun 12, 2013 at 20:15:18 +0800, Chao-Jui Chang wrote:
> Hi Adam,
> I have added the scheduler option to the l4linux config like this:
> 
> > loader:start(
> >   { caps = {
> >       log = L4.Env.log:m("rws"),
> >       fb  = mag_svc:create(L4.Proto.Goos, "g=640x480");
> > --      vbus = vbus_l4linux;
> >       shmns = shmns12:mode("rw");
> >     },
> >     l4re_dbg = L4.Dbg.Warn,
> >     log = { "l4linux", "white" },
> >     scheduler = L4.Env.user_factory:create(L4.Proto.Scheduler, 0x18, 0x8,
> > 0x2),
> >   },
> >   "rom/" .. lxname .. " mem=64M console=tty0 l4x_rd=rom/ramdisk-" ..
> >  L4.Info.arch() .. ".rd root=1:0 ramdisk_size=4000
> > l4shmnet.add=shmns,macpart=2 ip=192.168.12.2:::255.255.255.0::eth0:");
> 
> 
> There are 4 L4Linux in this config file with last parameter is 0x1, 0x2,
> 0x4, 0x8.
> However, the experiment result still shows that they use only one core.
> Is there anything wrong with my config?

This looks ok, and it also works in my own setting. When you check with
lp in jdb, the cpu column has all 0 or other numbers (except the kernel
thread on each CPU)?

> 2013/6/12 Chao-Jui Chang <ppc52776 at gmail.com>
> 
> >
> > For core placement, add
> >> scheduler = L4.Env.user_factory:create(L4.Proto.Scheduler, 0x18, 0x8,
> >> cpumask),
> >> to the environment of L4Linux start call (also have a look at
> >> l4/conf/examples/x86-fb.cfg). E.g. to place on core 2 make cpumask a 4,
> >> and so on.
> >>
> >> Thanks for providing the information.
> > Is there any document about the parameter of the L4.Proto.Scheduler ?
> > What 0x18, 0x08 mean for Scheduler?

Those describe the allowed priority range, 0x18 is the upper prio and
0x8 the base prio.



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