[Drbd-dev] DRBD does not always send UnplugRemote when it should
Simon.Graham at stratus.com
Sun Nov 1 23:16:07 CET 2009
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1057 bytes
More information about the drbd-dev