bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RPC user stub libraries (was: error compiling hurd after gnumach int


From: Neal H. Walfield
Subject: Re: RPC user stub libraries (was: error compiling hurd after gnumach interface change)
Date: Mon, 19 Jul 2010 12:43:22 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj┼Ź) APEL/10.7 Emacs/22.3 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Mon, 19 Jul 2010 11:16:03 +0200,
Thomas Schwinge wrote:
>       * Avoid code duplication -- may have been relevant, but is it
>         still?
> 
>         Actually, if I understood correctly, in his Viengoos kernel, Neal
>         is doing all RPC stub code generation in the pre-processor, thus
>         has it as inline code at every call site.  This has one immediate
>         advantage: GCC can optimize it, as there is no function-call
>         boundary.  Should we be doing the same?  Someone should do some
>         measurements.  Neal, any off-hand comments?

That's what I did.  The obvious disadvantage of inlining code is that
you have more code.  That's bad for the CPU caches.  Of course, if you
execute an RPC, you've definately blown your L1 in the asynchronous
case and likely blown your L2 in the synchronous case.  In which case,
the cache issue is likely moot.


I used CPP to generate RPC stubs as I didn't want to write an IDL
(although you could say that I ended up doing exactly that!).  I
encountered two main problems.  The first is that error messages for
incorrectly written prototypes are hard to decipher: the IDL compiler
can't really emit error messages.  Second, marshalling variable length
arrays is a serious pain.  What you'd like are two arguments: the
array and a count, not one as you have for other types (i.e., just the
value).  Making a decision based on a type is hard to do with CPP.

Neal



reply via email to

[Prev in Thread] Current Thread [Next in Thread]