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: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 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] cfq: fix starvation of asynchronous writes

2016-09-22 Thread Jens Axboe
On 09/22/2016 06:59 PM, Glauber Costa wrote: While debugging timeouts happening in my application workload (ScyllaDB), I have observed calls to open() taking a long time, ranging everywhere from 2 seconds - the first ones that are enough to time out my application - to more than 30 seconds. The

[PATCH] block: Change BIO_RESET_BITS to current proper value

2016-09-22 Thread Yunlong Song
Signed-off-by: Yunlong Song --- include/linux/blk_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 436f43f..b7221b3 100644 --- a/include/linux/blk_types.h +++

Re: [PATCH 02/13] genirq/affinity: Provide smarter irq spreading infrastructure

2016-09-22 Thread Thomas Gleixner
Alexander, On Wed, 21 Sep 2016, Alexander Gordeev wrote: > On Wed, Sep 14, 2016 at 04:18:48PM +0200, Christoph Hellwig wrote: > > +/** > > + * irq_calc_affinity_vectors - Calculate to optimal number of vectors for > > a given affinity mask > > + * @affinity: The affinity mask to

Re: [PATCH] block: export bio_free_pages to other modules

2016-09-22 Thread Kent Overstreet
On Thu, Sep 22, 2016 at 03:10:01AM -0400, Guoqing Jiang wrote: > bio_free_pages is introduced in commit 1dfa0f68c040 > ("block: add a helper to free bio bounce buffer pages"), > we can reuse the func in other modules after it was > imported. > > Cc: Christoph Hellwig > Cc:

Re: [PATCH 03/13] genirq/msi: Switch to new irq spreading infrastructure

2016-09-22 Thread Alexander Gordeev
On Wed, Sep 14, 2016 at 04:18:49PM +0200, Christoph Hellwig wrote: > static int msix_setup_entries(struct pci_dev *dev, void __iomem *base, > - struct msix_entry *entries, int nvec) > + struct msix_entry *entries, int nvec, > +

Re: [PATCH 0/2]: Add option for async ->queue_rq

2016-09-22 Thread Josef Bacik
On 09/22/2016 10:52 AM, Jens Axboe wrote: Two patches that add the ability for a driver to flag itself as wanting the ->queue_rq() invoked in a manner that allows it to block. We'll need that for the nbd conversion, to avoid having to add workqueue offload. We can use this in the current loop mq

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

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

2016-09-22 Thread Jens Axboe
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. Signed-off-by: Jens Axboe --- block/blk-mq.c | 2 +- include/linux/blk-mq.h | 1 + 2 files changed, 2

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

[PATCH 0/2]: Add option for async ->queue_rq

2016-09-22 Thread Jens Axboe
Two patches that add the ability for a driver to flag itself as wanting the ->queue_rq() invoked in a manner that allows it to block. We'll need that for the nbd conversion, to avoid having to add workqueue offload. We can use this in the current loop mq path as well. -- To unsubscribe from this

Re: [PATCH 1/2] blk-mq: get rid of manual run of queue with __blk_mq_run_hw_queue()

2016-09-22 Thread Christoph Hellwig
On Thu, Sep 22, 2016 at 08:52:59AM -0600, Jens Axboe wrote: > Two cases: > > 1) blk_mq_alloc_request() needlessly re-runs the queue, after >calling into the tag allocation without NOWAIT set. We don't >need to do that. > > 2) blk_mq_map_request() should just use blk_mq_run_hw_queue()

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 1/2] blk-mq: get rid of manual run of queue with __blk_mq_run_hw_queue()

2016-09-22 Thread Christoph Hellwig
Ok, I looked into this a bit more, and while I'm still fine with the patch I think it's only half of what we should do here. There really is no point in doing the first non-blocking path in blk_mq_map_request either as bt_get itself already does the non-blocking pass, and also runs the queue when

Re: [patch V2 0/2] block/mq: Convert to new hotplug state machine

2016-09-22 Thread Christoph Hellwing
On Tue, Sep 20, 2016 at 09:48:39PM -0600, Jens Axboe wrote: > On 09/20/2016 09:21 AM, Thomas Gleixner wrote: >> The following series converts block/mq to the new hotplug state >> machine. The series is against block.git/for-next and depends on >> >>

Re: [patch V2 0/2] block/mq: Convert to new hotplug state machine

2016-09-22 Thread Jens Axboe
On 09/22/2016 07:57 AM, Christoph Hellwing wrote: On Tue, Sep 20, 2016 at 09:48:39PM -0600, Jens Axboe wrote: On 09/20/2016 09:21 AM, Thomas Gleixner wrote: The following series converts block/mq to the new hotplug state machine. The series is against block.git/for-next and depends on

Re: [PATCH] block: export bio_free_pages to other modules

2016-09-22 Thread Jens Axboe
On 09/22/2016 01:10 AM, Guoqing Jiang wrote: bio_free_pages is introduced in commit 1dfa0f68c040 ("block: add a helper to free bio bounce buffer pages"), we can reuse the func in other modules after it was imported. Applied for 4.9, thanks. -- Jens Axboe -- To unsubscribe from this list:

Re: [PATCH] block: export bio_free_pages to other modules

2016-09-22 Thread Christoph Hellwig
On Thu, Sep 22, 2016 at 07:48:39AM -0600, Jens Axboe wrote: > On 09/22/2016 01:10 AM, Guoqing Jiang wrote: > > bio_free_pages is introduced in commit 1dfa0f68c040 > > ("block: add a helper to free bio bounce buffer pages"), > > we can reuse the func in other modules after it was > > imported. > >