]> xenbits.xensource.com Git - people/royger/freebsd.git/commit
rmlock: Micro-optimize read locking
authorMark Johnston <markj@FreeBSD.org>
Fri, 25 Feb 2022 18:42:51 +0000 (13:42 -0500)
committerMark Johnston <markj@FreeBSD.org>
Fri, 25 Feb 2022 18:55:24 +0000 (13:55 -0500)
commitc84bb8cd771ce4bed58152e47a32dda470bef23a
treebd6df7f782222de9fcd72b699d22272d500a1535
parent1517b8d5a7f58897200497811de1b18809c07d3e
rmlock: Micro-optimize read locking

Use get_pcpu() instead of an open-coded pcpu_find(td->td_oncpu).  This
eliminates some memory accesses and results in a shorter instruction
sequence.  Note that get_pcpu() didn't exist when rmlocks were added.

Reviewed by: jah, mjg
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34377
sys/kern/kern_rmlock.c