Re: How to make task run on different cores?

Adam Lackorzynski <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
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 <[email protected]>
> 
> >
> > 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                 [email protected]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.