[PATCH 0/2] md: change approach to parallel flush requests.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Xiao,
 I was looking at the issue of parallel flush requests being slow as a
 customer reported it against a kernel of ours that doesn't have your
 patch.

 I reviewed you patch more carefully and noticed a problem.  It calls
 submit_bio() multiple times from within a make_request_fn function.
 Calling submit_bio once is perfectly safe.  Calling it twice requires
 care and usually involves one of the call submitting part of the
 original, and the other resubmitting the original with that part
 removed.
 Calling it more often is rarely safe.  The problem is that all these
 bios get queued on current->biolist and don't even start being
 processed until the top level make_request_fn completes.  This can
 result in deadlocks.

 Also, with your patch there can be lots of flush requests all being
 sent at much the same time, which all do essentially the same
 thing.  This is fairly wasteful.

 I came up with a different approach.  I restored the old because of
 flush requests being serialized, but now if a caller will not bother
 sending a flush if some other caller submitted a flush request while
 it waited.  This should result in many fewer flush requests, and must
 less delay.

 Would you be able to run you same test on this version to confirm
 that it fixes the performance issue, and if so review the code to see
 if you are happy with it.

Thanks a lot,
NeilBrown


---

NeilBrown (2):
      Revert "MD: fix lock contention for flush bios"
      md: batch flush requests.


 drivers/md/md.c |  172 +++++++++++++++++++++++--------------------------------
 drivers/md/md.h |   25 +++-----
 2 files changed, 81 insertions(+), 116 deletions(-)

--
Signature




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux