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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/