]> CyberLeo.Net >> Repos - FreeBSD/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, 4 Mar 2022 16:32:14 +0000 (11:32 -0500)
commit543157870da529e06c6cd6bfe8672b527b0c2067
tree9078033ff689426f39b8c1e680b70cf967e18beb
parent69b2217cde24b3691f4cea14682baa75f48225ea
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
Sponsored by: The FreeBSD Foundation

(cherry picked from commit c84bb8cd771ce4bed58152e47a32dda470bef23a)
sys/kern/kern_rmlock.c