Re: [PATCH] dm-mpath: return DM_MAPIO_REQUEUE in case of rq allocation failure

2017-09-25 Thread Ming Lei
On Mon, Sep 25, 2017 at 03:23:16PM +, Bart Van Assche wrote: > On Mon, 2017-09-25 at 11:06 +0800, Ming Lei wrote: > > On Fri, Sep 22, 2017 at 05:54:48PM +, Bart Van Assche wrote: > > > On Sat, 2017-09-23 at 01:44 +0800, Ming Lei wrote: > > > > On Fri, Sep 22, 2017 at 03:06:16PM +, Bart

Re: [PATCH] dm-mpath: return DM_MAPIO_REQUEUE in case of rq allocation failure

2017-09-25 Thread Bart Van Assche
On Mon, 2017-09-25 at 11:06 +0800, Ming Lei wrote: > On Fri, Sep 22, 2017 at 05:54:48PM +, Bart Van Assche wrote: > > On Sat, 2017-09-23 at 01:44 +0800, Ming Lei wrote: > > > On Fri, Sep 22, 2017 at 03:06:16PM +, Bart Van Assche wrote: > > > > On Fri, 2017-09-22 at 09:35 +0800, Ming Lei

Re: [PATCH] dm-mpath: return DM_MAPIO_REQUEUE in case of rq allocation failure

2017-09-24 Thread Ming Lei
On Fri, Sep 22, 2017 at 05:54:48PM +, Bart Van Assche wrote: > On Sat, 2017-09-23 at 01:44 +0800, Ming Lei wrote: > > On Fri, Sep 22, 2017 at 03:06:16PM +, Bart Van Assche wrote: > > > On Fri, 2017-09-22 at 09:35 +0800, Ming Lei wrote: > > > > + /* > > > > +*

Re: [PATCH] dm-mpath: return DM_MAPIO_REQUEUE in case of rq allocation failure

2017-09-22 Thread Bart Van Assche
On Sat, 2017-09-23 at 01:44 +0800, Ming Lei wrote: > On Fri, Sep 22, 2017 at 03:06:16PM +, Bart Van Assche wrote: > > On Fri, 2017-09-22 at 09:35 +0800, Ming Lei wrote: > > > + /* > > > + * blk-mq's SCHED_RESTART can cover this requeue, so > > > + * we needn't to deal

Re: [PATCH] dm-mpath: return DM_MAPIO_REQUEUE in case of rq allocation failure

2017-09-22 Thread Ming Lei
On Fri, Sep 22, 2017 at 03:06:16PM +, Bart Van Assche wrote: > On Fri, 2017-09-22 at 09:35 +0800, Ming Lei wrote: > > + /* > > +* blk-mq's SCHED_RESTART can cover this requeue, so > > +* we needn't to deal with it by DELAY_REQUEUE. More > > +*

Re: [PATCH] dm-mpath: return DM_MAPIO_REQUEUE in case of rq allocation failure

2017-09-22 Thread Bart Van Assche
On Fri, 2017-09-22 at 09:35 +0800, Ming Lei wrote: > + /* > + * blk-mq's SCHED_RESTART can cover this requeue, so > + * we needn't to deal with it by DELAY_REQUEUE. More > + * importantly, we have to return DM_MAPIO_REQUEUE > + * so

[PATCH] dm-mpath: return DM_MAPIO_REQUEUE in case of rq allocation failure

2017-09-21 Thread Ming Lei
blk-mq will rerun queue via RESTART after one request is completed, so not necessary to wait random time for requeuing, we should trust blk-mq to do it. More importantly, we need return BLK_STS_RESOURCE to blk-mq so that dequeue from I/O scheduler can be stopped, then I/O merge gets improved.