aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/virt
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-05-04 17:53:42 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-05-04 18:03:51 -0600
commite21300c15cd8365017be856f944efa4db7b1cb95 (patch)
treeb3d9b3da003bff4276c586a8e6a184db14a97e08 /virt
parentwireguard: socket: remove errant restriction on looping to self (diff)
downloadwireguard-linux-e21300c15cd8365017be856f944efa4db7b1cb95.tar.xz
wireguard-linux-e21300c15cd8365017be856f944efa4db7b1cb95.zip
wireguard: send/receive: cond_resched() when processing worker ringbuffers
Users with pathological hardware reported CPU stalls on CONFIG_ PREEMPT_VOLUNTARY=y, because the ringbuffers would stay full, meaning these workers would never terminate. That turned out not to be okay on systems without forced preemption, which Sultan observed. This commit adds a cond_resched() to the bottom of each loop iteration, so that these workers don't hog the core. Note that we don't need this on the napi poll worker, since that terminates after its budget is expended. Suggested-by: Sultan Alsawaf <sultan@kerneltoast.com> Reported-by: Wang Jian <larkwang@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions