diff options
author | Lars Ellenberg <lars@linbit.com> | 2014-09-11 14:29:11 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-11 08:41:29 -0600 |
commit | abde9cc6a59cb7f07fda4c77fee2150314e423fa (patch) | |
tree | 305a69aa4ced1af877bb2a3413dc2adf6a72f6b7 /drivers/block/drbd/drbd_worker.c | |
parent | b47a06d10561bfe7317b1355b4b8e4168fc6b4b7 (diff) | |
download | linux-stable-abde9cc6a59cb7f07fda4c77fee2150314e423fa.tar.gz linux-stable-abde9cc6a59cb7f07fda4c77fee2150314e423fa.tar.bz2 linux-stable-abde9cc6a59cb7f07fda4c77fee2150314e423fa.zip |
drbd: Improve asender performance
Shorten receive path in the asender thread. Reduces CPU utilisation
of asender when receiving packets, and with that increases IOPs.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/drbd/drbd_worker.c')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index 3b74f08c8b83..3ed2d871272e 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -1994,22 +1994,13 @@ static bool dequeue_work_batch(struct drbd_work_queue *queue, struct list_head * return !list_empty(work_list); } -static bool dequeue_work_item(struct drbd_work_queue *queue, struct list_head *work_list) -{ - spin_lock_irq(&queue->q_lock); - if (!list_empty(&queue->q)) - list_move(queue->q.next, work_list); - spin_unlock_irq(&queue->q_lock); - return !list_empty(work_list); -} - static void wait_for_work(struct drbd_connection *connection, struct list_head *work_list) { DEFINE_WAIT(wait); struct net_conf *nc; int uncork, cork; - dequeue_work_item(&connection->sender_work, work_list); + dequeue_work_batch(&connection->sender_work, work_list); if (!list_empty(work_list)) return; |