NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PR/57240 CVS commit: src/sys/kern



The following reply was made to PR kern/57240; it has been noted by GNATS.

From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/57240 CVS commit: src/sys/kern
Date: Thu, 23 Feb 2023 14:57:29 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Thu Feb 23 14:57:29 UTC 2023
 
 Modified Files:
 	src/sys/kern: kern_lock.c kern_mutex.c
 
 Log Message:
 KERNEL_LOCK(9): Minor tweaks to ci->ci_biglock_wanted access.
 
 1. Use atomic_load_relaxed to read ci->ci_biglock_wanted from another
    CPU, for clarity and to avoid the appearance of data races in thread
    sanitizers.  (Reading ci->ci_biglock_wanted on the local CPU need
    not be atomic because no other CPU can be writing to it.)
 
 2. Use atomic_store_relaxed to update ci->ci_biglock_wanted when we
    start to spin, to avoid the appearance of data races.
 
 3. Add comments to explain what's going on and cross-reference the
    specific matching membars in mutex_vector_enter.
 
 related to PR kern/57240
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.182 -r1.183 src/sys/kern/kern_lock.c
 cvs rdiff -u -r1.102 -r1.103 src/sys/kern/kern_mutex.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index