drbd: don't recvmsg with zero length
authorLars Ellenberg <lars.ellenberg@linbit.com>
Fri, 29 Oct 2010 21:32:01 +0000 (23:32 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 27 Nov 2010 18:50:43 +0000 (19:50 +0100)
commitc13f7e1a94007c4381814e7daf033e3e8f0663f3
tree38115a45b39cd53204268238b8dc6e5bbfd9bafc
parent19650e8580987c0ffabc2fe2cbc16b944789df8b
drbd: don't recvmsg with zero length

This should fix a performance degradation we observed recently.

If we don't expect any subheader, we should not call into the tcp stack,
as that may add considerable latency if there is no data available at
this point.

For a synthetic synchronous write load with single outstanding writes,
this additional latency when processing the "unplug remote" packet
added up to a performance degradation factor >= 10.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_receiver.c