kernel - Improve SPINLOCK, acpi_timer performance under qemu/kvm/VMs
* Improve acpi_timer 24-bit performance by reducing use of clock_lock().
* Integrate a delta test into acpi_cputimer.base and remove the
out-of-band tracking globals. We can query the timer and calculate
the return value for deltas less than 1/16 full-range. Beyond
that range we need to get the clock_lock() to calculate the high
24 bits safely and update acpi_cputimer.base.
On SMP systems, cpu #1 will update acpi_cputimer.base more
frequently, reducing the chance that multiple cpus will need the
clock_lock() at the same time.
* Refactor the safe24 code to make it easier to use.
* Improve the regressive SPINLOCK assembly macro, bringing it up to
modern performance levels. This fixes unnecessary cache ping-ponging
during contention.
Suggested-by: mjg_