Nixing __HAVE_ATOMIC_AS_MEMBAR

2023-02-22 Thread Taylor R Campbell
I propose to delete current use of __HAVE_ATOMIC_AS_MEMBAR because it is a bad API, and replace it by one of two options: (a) Add membar_release_preatomic and membar_acquire_postatomic: noop if __HAVE_ATOMIC_AS_MEMBAR, alias for membar_release/acquire otherwise. (Maybe also add

Re: rw_downgrade/tryupgrade semantics

2023-02-22 Thread Jason Thorpe
> On Feb 22, 2023, at 9:40 AM, Taylor R Campbell > wrote: > > I believe this is guaranteed as rwlock(9) is currently implemented. > (Whether it is _intended_ to be guaranteed, I'm not sure.) That guarantee certainly falls in line with the principle of least astonishment. We should

rw_downgrade/tryupgrade semantics

2023-02-22 Thread Taylor R Campbell
Questions about rwlock(9) memory ordering semantics: 1. Is rw_tryupgrade an acquire operation, so that all prior reader critical sections happen-before anything sequenced after it? Or does it only order stores issued by the caller, while loads in the following write section can be

Vmstat -s on -current and -10 shows no local-cpu page allocations under Xen -- is that correct?

2023-02-22 Thread Brian Buhrow
Hello. I'm running a series of machines, both Xen VM machines and machines running on bare metal, and I notice that on my systems running NetBSD-9.99.77, vmstat -s shows that local-cpu page allocations are never available on the xen VM's, see below. Yet, on machines running on bare

Re: Nixing __HAVE_ATOMIC_AS_MEMBAR

2023-02-22 Thread Taylor R Campbell
> Date: Wed, 22 Feb 2023 12:57:24 + > From: Taylor R Campbell > > I propose to delete current use of __HAVE_ATOMIC_AS_MEMBAR because it > is a bad API, and replace it by one of two options: > > (a) Add membar_release_preatomic and membar_acquire_postatomic: noop > if

Re: Nixing __HAVE_ATOMIC_AS_MEMBAR

2023-02-22 Thread Jason Thorpe
> On Feb 22, 2023, at 4:48 PM, Taylor R Campbell > wrote: > > (c) Just make the membars unconditional -- take off the #ifndefs, but >don't add any new functions or change the semantics of existing >ones. That’s my preference. Having ti at all is confusing. -- thorpej