Commit Graph

280641 Commits

Author SHA1 Message Date
mrg
aebafec3e5 enable -Wno-error=array-bounds for GCC 9 and hppa. machdep.c has a
bunch of warnings that i can't workaround yet.
2020-09-07 02:22:27 +00:00
mrg
3b2eb8312b oops, move GCC_NO_ADDR_OF_PACKED_MEMBER into the right header. 2020-09-07 01:54:26 +00:00
mrg
931f53ce3f avoid an uninit warning with GCC 9. 2020-09-07 01:35:25 +00:00
riastradh
e059bdb000 wg: Use threadpool(9) and workqueue(9) for asynchronous tasks.
- Using threadpool(9) job per interface to receive incoming handshake
  messages gives the same concurrency for active interfaces but
  doesn't waste kthreads for inactive ones.

  => Can't really do this with a global workqueue(9) because there's
     no bound on the amount of time wg_receive_packets() might run
     for; we really need separate threads or threadpool jobs in order
     to avoid having one interface starve all the others.

- Using a global workqueue(9) for asynchronous peer tasks avoids
  creating unnecessary kthreads.

  => Each task does a more or less bounded amount of work, so it's OK
     to share a global workqueue -- there's no advantage to adding
     concurrency for what is almost certainly going to be CPU-bound
     asymmetric crypto.

  => This way we don't need a thread per peer or iteration over a
     list of all peers, so the task mechanism should no longer be a
     bottleneck to scaling to thousands of peers.

XXX This doesn't distribute the load across CPUs -- it keeps it on
the same CPU where the packet came in.  Should consider doing
something to balance the load -- maybe note if the current CPU is
loaded, and if so, sort CPUs by queue length or some other measure of
load and pick the least loaded one or something.
2020-09-07 01:15:25 +00:00
riastradh
95085a12ec wg: Use a global pktqueue rather than a per-peer pcq.
- Improves scalability -- won't hit limit on softints no matter how
  many peers there are.
- Improves parallelism -- softint was kernel-locked to serialize
  access to the pcq.
- Requires per-peer queue on handshake init to avoid dropping first
  packet.
  . Per-peer queue is currently a single packet -- should serve well
    enough for pings, dns queries, tcp connections, &c.
2020-09-07 01:14:42 +00:00
riastradh
340d2bc52e threadpool: Simplify job reference-counting logic.
Use atomic_load_relaxed while here.
2020-09-07 01:08:27 +00:00
riastradh
11002ee06b threadpool: Fix man page for threadpool_job_init.
This is threadpool_job_init(job, fn, interlock, fmt, args...), not
just threadpool_job_init(job, fn, interlock).
2020-09-07 01:07:38 +00:00
mrg
ebde11d941 make some prototypes match the builtin properly. GCC 9 complains
with the old version, GCC 8 is happy with this version.

tested on sparc.
2020-09-07 00:52:19 +00:00
mrg
3c4e3b4cdb avoid calling printf %s with NULL. fix idea from christos. 2020-09-07 00:48:45 +00:00
mrg
577075c0df adjust some fallback code to be slightly less ugly and avoid
upsetting GCC 9.
2020-09-07 00:47:27 +00:00
mrg
078f2392b1 avoid a GCC stringop truncate warning. 2020-09-07 00:46:38 +00:00
mrg
79b5664c2b update status for several ports that now mostly build (perhaps with
some uncommited changes.)
2020-09-07 00:38:14 +00:00
mrg
ec02653d43 re-gen. 2020-09-07 00:37:23 +00:00
christos
1124ae8b50 Avoid strict aliasing issue by using a separate buffer.. 2020-09-07 00:36:53 +00:00
riastradh
476688215f wg: Fix debug output now that the priority is mixed into it. 2020-09-07 00:33:08 +00:00
mrg
8d620b78e2 apply GCC_NO_ADDR_OF_PACKED_MEMBER 2020-09-07 00:32:49 +00:00
mrg
7d6ea917e1 don't call printf %s with a NULL. 2020-09-07 00:32:28 +00:00
riastradh
17726d9b03 wg: Fix non-DIAGNOSTIC build. 2020-09-07 00:32:20 +00:00
mrg
fd102b10a6 pass a pointer conversion via uintptr_t *and* the desired type casts.
avoids new GCC 9 warnings with C++ code.
2020-09-07 00:32:00 +00:00
mrg
1ff60d1f84 avoid uninit memory and use memmove vs strncpy for a will be
truncated on purpose string.
2020-09-07 00:31:11 +00:00
mrg
8820a04cbb avoid new GCC 9 warnings. 2020-09-07 00:29:14 +00:00
mrg
45092b0582 don't pass NULL to printf(), but use "<memory>" to signify this
test is operating on an in-memory only database.
2020-09-07 00:28:44 +00:00
mrg
d94d71e771 apply GCC_NO_ADDR_OF_PACKED_MEMBER 2020-09-07 00:26:23 +00:00
mrg
6f8b0adf3a use GCC_NO_ADDR_OF_PACKED_MEMBER. 2020-09-07 00:24:37 +00:00
mrg
86288e60b9 apply -Wno-error=alloca-larger-than= for GCC 9. 2020-09-07 00:24:17 +00:00
mrg
3d9a34f72e fix for netbsd/mips. 2020-09-07 00:22:51 +00:00
mrg
80ab9949eb fix mips and powerpc GCC 9 builds. 2020-09-07 00:19:04 +00:00
mrg
e7ac2a8b5b apply some GCC 9 -Wno-error* 2020-09-07 00:18:25 +00:00
christos
1f80694e30 fix unaligned access 2020-09-07 00:11:47 +00:00
jakllsch
d1868e6ec7 mknative-gcc for gcc 9.3.0 and aarch64eb 2020-09-06 23:23:21 +00:00
mrg
006c30bace mark GCC 9 as (so far) netbsd 20200907 version. this should fix the
compiler saying it is "gcc version 9.3.0 ()".

(needs mknative redo.)
2020-09-06 21:59:33 +00:00
christos
86b0983bea Stop using alloca 2020-09-06 21:49:44 +00:00
christos
be20a654c6 Adjust string sizes 2020-09-06 21:49:32 +00:00
rillig
fa00c797c6 make(1): add const for Parse_IsVar 2020-09-06 19:34:36 +00:00
rillig
78cc09048b make(1): add const to For_Eval and For_Accum 2020-09-06 19:30:53 +00:00
rillig
2d9413362f make(1): clean up For_Eval
* Reduce scope of local variables.
* Remove unnecessary null character test before positive isspace call.
2020-09-06 19:28:49 +00:00
rillig
44d49322ad make(1): properly initialize For structure in For_Eval
Initializing a Buffer or a strlist_t with zero-valued bytes only works
by conincidence, but because it would be the correct way.  In the code
path "missing `in' in for", that zero-filled Buffer is freed using
Buf_Destroy, which could have invoked undefined behavior.
2020-09-06 19:24:12 +00:00
rillig
0244d862b4 make(1): improve documentation in For_Eval 2020-09-06 19:19:49 +00:00
rillig
47ba525800 make(1): fix type of For.short_var 2020-09-06 19:18:16 +00:00
ryo
7d4a6eb7ee need swap for aarch64be 2020-09-06 17:43:31 +00:00
ryo
e9be9c477e Fix panic caused by modload. http://mail-index.netbsd.org/port-arm/2020/08/30/msg006960.html
The address space reserved for modules may not be mapped in L1-L3.
2020-09-06 17:38:10 +00:00
riastradh
04bc8e9703 uvm/uvm_extern.h, not machine/pmap.h, for pmap(9). Sort includes. 2020-09-06 17:22:44 +00:00
riastradh
541ff757c7 Fix some more uvm header fallout. Add include guards while here. 2020-09-06 17:19:46 +00:00
christos
dfab1b7eb2 comment out ioctl that is only defined for the kernel 2020-09-06 17:15:09 +00:00
christos
7c502affd2 fix null argument 2020-09-06 17:06:20 +00:00
christos
a2d10af9ab fix zeroing 2020-09-06 16:44:16 +00:00
christos
5ca7119f94 Appease gcc-9 2020-09-06 16:30:41 +00:00
riastradh
add6999975 Fix some more uvm.h cleanup fallout. 2020-09-06 15:27:22 +00:00
roy
52732d9dbe Note dhcpcd update 2020-09-06 14:58:53 +00:00
roy
3ace96f44a dhcpcd: Use ppoll(2) 2020-09-06 14:57:18 +00:00