OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-256-gb1082ff

Gerrit Code Review gerrit@openafs.org
Tue, 15 Jul 2025 21:25:58 -0400


The following commit has been merged in the master branch:
commit b1082ff53ea7d8d2a7c07cbef0b35b1687537c96
Author: Mark Vitale <mvitale@sinenomine.net>
Date:   Mon Jul 26 01:24:59 2021 -0400

    afs: Assert harder in kernel lock functions
    
    Even if AFS_GLOCK is held, there are still Bad Things that may happen if
    someone errs in obtaining or releasing a lock.  Protect against some of
    them by asserting (when possible) that the lock is in the expected
    state, that we actually own a lock we want to release or modify, and
    that the readers_reading count can never go negative.
    
    This commit does incur a measurable but insignificant performance hit,
    together with:
    
    - Change Ifb057ee76be3364958ab45543b6b63ac3a548571 (afs:
      AFS_ASSERT_GLOCK earlier in kernel lock functions)
    - Change If97a29182d477dcc1fb7ae62a11e9bcec250e92e (afs: Convert lock
      macros to functions)
    
    With these three commits, a simple synthetic benchmark running 10^9
    uncontested lock/unlock calls slows down from approximately:
    
    - 3.4s to 3.9s on Linux
    - 3.7s to 13.8s on Solaris
    
    And performance of actual client usage hasn't shown any measurable
    impact. This should be an acceptable tradeoff for the benefits of safety
    and maintainability.
    
    Change-Id: I022be7a50034cd333331b88cc0c0bac78981bb01
    Reviewed-on: https://gerrit.openafs.org/14719
    Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>

 src/afs/lock.h   | 14 ++++++++++++++
 src/rx/rx_rdwr.c |  1 +
 2 files changed, 15 insertions(+)

-- 
OpenAFS Master Repository