Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | selftest/mpmc_ring: lower test count for perf testingjd/ring_testing | Jason A. Donenfeld | 2018-06-18 | 1 | -1/+1 |
| | |||||
* | mpmc_ptr_ring: disable preemption | Jason A. Donenfeld | 2018-06-18 | 1 | -3/+18 |
| | |||||
* | mpmc_ptr_ring: nits | Jason A. Donenfeld | 2018-06-18 | 1 | -7/+4 |
| | |||||
* | mpmc_ptr_ring: move atomic_read outside loop | Thomas Gschwantner | 2018-06-18 | 1 | -2/+2 |
| | |||||
* | selftest/mpmc_ring: use rwsem instead of multiple completions | Jason A. Donenfeld | 2018-06-18 | 1 | -10/+10 |
| | |||||
* | selftest/mpmc_ring: switch back to our own ring | Jason A. Donenfeld | 2018-06-18 | 1 | -9/+8 |
| | |||||
* | selftest/mpmc_ring: use completion and switch to ptr_ring | Jason A. Donenfeld | 2018-06-18 | 1 | -17/+23 |
| | |||||
* | mpmc_ptr_ring: Fix a word | Jonathan Neuschäfer | 2018-06-18 | 1 | -1/+1 |
| | | | | Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> | ||||
* | selftest/mpmc_ring: use kthreads | Jason A. Donenfeld | 2018-06-18 | 1 | -40/+26 |
| | |||||
* | selftest/mpmc_ring: don't starve other queues | Jason A. Donenfeld | 2018-06-18 | 1 | -21/+28 |
| | |||||
* | selftest/mpmc_ring: round-robin CPUs | Jason A. Donenfeld | 2018-06-18 | 1 | -2/+5 |
| | |||||
* | selftest/mpmc_ring: small restructuring | Jason A. Donenfeld | 2018-06-18 | 1 | -18/+17 |
| | |||||
* | Test commit | Thomas Gschwantner | 2018-06-18 | 4 | -17/+56 |
| | |||||
* | selftest/mpmc_ring: use int64_t for counters | Thomas Gschwantner | 2018-06-18 | 1 | -6/+6 |
| | | | | Previously used long would overflow on 32-bit machines. | ||||
* | selftest/mpmc_ring: Add more __init/__initdata annotations | Jonathan Neuschäfer | 2018-06-18 | 1 | -3/+3 |
| | | | | | The main function, mpmc_ring_selftest, is already marked with __init, but the callback functions and the ring pointer were not. | ||||
* | selftest/mpmc_ring: Remove const qualifier from mpmc_ptr_ring_produce argument | Jonathan Neuschäfer | 2018-06-18 | 1 | -1/+1 |
| | | | | | | | | | | | mpmc_ptr_ring_produce takes a void*. This fixes the following warning: net/wireguard/selftest/mpmc_ring.h: In function ‘producer_function’: net/wireguard/selftest/mpmc_ring.h:43:38: warning: passing argument 2 of ‘mpmc_ptr_ring_produce’ disc] while (mpmc_ptr_ring_produce(ring, (const void *) count)) ^ | ||||
* | mpmc_ptr_ring: Include all necessary headers | Jonathan Neuschäfer | 2018-06-18 | 1 | -0/+11 |
| | | | | | | | | | | | | | | | | | | | | mpmc_ptr_ring.h should include the headers that it needs explicitly. This commit adds the following: - <asm/barrier.h>: smp_rmb, smp_wmb, smp_mb__before_atomic - <linux/atomic.h>: atomic_t, atomic_read, atomic_set, atomic_cmpxchg, atomic_inc - <linux/cache.h>: ____cacheline_aligned_in_smp - <linux/compiler.h>: READ_ONCE, WRITE_ONCE - <linux/errno.h>: ENOMEM - <linux/log2.h>: is_power_of_2 - <linux/processor.h>: cpu_relax - <linux/slab.h>: kcalloc, kfree - <linux/stddef.h>: NULL I'm not sure if all of them are really needed because I wasn't about to provoke a compile error due to the missing includes. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> | ||||
* | mpmc_ptr_ring: Fix some style details | Jonathan Neuschäfer | 2018-06-18 | 2 | -1/+2 |
| | |||||
* | mpmc_ptr_ring: add selftest | Thomas Gschwantner | 2018-06-18 | 4 | -1/+125 |
| | |||||
* | mpmc_ptr_ring: calculate mask once and store it | Thomas Gschwantner | 2018-06-18 | 1 | -3/+5 |
| | |||||
* | mpmc_ptr_ring: use unsigned int instead of size_t | Thomas Gschwantner | 2018-06-18 | 1 | -10/+10 |
| | | | | | | | | For producers/consumers we use atomic_t which is really int, so size_t could either be too large, wasting memory, or too small (unlikely). For size, we also want to be using unsigned int, since the mask that we derive from it is ANDed with producer/consumer. | ||||
* | mpmc_ptr_ring: add include guard | Thomas Gschwantner | 2018-06-18 | 1 | -0/+6 |
| | |||||
* | mpmc_ptr_ring: Switch to smp_[rw]mb() | Jonathan Neuschäfer | 2018-06-18 | 1 | -8/+8 |
| | | | | | | | | | | | | | | From https://www.kernel.org/doc/Documentation/memory-barriers.txt: > SMP memory barriers are reduced to compiler barriers on uniprocessor > compiled systems because it is assumed that a CPU will appear to be > self-consistent, and will order overlapping accesses correctly with > respect to itself. Since we only order CPU memory accesses with the memory barriers in mpmc_ptr_ring.h, smp_[rw]mb() should be sufficient. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> | ||||
* | messages: Ensure that there are more queue slots than CPUs | Jonathan Neuschäfer | 2018-06-18 | 2 | -1/+9 |
| | | | | | | | I'm not completely sure about this. It also doesn't fix all the errors: sometimes the test suite reports that it fails to send packets. | ||||
* | mpmc_ptr_ring: Place producer_head and producer_tail in the same cacheline | Jonathan Neuschäfer | 2018-06-18 | 1 | -5/+3 |
| | | | | | They are updated together, so it doesn't make much sense to keep them separate in the cache. | ||||
* | mpmc_ptr_ring: Use atomic_t instead of atomic_long_t | Jonathan Neuschäfer | 2018-06-18 | 1 | -20/+20 |
| | | | | The index range doesn't get large enough to warrant 64-bit indices. | ||||
* | mpmc_ptr_ring: Eliminate false sharing in struct mpmc_ptr_ring | Jonathan Neuschäfer | 2018-06-18 | 1 | -3/+3 |
| | |||||
* | mpmc_ptr_ring: Reduce the memory barrier usage | Jonathan Neuschäfer | 2018-06-18 | 1 | -26/+22 |
| | |||||
* | mpmc_ptr_ring: Fix the remaining crash | Jonathan Neuschäfer | 2018-06-18 | 1 | -2/+2 |
| | |||||
* | [WIP] Implement a lock-free MPMC ring buffer | Jonathan Neuschäfer | 2018-06-18 | 6 | -13/+225 |
| | | | | | | | | TODO: actually use the right memory barriers in the right places TODO: eliminate false sharing between mpmc_ptr_ring members TODO: reconsider atomic_long_t vs. atomic_t, vs. the type of size in _init() TODO: sprinkle likely/unlikely on some branches FIXME: it still crashes | ||||
* | qemu: bump default kernel | Jason A. Donenfeld | 2018-06-17 | 1 | -1/+1 |
| | |||||
* | wg-quick: android: don't forget to free compiled regexes | Jason A. Donenfeld | 2018-06-17 | 1 | -5/+6 |
| | |||||
* | wg-quick: android: disable roaming to v6 networks when v4 is specified | Jason A. Donenfeld | 2018-06-17 | 1 | -1/+54 |
| | | | | This works around an unfortunate bug in 464XLAT transitions. | ||||
* | dns-hatchet: apply resolv.conf's selinux context to new resolv.conf | Jason A. Donenfeld | 2018-06-17 | 1 | -0/+2 |
| | |||||
* | simd: no need to restore fpu state when no preemption | Jason A. Donenfeld | 2018-06-17 | 1 | -0/+2 |
| | |||||
* | simd: encapsulate fpu amortization into nice functions | Jason A. Donenfeld | 2018-06-17 | 7 | -71/+83 |
| | |||||
* | queueing: re-enable preemption periodically to lower latency | Jason A. Donenfeld | 2018-06-16 | 2 | -0/+18 |
| | |||||
* | queueing: remove useless spinlocks on sc | Jason A. Donenfeld | 2018-06-16 | 3 | -5/+1 |
| | | | | Since these are the only consumers, there's no need for locking. | ||||
* | tools: getentropy requires 10.12 | Jason A. Donenfeld | 2018-06-14 | 1 | -1/+7 |
| | |||||
* | chacha20poly1305: use slow crypto on -rt kernels on arm too | Jason A. Donenfeld | 2018-06-14 | 1 | -1/+1 |
| | |||||
* | version: bump snapshot0.0.20180613 | Jason A. Donenfeld | 2018-06-13 | 2 | -2/+2 |
| | |||||
* | chacha20poly1305: use slow crypto on -rt kernels | Jason A. Donenfeld | 2018-06-13 | 1 | -1/+1 |
| | | | | | | | | | | | | | | In rt kernels, spinlocks call schedule(), which means preemption can't be disabled. The FPU disables preemption. Hence, we can either restructure things to move the calls to kernel_fpu_begin/end to be really close to the actual crypto routines, or we can do the slower lazier solution of just not using the FPU at all on -rt kernels. This patch goes with the latter lazy solution. The reason why we don't place the calls to kernel_fpu_begin/end close to the crypto routines in the first place is that they're very expensive, as it usually involves a call to XSAVE. So on sane kernels, we benefit from only having to call it once. | ||||
* | tools: support getentropy(3) | Jason A. Donenfeld | 2018-06-08 | 1 | -0/+11 |
| | |||||
* | tools: encoding: add missing static array constraints | Jason A. Donenfeld | 2018-06-06 | 3 | -5/+5 |
| | |||||
* | wg-quick: android: change name of intent | Jason A. Donenfeld | 2018-06-04 | 1 | -1/+1 |
| | |||||
* | chacha20: add missing include to header | Jason A. Donenfeld | 2018-06-02 | 1 | -0/+1 |
| | |||||
* | wg-quick: android: delay setting users until end | Jason A. Donenfeld | 2018-05-31 | 1 | -1/+6 |
| | | | | | | | `ndc users add` eventually invokes SOCK_DESTROY on user sockets, causing them to reconnect. By delaying this until after routes are set, we ensure that the sockets reconnect using the tunnel, rather than the old route. | ||||
* | version: bump snapshot0.0.20180531 | Jason A. Donenfeld | 2018-05-31 | 2 | -2/+2 |
| | |||||
* | qemu: bump default version | Jason A. Donenfeld | 2018-05-31 | 1 | -1/+1 |
| | |||||
* | tools: constanter time encoding | Jason A. Donenfeld | 2018-05-31 | 2 | -22/+28 |
| |