Re: [PATCHSET v2] blk-mq: reimplement timeout handling

2017-12-20 Thread Bart Van Assche
On Wed, 2017-12-20 at 16:08 -0800, t...@kernel.org wrote: > On Wed, Dec 20, 2017 at 11:41:02PM +, Bart Van Assche wrote: > > On Tue, 2017-12-12 at 11:01 -0800, Tejun Heo wrote: > > > Currently, blk-mq timeout path synchronizes against the usual > > > issue/completion path using a complex

Re: [PATCHSET v2] blk-mq: reimplement timeout handling

2017-12-20 Thread Bart Van Assche
On Wed, 2017-12-20 at 16:08 -0800, t...@kernel.org wrote: > On Wed, Dec 20, 2017 at 11:41:02PM +, Bart Van Assche wrote: > > On Tue, 2017-12-12 at 11:01 -0800, Tejun Heo wrote: > > > Currently, blk-mq timeout path synchronizes against the usual > > > issue/completion path using a complex

Re: [PATCHSET v2] blk-mq: reimplement timeout handling

2017-12-20 Thread t...@kernel.org
On Wed, Dec 20, 2017 at 11:41:02PM +, Bart Van Assche wrote: > On Tue, 2017-12-12 at 11:01 -0800, Tejun Heo wrote: > > Currently, blk-mq timeout path synchronizes against the usual > > issue/completion path using a complex scheme involving atomic > > bitflags, REQ_ATOM_*, memory barriers and

Re: [PATCHSET v2] blk-mq: reimplement timeout handling

2017-12-20 Thread t...@kernel.org
On Wed, Dec 20, 2017 at 11:41:02PM +, Bart Van Assche wrote: > On Tue, 2017-12-12 at 11:01 -0800, Tejun Heo wrote: > > Currently, blk-mq timeout path synchronizes against the usual > > issue/completion path using a complex scheme involving atomic > > bitflags, REQ_ATOM_*, memory barriers and

Re: [PATCHSET v2] blk-mq: reimplement timeout handling

2017-12-20 Thread Bart Van Assche
On Tue, 2017-12-12 at 11:01 -0800, Tejun Heo wrote: > Currently, blk-mq timeout path synchronizes against the usual > issue/completion path using a complex scheme involving atomic > bitflags, REQ_ATOM_*, memory barriers and subtle memory coherence > rules. Unfortunatley, it contains quite a few

Re: [PATCHSET v2] blk-mq: reimplement timeout handling

2017-12-20 Thread Bart Van Assche
On Tue, 2017-12-12 at 11:01 -0800, Tejun Heo wrote: > Currently, blk-mq timeout path synchronizes against the usual > issue/completion path using a complex scheme involving atomic > bitflags, REQ_ATOM_*, memory barriers and subtle memory coherence > rules. Unfortunatley, it contains quite a few

Re: [PATCHSET v2] blk-mq: reimplement timeout handling

2017-12-12 Thread Tejun Heo
Hello, Jens. On Tue, Dec 12, 2017 at 01:23:01PM -0700, Jens Axboe wrote: > I like this a lot, it's a lot less fragile and more intuitive/readable > than what we have now. And apparently less error prone... I'll do > some testing with this. Great. > BTW, since youadd a few more BLK_MQ_F_BLOCKING

Re: [PATCHSET v2] blk-mq: reimplement timeout handling

2017-12-12 Thread Tejun Heo
Hello, Jens. On Tue, Dec 12, 2017 at 01:23:01PM -0700, Jens Axboe wrote: > I like this a lot, it's a lot less fragile and more intuitive/readable > than what we have now. And apparently less error prone... I'll do > some testing with this. Great. > BTW, since youadd a few more BLK_MQ_F_BLOCKING

Re: [PATCHSET v2] blk-mq: reimplement timeout handling

2017-12-12 Thread Jens Axboe
On 12/12/2017 12:01 PM, Tejun Heo wrote: > Changes from the last version[1] > > - BLK_EH_RESET_TIMER handling fixed. > > - s/request->gstate_seqc/request->gstate_seq/ > > - READ_ONCE() added to blk_mq_rq_udpate_state(). > > - Removed left over blk_clear_rq_complete() invocation from >

Re: [PATCHSET v2] blk-mq: reimplement timeout handling

2017-12-12 Thread Jens Axboe
On 12/12/2017 12:01 PM, Tejun Heo wrote: > Changes from the last version[1] > > - BLK_EH_RESET_TIMER handling fixed. > > - s/request->gstate_seqc/request->gstate_seq/ > > - READ_ONCE() added to blk_mq_rq_udpate_state(). > > - Removed left over blk_clear_rq_complete() invocation from >

[PATCHSET v2] blk-mq: reimplement timeout handling

2017-12-12 Thread Tejun Heo
Changes from the last version[1] - BLK_EH_RESET_TIMER handling fixed. - s/request->gstate_seqc/request->gstate_seq/ - READ_ONCE() added to blk_mq_rq_udpate_state(). - Removed left over blk_clear_rq_complete() invocation from blk_mq_rq_timed_out(). Currently, blk-mq timeout path synchronizes

[PATCHSET v2] blk-mq: reimplement timeout handling

2017-12-12 Thread Tejun Heo
Changes from the last version[1] - BLK_EH_RESET_TIMER handling fixed. - s/request->gstate_seqc/request->gstate_seq/ - READ_ONCE() added to blk_mq_rq_udpate_state(). - Removed left over blk_clear_rq_complete() invocation from blk_mq_rq_timed_out(). Currently, blk-mq timeout path synchronizes