[Drbd-dev] DRBD does not always send UnplugRemote when it should
lars.ellenberg at linbit.com
Mon Nov 2 23:46:42 CET 2009
On Sun, Nov 01, 2009 at 05:16:07PM -0500, Graham, Simon wrote:
> In looking at DRBD performance, I noticed that DRBD does not always send
> an UnplugRemote command when (I think) it should - I believe this is
> because it uses the mdev UNPLUG_REMOTE flag to control whether or not
> the command would be helpful and this flag is set in the worker thread
> as part of actually sending the data packet.
> This means that an unplug call can be made from above between the time
> the bio is submitted and the time the worker thread starts processing it
> - this call will be ignored because the flag it not set yet.
> Subsequently, the flag gets set but it's too late by then and you can
> see a very long delay on the secondary until the unplug timeout expires
> I think the fix is to set the flag in the queue_for_net_write action in
> _req_mod - this is called inline with the bio so the flag will be set
> before the unplug routine is called.
> Proposed patch against 8.2 attached.
Thanks, that looks reasonable.
I *think* we had it like that once sometime, and then changed it again.
After all, the queue_for_net_read does it, too...
Will apply to 8.3.
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
More information about the drbd-dev