[omniORB] [PATCH] "Safe" shortcut calls

Nathaniel Smith njs@uclink4.berkeley.edu
Tue, 7 May 2002 20:09:25 -0700


The quick summary is: omniORB4 has these nifty new "shortcut" calls
that in the colocated case let you trade off some strict CORBA
compliance for speed.  One of the things they eliminate
is safety with respect to deactivation (so invokers can race with
deactivaters, unless the application has some mechanism to prevent
this).  "Safe" shortcuts lose a bit of the speed advantage of the
current shortcut mechanism (they're only 10x as fast as a normal
colocated call ;-)), but are, I hope, threadsafe with respect to
deactivation.

This is actually a patch that I sent to Duncan a bit over a month ago,
just a few days before we learned about the closing of the labs --
so, of course, he's had plenty of things on his mind besides reviewing
my patch :-).  I'm sending it out again to the list, because perhaps
other people would like to test it -- this kind of code can be a bit
hairy, and what's the point of moving to a more open-source model if
you can't get other people to run your possibly buggy code for you? ;-)
If anyone actually wants to read through the code and look for bugs
(that, alas, being the only real way to verify that code dealing with
concurrency is really Correct), then you're really an angel.  If you
just want to see if your application benefits from the speed increase,
and at the same time notice that it compiles on Windows, that's pretty
cool too :-).

So, attached is a patch to (yesterday's) CVS, plus the original
message I sent with all the gory implementation details, API details,
benchmarks, etc.

Duncan: I know you have a lot on your mind, so no hurry, but any hints
on what I should be expecting?  Have you had a chance to look at this
at all?  Love it?  Hate it?  Like the idea, but want parts rewritten?
This patch is identical to the one I sent before, except that it's
against the current CVS (I merged all the recent little changes into
my source tree, then rebuilt the patch).  I've checked that it still
compiles with gcc 2.95.4 and 3.0 on x86 Linux, with and without thread
tracing, and can handle running Berlin as expected in all those
configurations.

Cheers,
-- Nathaniel

-- 
"Lull'd in the countless chambers of the brain,
Our thoughts are link'd by many a hidden chain:
Awake but one, and lo! what myriads rise!
Each stamps its image as the other flies"
  -- Ann Ward Radcliffe, The Mysteries of Udolpho

This email may be read aloud.