Re: Atomic instructions
> Not at first glance. The reason I ask is the SableVM Java VM. The only
> requirement it makes of an architecture is that it can implement the
> "compare_and_swap" routine. Unfortunately this is implemented as a single
> function, so it would seem necessary to lock the whole VM while performing
> the op, which is probably going to kill performance.
what do you mean "as a single function"? i don't think the performance
impact will be as great as you seem to be suggesting.
you may have noticed that the kernel uses a lock hash for this purpose.
this may help lessen lock contention if you are doing a lot of
compare-and-swap ops on different addresses.
fwiw we've ported a number of applications to hppa where we've had to
use this multi-op compare_and_swap. while i've not done any serious
benchmarking, things seem to work ok in general....
randolph
Reply to: