On Mon, 2018-05-21 at 17:11 -0600, Keith Busch wrote: > The current blk-mq code potentially locks requests out of completion by > the thousands, making drivers jump through hoops to handle them. This > patch set allows drivers to complete their requests whenever they're > completed without requiring drivers know anything about the timeout code > with minimal syncronization. > > Other proposals under current consideration still have moments that > prevent a driver from progressing a request to the completed state. > > The timeout is ultimatley made safe by reference counting the request > when timeout handling claims the request. By holding the reference count, > we don't need to do any tricks to prevent a driver from completing the > request out from under the timeout handler, allowing the actual state > to be changed inline with the true state, and drivers don't need to be > aware any of this is happening. > > In order to make the overhead as minimal as possible, the request's > reference is taken only when it appears that actual timeout handling > needs to be done. Hello Keith, Can you explain why the NVMe driver needs reference counting of requests but no other block driver needs this? Additionally, why is it that for all block drivers except NVMe the current block layer API is sufficient (blk_get_request()/blk_execute_rq()/blk_mq_start_request()/ blk_mq_complete_request()/blk_mq_end_request())? Thanks, Bart.