<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/sys/arch/hppa/include/lock.h, branch jd/queueboosts</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/sys/arch/hppa/include/lock.h?h=jd%2Fqueueboosts</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/sys/arch/hppa/include/lock.h?h=jd%2Fqueueboosts'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2015-02-11T00:14:11Z</updated>
<entry>
<title>make the rwlock implementation MI.</title>
<updated>2015-02-11T00:14:11Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2015-02-11T00:14:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=c7ee61963c3a9af7911e1d06422068d4e15ba0c0'/>
<id>urn:sha1:c7ee61963c3a9af7911e1d06422068d4e15ba0c0</id>
<content type='text'>
each arch used to have to provide an rw_cas operation, but now we
have the rwlock code build its own version. on smp machines it uses
atomic_cas_ulong. on uniproc machines it avoids interlocked
instructions by using straight loads and stores. this is safe because
rwlocks are only used from process context and processes are currently
not preemptible in our kernel. so alpha/ppc/etc might get a benefit.

ok miod@ kettenis@ deraadt@
</content>
</entry>
<entry>
<title>implement atomic_{cas,swap}_{uint,ulong,ptr} and</title>
<updated>2014-09-22T12:12:23Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2014-09-22T12:12:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8bf031b6c9d14bce74cd445f935fd079a0ae10a6'/>
<id>urn:sha1:8bf031b6c9d14bce74cd445f935fd079a0ae10a6</id>
<content type='text'>
atomic_{add,sub}_{int,long}_nv. sys/atomic.h turns these into the
rest of the atomic api.

on uniprocessor hppa systems "atomic" operations are implemented
as a non-interruptable sequence by disabling all interrupts on the
cpu, doing the operation, and then restoring the interrupt mask.

this isnt enough on MP systems, so we added a global atomic memory
mutex that is taken inside the interrupt disabling above to coordinate
operations between cpus.

this is a lot of overhead though cos mutexes dance around with ipls,
which is unecessary in our case because of the interrupt disabling
that is already done. also, hppa spinlocks are implemented with
ldcw which requires the word it operates on to be 16 byte aligned.
mutexes arent guaranteed to have this alignment so they compensate
by having lots of words inside themselves so they can hit the
appropriate one to use for the ldcw op.

with this in mind, this change pulls __cpu_simple_locks, which are
simply ldcw spinlocks with a 16 byte aligned word, out of
src/sys/arch/hppa/include/lock.h into src/sys/arch/hppa/include/atomic.h
so atomic.h can use them. lock.h includes atomic.h, so it still
gets and provides the same functionality as before.

finally, this also pulls the rwlock cas implementation apart. cas
ops now share the same serialising lock on MP systems as the other
memory operations, and rw_cas is defined as a wrapper around
atomic_cas_uint.

ok kettenis@
</content>
</entry>
<entry>
<title>It's been a quarter century: we can assume volatile is present with that name.</title>
<updated>2014-03-29T18:09:28Z</updated>
<author>
<name>guenther</name>
<email>guenther@openbsd.org</email>
</author>
<published>2014-03-29T18:09:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=2df76cc2a0aee2cb2166e3799b7bb5c3f883f83d'/>
<id>urn:sha1:2df76cc2a0aee2cb2166e3799b7bb5c3f883f83d</id>
<content type='text'>
ok dlg@ mpi@ deraadt@
</content>
</entry>
<entry>
<title>When reading the value from a simple lock, we do not need to ldcws into a</title>
<updated>2011-06-24T12:49:06Z</updated>
<author>
<name>jsing</name>
<email>jsing@openbsd.org</email>
</author>
<published>2011-06-24T12:49:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=87b5afdea6215725a26fd8bd03cae29740d5e2fc'/>
<id>urn:sha1:87b5afdea6215725a26fd8bd03cae29740d5e2fc</id>
<content type='text'>
__cpu_simple_lock_t - gcc most likely ignores the alignment for a stack
variable anyway. Also remove unnecessary initialisation.

ok kettenis@ miod@
</content>
</entry>
<entry>
<title>Normalize sentinel. Use _MACHINE_*_H_ and _&lt;ARCH&gt;_*_H_ properly and consitently.</title>
<updated>2011-03-23T16:54:33Z</updated>
<author>
<name>pirofti</name>
<email>pirofti@openbsd.org</email>
</author>
<published>2011-03-23T16:54:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=2fa72412907ae78c4787a4a8f888c5f0486e225c'/>
<id>urn:sha1:2fa72412907ae78c4787a4a8f888c5f0486e225c</id>
<content type='text'>
Discussed and okay drahn@. Okay deraadt@.
</content>
</entry>
<entry>
<title>Provide a specific rw_cas() function for MP kernels; stolen from m88k.</title>
<updated>2011-01-12T21:11:12Z</updated>
<author>
<name>kettenis</name>
<email>kettenis@openbsd.org</email>
</author>
<published>2011-01-12T21:11:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=733b42de3925a0ed704bbbcf233467c3246971e3'/>
<id>urn:sha1:733b42de3925a0ed704bbbcf233467c3246971e3</id>
<content type='text'>
ok jsing@, deraadt@
</content>
</entry>
<entry>
<title>Make __cpu_simple_lock implementation actually work.</title>
<updated>2011-01-12T21:07:12Z</updated>
<author>
<name>kettenis</name>
<email>kettenis@openbsd.org</email>
</author>
<published>2011-01-12T21:07:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=3b55f5b77c42691871feb991d8c59f68b1c740bb'/>
<id>urn:sha1:3b55f5b77c42691871feb991d8c59f68b1c740bb</id>
<content type='text'>
ok deraadt@, jsing@
</content>
</entry>
<entry>
<title>Include atomic.h via lock.h like other architectures do.</title>
<updated>2010-07-01T03:38:50Z</updated>
<author>
<name>jsing</name>
<email>jsing@openbsd.org</email>
</author>
<published>2010-07-01T03:38:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=baee291b76f0b9f41d108077e99f73c90ee2bec1'/>
<id>urn:sha1:baee291b76f0b9f41d108077e99f73c90ee2bec1</id>
<content type='text'>
ok kettenis@
</content>
</entry>
<entry>
<title>Provide &lt;machine/lock.h&gt; on all platforms, so that MI code may #include it</title>
<updated>2007-05-01T18:56:27Z</updated>
<author>
<name>miod</name>
<email>miod@openbsd.org</email>
</author>
<published>2007-05-01T18:56:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=c3d82f71f72c9db0260420e22a4991f3d0a4fe04'/>
<id>urn:sha1:c3d82f71f72c9db0260420e22a4991f3d0a4fe04</id>
<content type='text'>
unconditionnaly.
</content>
</entry>
</feed>
