Re: [PATCH 2/2] blk-mq: add flag for drivers wanting blocking ->queue_rq()

2016-09-22 Thread Josef Bacik
> On Sep 22, 2016, at 9:44 PM, Ming Lei wrote: > >> On Thu, Sep 22, 2016 at 11:17 PM, Jens Axboe wrote: >>> On 09/22/2016 09:12 AM, Christoph Hellwig wrote: >>> On Thu, Sep 22, 2016 at 09:03:56AM -0600, Jens Axboe wrote: Having to grab a

Re: [PATCH 2/2] blk-mq: add flag for drivers wanting blocking ->queue_rq()

2016-09-22 Thread Ming Lei
On Thu, Sep 22, 2016 at 11:17 PM, Jens Axboe wrote: > On 09/22/2016 09:12 AM, Christoph Hellwig wrote: >> >> On Thu, Sep 22, 2016 at 09:03:56AM -0600, Jens Axboe wrote: >>> >>> Having to grab a mutex, for instance. We invoke ->queue_rq() with >>> preemption disabled, so I'd hope

Re: [PATCH 2/2] blk-mq: add flag for drivers wanting blocking ->queue_rq()

2016-09-22 Thread Ming Lei
On Thu, Sep 22, 2016 at 11:12 PM, Christoph Hellwig wrote: > On Thu, Sep 22, 2016 at 09:03:56AM -0600, Jens Axboe wrote: >> Having to grab a mutex, for instance. We invoke ->queue_rq() with >> preemption disabled, so I'd hope that would not be the case... What >> drivers block

Re: [PATCH 2/2] blk-mq: add flag for drivers wanting blocking ->queue_rq()

2016-09-22 Thread Josef Bacik
On 09/22/2016 10:59 AM, Christoph Hellwig wrote: On Thu, Sep 22, 2016 at 08:53:00AM -0600, Jens Axboe wrote: If a driver sets BLK_MQ_F_BLOCKING, it is allowed to block in its ->queue_rq() handler. For that case, blk-mq ensures that we always calls it from a safe context. First can you provide

Re: [PATCH 2/2] blk-mq: add flag for drivers wanting blocking ->queue_rq()

2016-09-22 Thread Jens Axboe
On 09/22/2016 08:59 AM, Christoph Hellwig wrote: On Thu, Sep 22, 2016 at 08:53:00AM -0600, Jens Axboe wrote: If a driver sets BLK_MQ_F_BLOCKING, it is allowed to block in its ->queue_rq() handler. For that case, blk-mq ensures that we always calls it from a safe context. First can you provide

Re: [PATCH 2/2] blk-mq: add flag for drivers wanting blocking ->queue_rq()

2016-09-22 Thread Christoph Hellwig
On Thu, Sep 22, 2016 at 08:53:00AM -0600, Jens Axboe wrote: > If a driver sets BLK_MQ_F_BLOCKING, it is allowed to block in its > ->queue_rq() handler. For that case, blk-mq ensures that we always > calls it from a safe context. First can you provide a more useful defintion of blocking? Lots of