|
Description
|
The lockstat metric "spin" represents the number of times a thread
attempts to acquire an adaptive mutex before successful, and is a
measure of lock contention. However, it is a crude metric, because
some trips through the busy-wait loop may be fast, and some slow.
Further, with exponential backoff before retry, a linear increase in
spin represents an exponential increase in busy-wait time.
The spin metric should be replaced with a direct measurement of
the time spent busy-waiting to acquire a mutex, using high resolution
time. This provides an accurate measure of mutex contention that
will be very useful to performance analysts; in particular, it
allows us to see how much %sys time is due to mutex contention.
Change the "spin" column in the lockstat output to "nsec" and show
the avg busy-wait time there. This change will make lockstat
consistent with the newer plockstat command, which already displays
busy-wait time in nsecs.
|