Module Name:    src
Committed By:   ad
Date:           Sat Nov 23 16:36:39 UTC 2019

Modified Files:
        src/sys/arch/amd64/amd64: lock_stubs.S
        src/sys/arch/i386/i386: lock_stubs.S

Log Message:
For this case during

        rw_enter(lock, RW_READ);

Having instrumented it, it turns out that >99.5% of the time the lock is
completely unknowned.  Make this assumption in the assembly stub for
rw_enter(), and avoid the initial read of the lock word.  Where there are
existing read holds, we'll do an additional CMPXCHG but should already have
the cache line in the EXCLUSIVE state.

To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amd64/amd64/lock_stubs.S
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/i386/i386/lock_stubs.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to