<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-openbsd/sys/arch/m88k/include/cpu.h, branch jd/queueboosts</title>
<subtitle>WireGuard implementation for the OpenBSD kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-openbsd/atom/sys/arch/m88k/include/cpu.h?h=jd%2Fqueueboosts</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-openbsd/atom/sys/arch/m88k/include/cpu.h?h=jd%2Fqueueboosts'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/'/>
<updated>2020-05-31T06:23:56Z</updated>
<entry>
<title>introduce "cpu_rnd_messybits" for use instead of nanotime in dev/rnd.c.</title>
<updated>2020-05-31T06:23:56Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2020-05-31T06:23:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=01802d2cc63d886227ab3b39e923ff13cf516166'/>
<id>urn:sha1:01802d2cc63d886227ab3b39e923ff13cf516166</id>
<content type='text'>
rnd.c uses nanotime to get access to some bits that change quickly
between events that it can mix into the entropy pool. it doesn't
use nanotime to get a monotonically increasing set or ordered and
accurate timestamps, it just wants something with bits that change.

there's been discussions for years about letting rnd use a clock
that's super fast to read, but not necessarily accurate, but it
wasn't until recently that i figured out it wasn't interested in
time at all, so things like keeping a fast clock coherent between
cpu cores or correct according to ntp is unecessary. this means we
can just let rnd read the cycle counters on cpus and things will
be fine.  cpus with cycle counters that vary in their speed and
arent kept consistent between cores may even be desirable in this
context.

so this is the first step in converting rnd.c to reading cycle
counter. it copies the nanotime backend to each arch, and they can
replace it with something MD as a second step later on.

djm@ suggested rnd_messybytes, but we landed on cpu_rnd_messybits.
thanks to visa for his eyes.
ok deraadt@ visa@
deraadt@ says he will help handle any MD fallout that occurs.
</content>
</entry>
<entry>
<title>sys/arch/luna88k/luna88k/locore0.S:dummy_cpu assumes that</title>
<updated>2019-08-28T13:48:40Z</updated>
<author>
<name>aoyama</name>
<email>aoyama@openbsd.org</email>
</author>
<published>2019-08-28T13:48:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8db9df62777b1c1bb6e93e6a1287c8982debb860'/>
<id>urn:sha1:8db9df62777b1c1bb6e93e6a1287c8982debb860</id>
<content type='text'>
ci_mp_atomic_{begin,end} are 6th and 7th elements of cpu_info
structure.  Actually that is dummy structure used in early boot stage,
but for consistency, move ci_srp_hazards position in cpu_info.

ok mpi@
</content>
</entry>
<entry>
<title>Include srp.h where struct cpu_info uses srp to avoid erroring out when</title>
<updated>2018-12-05T10:28:21Z</updated>
<author>
<name>jsg</name>
<email>jsg@openbsd.org</email>
</author>
<published>2018-12-05T10:28:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=1a1181a966226532433438cb3741ae7cdc0727d4'/>
<id>urn:sha1:1a1181a966226532433438cb3741ae7cdc0727d4</id>
<content type='text'>
including cpu.h machine/intr.h etc without first including param.h when
MULTIPROCESSOR is defined.

ok visa@
</content>
</entry>
<entry>
<title>Put the address of the per-cpu clock and interrupt registers into the cpu_info</title>
<updated>2017-03-19T10:57:29Z</updated>
<author>
<name>miod</name>
<email>miod@openbsd.org</email>
</author>
<published>2017-03-19T10:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=8adebe846c146c3067944abef6a94106ce5f13ae'/>
<id>urn:sha1:8adebe846c146c3067944abef6a94106ce5f13ae</id>
<content type='text'>
struct, rather than fetching them from arrays every time they are needed.

ok aoyama@
</content>
</entry>
<entry>
<title>introduce srp, which according to the manpage i wrote is short for</title>
<updated>2015-07-02T01:33:59Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2015-07-02T01:33:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=52776b7dd171c092a35f86a9ed8bd1c22cac9fb8'/>
<id>urn:sha1:52776b7dd171c092a35f86a9ed8bd1c22cac9fb8</id>
<content type='text'>
"shared reference pointers".

srp allows concurrent access to a data structure by multiple cpus
while avoiding interlocking cpu opcodes. it manages its own reference
counts and the garbage collection of those data structure to avoid
use after frees.

internally srp is a twisted version of hazard pointers, which are
a relative of RCU.

jmatthew wrote the bulk of a hazard pointer implementation and
changed bpf to use it to allow mpsafe access to bpfilters. however,
at s2k15 we were trying to apply it to other data structures but
the memory overhead of every hazard pointer would have blown out
significantly in several uses cases. a bulk of our time at s2k15
was spent reworking hazard pointers into srp.

this diff adds the srp api and adds the necessary metadata to struct
cpuinfo on our MP architectures. srp on uniprocessor platforms has
alternate code that is optimised because it knows there'll be no
concurrent access to data by multiple cpus.

srp is made available to the system via param.h, so it should be
available everywhere in the kernel.

the docs likely need improvement cos im too close to the implementation.

ok mpi@
</content>
</entry>
<entry>
<title>no md code wants lockmgr locks, so no md code needs to include sys/lock.h</title>
<updated>2015-02-11T07:05:39Z</updated>
<author>
<name>dlg</name>
<email>dlg@openbsd.org</email>
</author>
<published>2015-02-11T07:05:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=d3b1d173f07835f2d78b379d23a5946ce16b055a'/>
<id>urn:sha1:d3b1d173f07835f2d78b379d23a5946ce16b055a</id>
<content type='text'>
with and ok miod@
</content>
</entry>
<entry>
<title>CPU_BUSY_CYCLE(): A new MI statement for busy loop power reduction</title>
<updated>2014-07-11T10:53:07Z</updated>
<author>
<name>uebayasi</name>
<email>uebayasi@openbsd.org</email>
</author>
<published>2014-07-11T10:53:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=65f535b7fa77bbec89e3f3bc91362d65d807077e'/>
<id>urn:sha1:65f535b7fa77bbec89e3f3bc91362d65d807077e</id>
<content type='text'>
The new CPU_BUSY_CYCLE() may be put in a busy loop body so that CPU can reduce
power consumption, as Linux's cpu_relax() and FreeBSD's cpu_spinwait().  To
start minimally, use PAUSE on i386/amd64 and empty on others.  The name is
chosen following the existing cpu_idle_*() functions.  Naming and API may be
polished later.

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>remove counters for simplelocks</title>
<updated>2013-05-31T17:00:57Z</updated>
<author>
<name>tedu</name>
<email>tedu@openbsd.org</email>
</author>
<published>2013-05-31T17:00:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=05c6e375d50ab39874a711bb89313b663548aa0d'/>
<id>urn:sha1:05c6e375d50ab39874a711bb89313b663548aa0d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix kernel profiling on MP systems by using per-CPU buffers and teach</title>
<updated>2013-03-12T09:37:16Z</updated>
<author>
<name>mpi</name>
<email>mpi@openbsd.org</email>
</author>
<published>2013-03-12T09:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-openbsd/commit/?id=6377c2eaf8ad0c2174b64c6ffe780441bba1d2d3'/>
<id>urn:sha1:6377c2eaf8ad0c2174b64c6ffe780441bba1d2d3</id>
<content type='text'>
kgmon(8) to deal with them, this time without public header changes.

Previously various CPUs were iterating over the same global buffer at
the same time to modify it and never ended.

This diff includes some ideas submited by Thor Simon to NetBSD via miod@.

ok deraadt@, mikeb@, haesbaert@
</content>
</entry>
</feed>
