diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-15 16:49:42 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-15 16:49:42 +0200 |
commit | 0ec54810b823e59dc0afa7686aeac048f7eaebbf (patch) | |
tree | 6401b471e4bbdc0c544580a4898673318013054d /src/device.c | |
parent | Try out spinlocks for multiconsumer (diff) | |
download | wireguard-monolithic-historical-0ec54810b823e59dc0afa7686aeac048f7eaebbf.tar.xz wireguard-monolithic-historical-0ec54810b823e59dc0afa7686aeac048f7eaebbf.zip |
Try only advancing to next CPU if dql says sojd/spinlocks-dql
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c index 070e5e5..6faa7e4 100644 --- a/src/device.c +++ b/src/device.c @@ -311,6 +311,7 @@ static int newlink(struct net *src_net, struct net_device *dev, struct nlattr *t INIT_LIST_HEAD(&wg->send_queue.list); spin_lock_init(&wg->send_queue.lock); + dql_init(&wg->send_queue.dql, HZ); wg->send_queue.worker = alloc_percpu(struct multicore_worker); if (!wg->send_queue.worker) goto error_6; @@ -321,6 +322,7 @@ static int newlink(struct net *src_net, struct net_device *dev, struct nlattr *t INIT_LIST_HEAD(&wg->receive_queue.list); spin_lock_init(&wg->receive_queue.lock); + dql_init(&wg->receive_queue.dql, HZ); wg->receive_queue.worker = alloc_percpu(struct multicore_worker); if (!wg->receive_queue.worker) goto error_7; |