Ross Johnson wrote:
On Fri, 2006-04-21 at 18:22 +0200, Jens-Heiner Rechtien wrote:
I can't see what we could do about the costs of the "lock" instruction
on x86. I mean, if we need an atomic increment/decrement for our
reference counter we can't work with non-atomic instructions here,
especially now when multi-processor/multi-core PCs are entering the
mainstream.
There are still a lot of people using older x86 machines.
Can't you check the system processor mask on startup and have your
inlined asm conditionally run locked or non-locked instructions
accordingly. The overhead of the test is still much much less than the
lock overhead on uni-processor systems.
That's a possible solution which we should keep in mind if we change the
implementation. We would still need some performance measurements
regarding the overhead for the additional test.
Heiner
--
Jens-Heiner Rechtien
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]