[coyotos-dev] IPC Redesign

Jonathan S. Shapiro shap at eros-os.com
Tue May 22 13:59:51 EDT 2007


On Tue, 2007-05-22 at 10:30 -0700, Charles Landau wrote:
> At 9:38 AM -0400 5/22/07, Jonathan S. Shapiro wrote:
> >We are going to revert to a design in which every transfer involves
> >
> >       exactly 4 capabilities   IN/OUT
> >       a control word           IN/OUT
> 
> Is the "control word" transmitted to the recipient like a data word 
> (opcode), or is it consumed by the kernel?

A subset of the input bits are transmitted to the receiver. In fact, we
have already moved it to data word 0.

> 
> >       protected payload        OUT
> >       endpoint ID              IN/OUT
> >    ** up to N data words       IN/OUT
> >       An indirect data string, IN/OUT
> >        possibly of length 0
> >
> >The engineering question is: what should N be?
> >
> >In EROS, N was 3.
> 
> In EROS, N was 4 if you include the opcode as a data word.

Yes. Thank you.

> If you are passing "up to" N words, don't you need another word to 
> specify how many words to pass? Or are you packing this into some 
> other word somewhere (the control word)?

It is stored in the control word.

> I'm approaching this issue from the standpoint of compatibility with 
> CapROS. It would be a pity if programs written for one system were 
> difficult to port to the other because they use features that are not 
> available on the other system.

This is the job of CapIDL.

> In CapROS, entry and exit are specified in a single operation such as 
> CALL. I figure it takes 16 registers to specify all the in and out 
> parameters where N=8. The ARM architecture has only 13 or 14 
> registers available.

You are assuming that all parameters need to go into registers. This is
not correct. Only the OUT parameters need to go in registers.

> More generally, if you make N larger than necessary, you'll be saving 
> and restoring more registers (or testing N to see how many to save), 
> which will hurt performance. So I'd vote for making N no larger than 
> necessary.

Agreed, but if we make N too small we will be using indirect strings
frequently, which is extremely expensive. The EROS value was
demonstrably too small.

shap



More information about the coyotos-dev mailing list