]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
msg/async: avoid unnecessary costly wakeups for outbound messages 29141/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 4 Jun 2019 17:48:57 +0000 (13:48 -0400)
committerSage Weil <sage@redhat.com>
Fri, 19 Jul 2019 18:05:13 +0000 (13:05 -0500)
commitaba609e725d640d5aa940b50534361f4e2f8d9bf
tree157a4b865110a510f29df6bc5b024bb88d51b84b
parent4f8fa0a0024755aae7d95567c63f11d6862d55be
msg/async: avoid unnecessary costly wakeups for outbound messages

If a wakeup for an outbound message has already been scheduled or is
currently executing within the worker thread, avoid re-adding a wakeup.
For small IO sizes under high queue depths, these extra syscalls start
to add up. For larger IO sizes or small queue depths, it doesn't hurt
performance.

fio --ioengine=rbd results:

IOPS pre-change post-change
4K: 84.9k 98.3k
32K: 58.4k 59.5k
256K: 12.1k 12.2k
4M: 803 802

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 294c41f18adada6ab762d5b3f9f45d7c8bed4316)
src/msg/async/ProtocolV1.cc
src/msg/async/ProtocolV1.h
src/msg/async/ProtocolV2.cc
src/msg/async/ProtocolV2.h