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)