summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/rand.c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2015-12-17 22:14:40 +0000
committerkettenis <kettenis@openbsd.org>2015-12-17 22:14:40 +0000
commit581334fc6a5a0dbadfcf15a5d30b257aef20d2f3 (patch)
tree1cb7536dc80c2aa84caf7d7eb5b1b37e68fcbe69 /lib/libc/stdlib/rand.c
parentsprinkling ifndef __linux__ around two variable declarations could not (diff)
downloadwireguard-openbsd-581334fc6a5a0dbadfcf15a5d30b257aef20d2f3.tar.xz
wireguard-openbsd-581334fc6a5a0dbadfcf15a5d30b257aef20d2f3.zip
Make the cost of moving a process to the primary cpu a bit higher. This is
the CPU that handles most hardware interrupts but we don't account for that in any way in the scheduler. So processes (and kernel threads) that are unlucky enough to end up on this CPU will get less CPU cycles than those running on other CPUs. This is especially true for the softnet taskq. There network interrupts will prevent the softnet taskq from running. This means that the more packets we receive, the less packets we can actually process and/or forward. This is why "unlocking" network drivers actually decreases the forwarding performance. This diff restores most of the lost performance by making it less likely that the softnet taskq ends up on the same CPU that handles network interrupts. Tested by Hrvoje Popovski ok mpi@, deraadt@
Diffstat (limited to 'lib/libc/stdlib/rand.c')
0 files changed, 0 insertions, 0 deletions