Skip to content

block: rework flush sequencing for blk-mq

Christoph Hellwig dm-devel linux-man linux-scsi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 30 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1block: rework flush sequencing for blk-mqblock/blk-core.c block/blk-flush.c block/blk-mq.c +4 more+76 -11735 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] block: rework flush sequencing for blk-mq

This patch aims to make the flush sequence for blk-mq work the same as for the old request path, that is set a special request aside for the sequenced flushes, which only gets submitted while the parent request(s) are blocked. It kinda reverts two earlier patches from me and Shaohua which tried to hack around the issues we had before.

There's still a few difference from the legacy flush code, the first one is that we have to submit blk-mq requests from user context and need a workqueue for it. For now the code for that is kept in the flush code, but once blk-mq grows requeueing code as needed e.g. for a proper SCSI conversion it might get time to life that to common code. The second one is that the old code has a way to defer flushes depending on queue busy status (the flush_queue_delayed flag), but I have no idea how to create something similar for blk-mq.

Last but not least it might make sense to allocate the special flush request per hardware context and on the right node, but I'd like to defer that until someone has actual high performance hardware that requires flushes, before that the law of premature optimization applies.