inter-process inlining
Ulf Wiger
etxuwig@REDACTED
Thu Dec 5 17:04:36 CET 2002
On Thu, 5 Dec 2002, Sven-Olof Nystr|m wrote:
>Ulf Wiger writes:
> > The most appropriate would perhaps be to schedule the server
> > immediately (see above). Doing it this way would also ensure
> > that the stack chain on the server reflects the situation
> > appropriately.
>
>I don't think that's necessary. Consider the scenario: The
>client wants to send a message to the server. Due to
>profiling and optimization the client instead starts
>running inlined code from the server. Now, the server code
>throws an exception. Since exceptions should be rare, we do
>not want to invest much effort into handling this
>situation. Instead, the client discards any intermediate
>results it may have computed while running server code,
>inserts the message into the server's mailbox, and
>continues running its own code. As far as I can see the
>situation is indistinguishable from what we would have in
>unoptimized code:
True, apart from the fact (which may be of mere
philosophical value) that the exception that occured during
evaluation of the inlined code (which probably is a real
error that we'd like to fix) may not appear at all when the
operation is "re-scheduled". Essentially, we may have a
timing bug that gets a second chance of slipping through
our fingers.
I'm not sure I'd like that issue to stand in the way of a
perfectly good optimization. ;)
/Uffe
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
More information about the erlang-questions
mailing list