Base capabilities

Stefan Kalkowski stefan.kalkowski at ...1...
Mon Mar 21 12:03:24 CET 2011


Hi Daniel,

that's right we doesn't pass the scheduler capability to any children.
This is an security issue, if you simply pass the kernel's scheduler
capability into each task, they could interfere with a global scheduling
strategy.

To circumvent this, there are two possibilities: One could put a virtual
scheduler object's capability into the designated
'L4_BASE_SCHEDULER_CAP' capability slot of each task. I guess this is
the L4re way of confining the scheduling facilities of tasks.
The more Genode-like way, that Norman already proposed to you, is to
extend the CPU-session interface, e.g. by an additional 'migrate' or
'affinity' method, so that the kernel's scheduler capability further
resides in core, and you can use a kernel-independent interface for
load-balancing on different CPU's or cores.

I would advise you against mapping the scheduler's capability from core
to its children, even when hacking up a prototype or example. It's
probably not easier than extending the cpu-session interface. To use the
scheduler for distributing threads on different cores you need in
addition to the scheduler's capability the capability of each thread you
like to migrate, but these also reside in the 'core' task only.

I've produced a small patch for you, that extends the cpu-session
interface (for the Fiasco.OC platform only) by a 'migrate' function,
which doesn't do any real work - it's just a skeleton.
Of course, we will also provide a kernel independent solution for SMP in
the future, but if you want to get hands on experience with SMP and
Genode/Fiasco.OC now, this might help you as a starting point.

with best regards
Stefan

On 03/19/2011 01:29 AM, Daniel Waddington wrote:
> Hi,
> I'm trying to put in some temporary feature in Genode to set the
> affinity of threads.  In Genode the scheduler capability
> (L4_BASE_SCHEDULER_CAP) doesn't seem to be passed from the core to the
> children.  Is there any obvious way to do this with the existing Genode
> implementation - we can hack up a solution but I wanted to check first.
> 
> Thanks
> Daniel
> 
> 
> 
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> 
> 
> 
> _______________________________________________
> Genode-main mailing list
> Genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main

-- 
Stefan Kalkowski
Genode Labs

http://www.genode-labs.com/ · http://genode.org/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpu-session.patch
Type: text/x-diff
Size: 24734 bytes
Desc: not available
URL: <http://lists.genode.org/pipermail/users/attachments/20110321/aab39e3d/attachment.patch>


More information about the users mailing list