[parisc-linux] ldcw in __pthread_acquire
Stan Sieler
sieler@allegro.com
Sun, 17 Dec 2000 16:48:52 -0800 (PST)
Hi Alan,
As Lamont Jones agreed, lightweight system calls exist, and their
cost is on the order of a couple of instructions (typically the equivalent
of a missed branch prediction). HP-UX has some, Lamont speaks from experience
(as do I).
> > The apparent advantages are *strictly* short term. A single mistake
> > using a buzz lock from user code in a single process on a single computer
> > can cost more time than all properly implemented buzz locks ever save.
>
> The cost of a syscall against a rarely contended lock is huge. So you
Thus, it is *NOT* true that a syscall cost must be "huge".
You can say: I don't want to change it, or "we've always done it that way".
but, the one thing you can't accurately say is "this is the right way".
Been there, learned that, tried to share it with you, and am now
giving up on it.
--
Stan (still right :) Sieler