Source-Changes archive

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

CVS commit: src/sys/kern



Module Name:    src
Committed By:   riastradh
Date:           Fri Feb 24 11:02:27 UTC 2023

Modified Files:
        src/sys/kern: kern_auth.c kern_descrip.c kern_mutex_obj.c kern_rwlock.c
            kern_rwlock_obj.c subr_copy.c subr_ipi.c subr_pcq.c subr_pool.c
            sys_futex.c uipc_mbuf.c vfs_mount.c vfs_vnode.c

Log Message:
kern: Eliminate most __HAVE_ATOMIC_AS_MEMBAR conditionals.

I'm leaving in the conditional around the legacy membar_enters
(store-before-load, store-before-store) in kern_mutex.c and in
kern_lock.c because they may still matter: store-before-load barriers
tend to be the most expensive kind, so eliding them is probably
worthwhile on x86.  (It also may not matter; I just don't care to do
measurements right now, and it's a single valid and potentially
justifiable use case in the whole tree.)

However, membar_release/acquire can be mere instruction barriers on
all TSO platforms including x86, so there's no need to go out of our
way with a bad API to conditionalize them.  If the procedure call
overhead is measurable we just could change them to be macros on x86
that expand into __insn_barrier.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/kern/kern_auth.c
cvs rdiff -u -r1.254 -r1.255 src/sys/kern/kern_descrip.c
cvs rdiff -u -r1.10 -r1.11 src/sys/kern/kern_mutex_obj.c \
    src/sys/kern/subr_ipi.c
cvs rdiff -u -r1.68 -r1.69 src/sys/kern/kern_rwlock.c
cvs rdiff -u -r1.8 -r1.9 src/sys/kern/kern_rwlock_obj.c
cvs rdiff -u -r1.16 -r1.17 src/sys/kern/subr_copy.c
cvs rdiff -u -r1.19 -r1.20 src/sys/kern/subr_pcq.c
cvs rdiff -u -r1.286 -r1.287 src/sys/kern/subr_pool.c
cvs rdiff -u -r1.18 -r1.19 src/sys/kern/sys_futex.c
cvs rdiff -u -r1.247 -r1.248 src/sys/kern/uipc_mbuf.c
cvs rdiff -u -r1.101 -r1.102 src/sys/kern/vfs_mount.c
cvs rdiff -u -r1.148 -r1.149 src/sys/kern/vfs_vnode.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