aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-05-04 18:35:12 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-05-04 18:36:18 -0600
commit2ab4726cc2808f1c9e8acac5120ae7be6a090ebb (patch)
tree1c9f757d89456dcce86d2511acdf317fdd22b8ad /src/compat/compat.h
parentsocket: remove errant restriction on looping to self (diff)
downloadwireguard-linux-compat-2ab4726cc2808f1c9e8acac5120ae7be6a090ebb.tar.xz
wireguard-linux-compat-2ab4726cc2808f1c9e8acac5120ae7be6a090ebb.zip
send: cond_resched() when processing tx 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. This commit adds a cond_resched() to the bottom of each loop iteration, so that these workers don't hog the core. We don't do this on encryption/decryption because the compat module here uses simd_relax, which already includes a call to schedule in preempt_enable. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/compat.h')
0 files changed, 0 insertions, 0 deletions