HomeFreeBSD

amd64: clean up cpu_switch.S

Description

amd64: clean up cpu_switch.S

  • LK macro (conditional on SMP for the lock prefix) is unused
  • SETLK unnecessarily performs xchg. obtained value is never used and the implicit lock prefix adds avoidable cost. Barrier provided by it does not appear to be of any use.
  • the lock waited for is almost never blocked, yet the loop starts with a pause. Move it out of the common case.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19563

Details

Provenance
mjgAuthored on
Reviewer
kib
Differential Revision
D19563: amd64: clean up cpu_switch.S
Parents
rS351576: vm: only lock tmpfs vnode shared in vm_object_deallocate
Branches
Unknown
Tags
Unknown