So we can clean up map_request() a bit, no functional change.
Cc: Mike Snitzer <snit...@redhat.com>
Cc: Laurence Oberman <lober...@redhat.com>
Cc: Bart Van Assche <bart.vanass...@sandisk.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
drivers/md/dm-rq.c | 23 ++
queue's RESTART can handle dm-rq's
RESTART in this case.
Cc: Mike Snitzer <snit...@redhat.com>
Cc: Laurence Oberman <lober...@redhat.com>
Cc: Bart Van Assche <bart.vanass...@sandisk.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
drivers/md/dm-rq.c | 30 ++
j...@linux.vnet.ibm.com>
Cc: Martin K. Petersen <martin.peter...@oracle.com>
Cc: linux-s...@vger.kernel.org
Signed-off-by: Ming Lei <ming@redhat.com>
---
block/blk-core.c | 1 +
block/blk-mq.c | 19 +++
drivers/block/null_blk.c
introduces blk_get_request_notify(), still suggested by
you.
The last patch applies blk_get_request_notify() and avoids one
DM specific performance issue which is introduced by the 1st patch.
These 5 patches are against both dm(dm-4.16) and block tree(for-4.16/block).
Ming Lei (5):
blk-mq: introduce
On Sat, Jan 20, 2018 at 10:52:01PM -0500, Mike Snitzer wrote:
> On Sat, Jan 20 2018 at 7:57pm -0500,
> Ming Lei <ming@redhat.com> wrote:
>
> > On Sat, Jan 20, 2018 at 12:30:02PM -0500, Mike Snitzer wrote:
> > > On Sat, Jan 20 2018 at 8:48am -0500,
> > &g
On Sun, Jan 21, 2018 at 08:57:41AM +0800, Ming Lei wrote:
> On Sat, Jan 20, 2018 at 12:30:02PM -0500, Mike Snitzer wrote:
> > On Sat, Jan 20 2018 at 8:48am -0500,
> > Ming Lei <ming@redhat.com> wrote:
> >
> > > This status is returned from dri
On Sat, Jan 20, 2018 at 12:30:02PM -0500, Mike Snitzer wrote:
> On Sat, Jan 20 2018 at 8:48am -0500,
> Ming Lei <ming@redhat.com> wrote:
>
> > This status is returned from driver to block layer if device related
> > resource is run out of, but driver can
and S_SCHED_RESTART is marked, run
queue after 10ms for avoiding IO hang.
Suggested-by: Jens Axboe <ax...@kernel.dk>
Cc: Mike Snitzer <snit...@redhat.com>
Cc: Laurence Oberman <lober...@redhat.com>
Cc: Bart Van Assche <bart.vanass...@sandisk.com>
Signed-off-by: Ming Lei <ming
On Fri, Jan 19, 2018 at 09:23:35AM -0700, Jens Axboe wrote:
> On 1/19/18 9:13 AM, Mike Snitzer wrote:
> > On Fri, Jan 19 2018 at 10:48am -0500,
> > Jens Axboe <ax...@kernel.dk> wrote:
> >
> >> On 1/19/18 8:40 AM, Ming Lei wrote:
> >>>>>&g
On Fri, Jan 19, 2018 at 10:38:41AM -0700, Jens Axboe wrote:
> On 1/19/18 9:37 AM, Ming Lei wrote:
> > On Fri, Jan 19, 2018 at 09:27:46AM -0700, Jens Axboe wrote:
> >> On 1/19/18 9:26 AM, Ming Lei wrote:
> >>> On Fri, Jan 19, 2018 at 09:19:24AM -0700, Jens Axboe wr
On Fri, Jan 19, 2018 at 10:38:41AM -0700, Jens Axboe wrote:
> On 1/19/18 9:37 AM, Ming Lei wrote:
> > On Fri, Jan 19, 2018 at 09:27:46AM -0700, Jens Axboe wrote:
> >> On 1/19/18 9:26 AM, Ming Lei wrote:
> >>> On Fri, Jan 19, 2018 at 09:19:24AM -0700, Jens Axboe wr
On Fri, Jan 19, 2018 at 10:09:11AM -0700, Jens Axboe wrote:
> On 1/19/18 10:05 AM, Ming Lei wrote:
> > On Fri, Jan 19, 2018 at 09:52:32AM -0700, Jens Axboe wrote:
> >> On 1/19/18 9:47 AM, Mike Snitzer wrote:
> >>> On Fri, Jan 19 2018 at 11:41am -0500,
> >&
On Fri, Jan 19, 2018 at 09:52:32AM -0700, Jens Axboe wrote:
> On 1/19/18 9:47 AM, Mike Snitzer wrote:
> > On Fri, Jan 19 2018 at 11:41am -0500,
> > Jens Axboe <ax...@kernel.dk> wrote:
> >
> >> On 1/19/18 9:37 AM, Ming Lei wrote:
> >>> On Fri, Ja
On Fri, Jan 19, 2018 at 09:27:46AM -0700, Jens Axboe wrote:
> On 1/19/18 9:26 AM, Ming Lei wrote:
> > On Fri, Jan 19, 2018 at 09:19:24AM -0700, Jens Axboe wrote:
> >> On 1/19/18 9:05 AM, Ming Lei wrote:
> >>> On Fri, Jan 19, 2018 at 08:48:55AM -0700, Jens Axboe wr
On Fri, Jan 19, 2018 at 09:19:24AM -0700, Jens Axboe wrote:
> On 1/19/18 9:05 AM, Ming Lei wrote:
> > On Fri, Jan 19, 2018 at 08:48:55AM -0700, Jens Axboe wrote:
> >> On 1/19/18 8:40 AM, Ming Lei wrote:
> >>>>>> Where does the dm STS_RESOURCE
On Fri, Jan 19, 2018 at 08:48:55AM -0700, Jens Axboe wrote:
> On 1/19/18 8:40 AM, Ming Lei wrote:
> >>>> Where does the dm STS_RESOURCE error usually come from - what's exact
> >>>> resource are we running out of?
> >>>
> >&
On Fri, Jan 19, 2018 at 08:24:06AM -0700, Jens Axboe wrote:
> On 1/19/18 12:26 AM, Ming Lei wrote:
> > On Thu, Jan 18, 2018 at 09:02:45PM -0700, Jens Axboe wrote:
> >> On 1/18/18 7:32 PM, Ming Lei wrote:
> >>> On Thu, Jan 18, 2018 at 01:11:01PM -0700, Jens Axboe wro
On Fri, Jan 19, 2018 at 03:20:13PM +, Bart Van Assche wrote:
> On Fri, 2018-01-19 at 15:26 +0800, Ming Lei wrote:
> > Please see queue_delayed_work_on(), hctx->run_work is shared by all
> > scheduling, once blk_mq_delay_run_hw_queue(100ms) returns, no new
> > sche
On Fri, Jan 19, 2018 at 05:09:46AM +, Bart Van Assche wrote:
> On Fri, 2018-01-19 at 10:32 +0800, Ming Lei wrote:
> > Now most of times both NVMe and SCSI won't return BLK_STS_RESOURCE, and
> > it should be DM-only which returns STS_RESOURCE so often.
>
> That's wrong a
On Thu, Jan 18, 2018 at 09:02:45PM -0700, Jens Axboe wrote:
> On 1/18/18 7:32 PM, Ming Lei wrote:
> > On Thu, Jan 18, 2018 at 01:11:01PM -0700, Jens Axboe wrote:
> >> On 1/18/18 11:47 AM, Bart Van Assche wrote:
> >>>> This is all very tiresome.
> >>
On Thu, Jan 18, 2018 at 05:49:10PM -0700, Jens Axboe wrote:
> On 1/18/18 5:35 PM, Ming Lei wrote:
> > On Thu, Jan 18, 2018 at 05:24:29PM -0700, Jens Axboe wrote:
> >> On 1/18/18 5:18 PM, Ming Lei wrote:
> >>> On Fri, Jan 19, 2018 at 12:14:24AM +, Bart Van Assche
On Thu, Jan 18, 2018 at 01:11:01PM -0700, Jens Axboe wrote:
> On 1/18/18 11:47 AM, Bart Van Assche wrote:
> >> This is all very tiresome.
> >
> > Yes, this is tiresome. It is very annoying to me that others keep
> > introducing so many regressions in such important parts of the kernel.
> > It is
On Thu, Jan 18, 2018 at 05:13:53PM +, Bart Van Assche wrote:
> On Thu, 2018-01-18 at 11:50 -0500, Mike Snitzer wrote:
> > The issue you say it was originally intended to fix _should_ be
> > addressed with this change:
> >
On Fri, Jan 19, 2018 at 12:14:24AM +, Bart Van Assche wrote:
> On Fri, 2018-01-19 at 08:11 +0800, Ming Lei wrote:
> > On Thu, Jan 18, 2018 at 08:37:07AM -0800, Bart Van Assche wrote:
> > > diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
> > > index f16096
queue"
> is cleared, the only solution to avoid that dm-mpath request
> processing stalls is to call blk_mq_delay_run_hw_queue(). Hence
> this patch.
>
> Fixes: ec3eaf9a6731 ("dm mpath: don't call blk_mq_delay_run_hw_queue() in
> case of BLK_STS_RESOURCE")
> Signe
merging via
blk_insert_cloned_request feedback")
Reported-by: Laurence Oberman <lober...@redhat.com>
Reviewed-by: Mike Snitzer <snit...@redhat.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
block/blk-mq.c | 22 ++
1 file changed, 10 insertions(
On Wed, Jan 17, 2018 at 10:49:58PM -0500, Mike Snitzer wrote:
> On Wed, Jan 17 2018 at 10:39pm -0500,
> Ming Lei <ming@redhat.com> wrote:
>
> > On Wed, Jan 17, 2018 at 10:33:35PM -0500, Mike Snitzer wrote:
> > > On Wed, Jan 17 2018 at 7:54P -0500,
> >
On Wed, Jan 17, 2018 at 10:37:23PM -0500, Mike Snitzer wrote:
> On Wed, Jan 17 2018 at 10:25pm -0500,
> Ming Lei <ming@redhat.com> wrote:
>
> > Hi Mike,
> >
> > On Wed, Jan 17, 2018 at 11:25:57AM -0500, Mike Snitzer wrote:
> >
On Wed, Jan 17, 2018 at 10:33:35PM -0500, Mike Snitzer wrote:
> On Wed, Jan 17 2018 at 7:54P -0500,
> Mike Snitzer wrote:
>
> > But sure, I suppose there is something I missed when refactoring Ming's
> > change to get it acceptable for upstream. I went over the mechanical
Hi Mike,
On Wed, Jan 17, 2018 at 11:25:57AM -0500, Mike Snitzer wrote:
> From: Ming Lei <ming@redhat.com>
>
> blk_insert_cloned_request() is called in the fast path of a dm-rq driver
> (e.g. blk-mq request-based DM mpath). blk_insert_cloned_request() uses
> blk_mq_
-by: Ming Lei <ming@redhat.com>
---
Another approach is to do the check after BLK_STS_RESOURCE is returned
from .queue_rq() and BLK_MQ_S_SCHED_RESTART is set, that way may introduce
a bit cost in hot path, and it was V1 of this patch actually, please see
that in the following link:
s...@linux.vnet.ibm.com>
Cc: Christoph Hellwig <h...@lst.de>
Cc: Thomas Gleixner <t...@linutronix.de>
Reported-by: "jianchao.wang" <jianchao.w.w...@oracle.com>
Tested-by: "jianchao.wang" <jianchao.w.w...@oracle.com>
Fixes: 20e4d81393 ("blk-mq: simpl
harmless.
V2:
- fix comment and commit log in patch 1
- use dump_stack() with printk to replace WARN_ON() in patch 2
Thanks,
Ming Lei (2):
blk-mq: make sure hctx->next_cpu is set correctly
blk-mq: avoid one WARN_ON in __blk_mq_run_hw_queue to printk
bl
m.com>
Cc: Christoph Hellwig <h...@lst.de>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: "jianchao.wang" <jianchao.w.w...@oracle.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
block/blk-mq.c | 22 --
1 file changed, 20 insertions(+), 2 del
On Wed, Jan 17, 2018 at 08:46:40AM -0700, Jens Axboe wrote:
> On 1/17/18 5:34 AM, Ming Lei wrote:
> > We know this WARN_ON is harmless and the stack trace isn't useful too,
> > so convert it to printk(), and avoid to confuse people.
>
> I disagree, it is useful to know the e
On Wed, Jan 17, 2018 at 10:17 AM, Bart Van Assche
<bart.vanass...@wdc.com> wrote:
> On Wed, 2018-01-17 at 09:23 +0800, Ming Lei wrote:
>> On Wed, Jan 17, 2018 at 8:03 AM, Bart Van Assche <bart.vanass...@wdc.com>
>> wrote:
>> > On Tue, 2018-01-1
toph Hellwig <h...@lst.de>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: "jianchao.wang" <jianchao.w.w...@oracle.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
block/blk-mq.c | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff
.w...@oracle.com>
Fixes: 20e4d81393 ("blk-mq: simplify queue mapping & schedule with each
possisble CPU")
Signed-off-by: Ming Lei <ming@redhat.com>
---
block/blk-mq.c | 31 +--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/block/b
Hi Jens,
The 1st one fixes one regression caused by 20e4d81393 ("blk-mq: simplify
queue mapping & schedule with each possisble CPU").
The 2nd one add commens about current race, and convert the WARN_ON
into printk(KERN_WARN) since this warning is harmless.
Thanks,
Ming Lei (2):
On Wed, Jan 17, 2018 at 11:07:48AM +0100, Christian Borntraeger wrote:
>
>
> On 01/17/2018 10:57 AM, Ming Lei wrote:
> > Hi Jianchao,
> >
> > On Wed, Jan 17, 2018 at 04:09:11PM +0800, jianchao.wang wrote:
> >> Hi ming
> >>
> >> Thanks for
Hi Jianchao,
On Wed, Jan 17, 2018 at 04:09:11PM +0800, jianchao.wang wrote:
> Hi ming
>
> Thanks for your kindly response.
>
> On 01/17/2018 02:22 PM, Ming Lei wrote:
> > This warning can't be removed completely, for example, the CPU figured
> > in blk_mq_hct
Hi Jianchao,
On Wed, Jan 17, 2018 at 01:24:23PM +0800, jianchao.wang wrote:
> Hi ming
>
> Thanks for your kindly response.
>
> On 01/17/2018 11:52 AM, Ming Lei wrote:
> >> It is here.
> >> __blk_mq_run_hw_queue()
> >>
> >> WARN_ON(!cpu
Hi Jianchao,
On Wed, Jan 17, 2018 at 10:56:13AM +0800, jianchao.wang wrote:
> Hi ming
>
> Thanks for your patch and kindly response.
You are welcome!
>
> On 01/16/2018 11:32 PM, Ming Lei wrote:
> > OK, I got it, and it should have been the only corner case in whic
kernel side continue to complete the IO, such as copying page from
storage range to req(bio) pages.
Seems READ should be fine since it is very similar with the use case
of QEMU postcopy live migration, WRITE can be a bit different, and
maybe need some change on userfaultfd.
--
Ming Lei
ter_queue(q);
> mutex_unlock(>sysfs_lock);
> +
> + kobject_put(_to_dev(disk)->kobj);
> }
> diff --git a/block/elevator.c b/block/elevator.c
> index e87e9b43aba0..4b7957b28a99 100644
> --- a/block/elevator.c
> +++ b/block/elevator.c
> @@ -1080,10 +1080,6 @@ static int __elevator_change(struct request_queue *q,
> const char *name)
> char elevator_name[ELV_NAME_MAX];
> struct elevator_type *e;
>
> - /* Make sure queue is not in the middle of being removed */
> - if (!test_bit(QUEUE_FLAG_REGISTERED, >queue_flags))
> - return -ENOENT;
> -
The above check shouldn't be removed, as I explained above.
--
Ming Lei
On Tue, Jan 16, 2018 at 03:22:18PM +, Don Brace wrote:
> > -Original Message-
> > From: Laurence Oberman [mailto:lober...@redhat.com]
> > Sent: Tuesday, January 16, 2018 7:29 AM
> > To: Thomas Gleixner <t...@linutronix.de>; Ming Lei <ming@redhat.
On Tue, Jan 16, 2018 at 10:31:42PM +0800, jianchao.wang wrote:
> Hi minglei
>
> On 01/16/2018 08:10 PM, Ming Lei wrote:
> >>> - next_cpu = cpumask_next(hctx->next_cpu, hctx->cpumask);
> >>> + next_cpu = cpumask
On Tue, Jan 16, 2018 at 12:25:19PM +0100, Thomas Gleixner wrote:
> On Tue, 16 Jan 2018, Ming Lei wrote:
>
> > On Mon, Jan 15, 2018 at 09:40:36AM -0800, Christoph Hellwig wrote:
> > > On Tue, Jan 16, 2018 at 12:03:43AM +0800, Ming Lei wrote:
> > > > Hi,
> >
Hi Jianchao,
On Tue, Jan 16, 2018 at 06:12:09PM +0800, jianchao.wang wrote:
> Hi Ming
>
> On 01/12/2018 10:53 AM, Ming Lei wrote:
> > From: Christoph Hellwig <h...@lst.de>
> >
> > The previous patch assigns interrupt vectors to all possible CPUs, so
> >
On Tue, Jan 16, 2018 at 9:40 AM, Ming Lei <ming@redhat.com> wrote:
> On Mon, Jan 15, 2018 at 10:29:46AM -0700, Jens Axboe wrote:
>> On 1/15/18 9:58 AM, Ming Lei wrote:
>> > No functional change, just to clean up code a bit, so that the following
>>
gt; Any chance you apply this and re-run your srp_test that triggered the
> lockdep splat?
>
> diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
> index 4a6a40ffd78e..c50e08e9bf17 100644
> --- a/block/blk-sysfs.c
> +++ b/block/blk-sysfs.c
> @@ -952,10 +952,10 @@ void blk_unregister_queue(struct gendisk *disk)
> if (q->request_fn || (q->mq_ops && q->elevator))
> elv_unregister_queue(q);
>
> + mutex_unlock(>sysfs_lock);
> +
> kobject_uevent(>kobj, KOBJ_REMOVE);
> kobject_del(>kobj);
> blk_trace_remove_sysfs(disk_to_dev(disk));
> kobject_put(_to_dev(disk)->kobj);
> -
> - mutex_unlock(>sysfs_lock);
> }
If this patch is required, similar change should be needed in failure path
of blk_register_queue() too.
--
Ming Lei
On Mon, Jan 15, 2018 at 09:40:36AM -0800, Christoph Hellwig wrote:
> On Tue, Jan 16, 2018 at 12:03:43AM +0800, Ming Lei wrote:
> > Hi,
> >
> > These two patches fixes IO hang issue reported by Laurence.
> >
> > 84676c1f21 ("genirq/affinity: assign vectors to
On Mon, Jan 15, 2018 at 12:43:44PM -0500, Mike Snitzer wrote:
> On Mon, Jan 15 2018 at 11:58am -0500,
> Ming Lei <ming@redhat.com> wrote:
>
> > Hi Guys,
> >
> > The 3 paches changes the blk-mq part of blk_insert_cloned_request(),
> > in which we sw
On Mon, Jan 15, 2018 at 10:29:46AM -0700, Jens Axboe wrote:
> On 1/15/18 9:58 AM, Ming Lei wrote:
> > No functional change, just to clean up code a bit, so that the following
> > change of using direct issue for blk_mq_request_bypass_insert() which is
> > needed by D
On Mon, Jan 15, 2018 at 12:15:47PM -0500, Mike Snitzer wrote:
> On Mon, Jan 15 2018 at 11:58am -0500,
> Ming Lei <ming@redhat.com> wrote:
>
> > No functional change, just to clean up code a bit, so that the following
> > change of using direct issue for blk_mq_re
On Mon, Jan 15, 2018 at 06:43:47PM +0100, Thomas Gleixner wrote:
> On Tue, 16 Jan 2018, Ming Lei wrote:
> > These two patches fixes IO hang issue reported by Laurence.
> >
> > 84676c1f21 ("genirq/affinity: assign vectors to all possible CPUs")
> > may cause o
On Mon, Jan 15, 2018 at 09:40:36AM -0800, Christoph Hellwig wrote:
> On Tue, Jan 16, 2018 at 12:03:43AM +0800, Ming Lei wrote:
> > Hi,
> >
> > These two patches fixes IO hang issue reported by Laurence.
> >
> > 84676c1f21 ("genirq/affinity: assign vectors to
used exclusively by request-based DM's blk-mq mode, that enable
> > substantial dm-mpath sequential IO performance improvements.
> >
> > --------
> > Mike Snitzer (4):
> > block: only bdi_unregister() i
off-by: Ming Lei <ming@redhat.com>
---
block/blk-mq.c | 29 ++---
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 1654c9c284d8..ce3965f271e3 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1730,6 +1730,11
No functional change, just to clean up code a bit, so that the following
change of using direct issue for blk_mq_request_bypass_insert() which is
needed by DM can be easier to do.
Signed-off-by: Ming Lei <ming@redhat.com>
---
block/blk-mq.c | 39 +++-
In the following patch, we will use blk_mq_try_issue_directly() for DM
to return the dispatch result, and DM need this informatin to improve
IO merge.
Signed-off-by: Ming Lei <ming@redhat.com>
---
block/blk-mq.c | 23 ++-
1 file changed, 14 insertions(+), 9 del
of block tree
- add missed pg_init_all_paths() in patch 1, according to Bart's review
V2:
- drop 'dm-mpath: cache ti->clone during requeue', which is a bit
too complicated, and not see obvious performance improvement.
- make change on blk-mq part cleaner
Ming Lei
wig <h...@lst.de>
Reported-by: Laurence Oberman <lober...@redhat.com>
Signed-off-by: Ming Lei <ming@redhat.com>
---
kernel/irq/affinity.c | 21 ++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
index 99eb38
: Thomas Gleixner <t...@linutronix.de>
Cc: Christoph Hellwig <h...@lst.de>
Signed-off-by: Ming Lei <ming@redhat.com>
---
kernel/irq/affinity.c | 56 +++
1 file changed, 34 insertions(+), 22 deletions(-)
diff --git a/kernel/irq/a
e function, and prepares
for the fix done in 2nd patch.
The 2nd patch fixes the issue by trying to make sure online CPUs assigned
to irq vector.
Ming Lei (2):
genirq/affinity: move irq vectors spread into one function
genirq/affinity: try best to make sure online CPU is assigned to
vector
On Mon, Jan 15, 2018 at 10:25:01AM -0500, Mike Snitzer wrote:
> On Mon, Jan 15 2018 at 8:27am -0500,
> Stephen Rothwell wrote:
>
> > Hi all,
> >
> > Commit
> >
> > 34e1467da673 ("Revert "genirq/affinity: assign vectors to all possible
> > CPUs"")
> >
> > is missing
On Fri, Jan 12, 2018 at 04:21:33PM +0100, Paolo Valente wrote:
>
>
> > Il giorno 12 gen 2018, alle ore 09:29, Paolo Valente
> > <paolo.vale...@linaro.org> ha scritto:
> >
> >
> >
> >> Il giorno 12 gen 2018, alle ore 05:18, Ming Lei <mi
d until a name is assigned). This is a dm-mpath queue.
>
> There seems to be something wrong in hctx->nr_active.
Then looks it is same with the issue I saw during starting multipathd, and the
following patch should fix that, if there isn't other issue.
https://marc.info/?l=linux-block=151586577400558=2
--
Ming Lei
On Sat, Jan 13, 2018 at 10:45:14PM +0800, Ming Lei wrote:
> On Fri, Jan 12, 2018 at 04:55:34PM -0500, Laurence Oberman wrote:
> > On Fri, 2018-01-12 at 20:57 +, Bart Van Assche wrote:
> > > On Tue, 2018-01-09 at 08:29 -0800, Tejun Heo wrote:
> > > > Currently, bl
equest fields for better cache
layout")
Signed-off-by: Ming Lei <ming@redhat.com>
---
block/blk-mq.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index ef9beca2d117..c1c74d891ce7 100644
--- a/block/blk-mq.c
+++ b/block/blk
On Fri, Jan 12, 2018 at 10:45:57PM +, Bart Van Assche wrote:
> On Thu, 2018-01-11 at 10:23 +0800, Ming Lei wrote:
> > > not sufficient to prevent .queuecommand() calls from scsi_send_eh_cmnd().
> >
> > Given it is error handling, do we need to prevent
On Wed, Jan 10, 2018 at 10:18:17AM -0800, Bart Van Assche wrote:
> The previous two patches guarantee that srp_queuecommand() does not get
> invoked while reconnecting occurs. Hence remove the code from
> srp_queuecommand() that prevents command queueing while reconnecting.
> This patch avoids
On Fri, Jan 12, 2018 at 05:31:17PM -0500, Mike Snitzer wrote:
> On Fri, Jan 12 2018 at 1:54pm -0500,
> Bart Van Assche wrote:
>
> > On Fri, 2018-01-12 at 13:06 -0500, Mike Snitzer wrote:
> > > OK, you have the stage: please give me a pointer to your best
> > >
On Fri, Jan 12, 2018 at 04:55:34PM -0500, Laurence Oberman wrote:
> On Fri, 2018-01-12 at 20:57 +, Bart Van Assche wrote:
> > On Tue, 2018-01-09 at 08:29 -0800, Tejun Heo wrote:
> > > Currently, blk-mq timeout path synchronizes against the usual
> > > issue/completion path using a complex
On Fri, Jan 12, 2018 at 06:54:49PM +, Bart Van Assche wrote:
> On Fri, 2018-01-12 at 13:06 -0500, Mike Snitzer wrote:
> > OK, you have the stage: please give me a pointer to your best
> > explaination of the several.
>
> Since the previous discussion about this topic occurred more than a
(q->queue_lock);
> + queue_flag_clear(QUEUE_FLAG_REGISTERED, q);
> + spin_unlock_irq(q->queue_lock);
>
> + wbt_exit(q);
>
> if (q->mq_ops)
> blk_mq_unregister_dev(disk_to_dev(disk), q);
> @@ -946,4 +951,6 @@ void blk_unregister_queue(struct gendisk *disk)
> kobject_del(>kobj);
> blk_trace_remove_sysfs(disk_to_dev(disk));
> kobject_put(_to_dev(disk)->kobj);
> +
> + mutex_unlock(>sysfs_lock);
> }
Reviewed-by: Ming Lei <ming@redhat.com>
--
Ming
On Fri, Jan 12, 2018 at 04:55:34PM -0500, Laurence Oberman wrote:
> On Fri, 2018-01-12 at 20:57 +, Bart Van Assche wrote:
> > On Tue, 2018-01-09 at 08:29 -0800, Tejun Heo wrote:
> > > Currently, blk-mq timeout path synchronizes against the usual
> > > issue/completion path using a complex
On Fri, Jan 12, 2018 at 07:04:28PM +, Bart Van Assche wrote:
> On Thu, 2018-01-11 at 14:01 +0800, Ming Lei wrote:
> > diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> > index 86bf502a8e51..fcddf5a62581 100644
> > --- a/drivers/md/dm-mpath.c
> >
On Fri, Jan 12, 2018 at 10:06:04AM -0500, Mike Snitzer wrote:
> The original commit e9a823fb34a8b (block: fix warning when I/O elevator
> is changed as request_queue is being removed) is pretty conflated.
> "conflated" because the resource being protected by q->sysfs_lock isn't
> the queue_flags
On Fri, Jan 12, 2018 at 07:53:40AM -0500, Mike Snitzer wrote:
> On Fri, Jan 12 2018 at 2:09am -0500,
> Ming Lei <ming@redhat.com> wrote:
>
> > On Thu, Jan 11, 2018 at 03:14:15PM -0500, Mike Snitzer wrote:
> > > blk_unregister_queue() must protect agains
index 5144ebe046c9..5e3531027b51 100644
> --- a/include/linux/genhd.h
> +++ b/include/linux/genhd.h
> @@ -395,6 +395,11 @@ static inline void add_disk(struct gendisk *disk)
> {
> device_add_disk(NULL, disk);
> }
> +extern void device_add_disk_no_queue_reg(struct device *parent, struct
> gendisk *disk);
> +static inline void add_disk_no_queue_reg(struct gendisk *disk)
> +{
> + device_add_disk_no_queue_reg(NULL, disk);
> +}
>
> extern void del_gendisk(struct gendisk *gp);
> extern struct gendisk *get_gendisk(dev_t dev, int *partno);
> --
> 2.15.0
>
Looks fine:
Reviewed-by: Ming Lei <ming@redhat.com>
--
Ming
On Thu, Jan 11, 2018 at 03:14:15PM -0500, Mike Snitzer wrote:
> blk_unregister_queue() must protect against any modifications of
> q->queue_flags (not just those performed in blk-sysfs.c). Therefore
> q->queue_lock needs to be used rather than q->sysfs_lock.
>
> Fixes: e9a823fb34a8b ("block: fix
On Thu, Jan 11, 2018 at 08:40:54AM -0700, Jens Axboe wrote:
> On 1/11/18 2:41 AM, Paolo Valente wrote:
> >
> >
> >> Il giorno 11 gen 2018, alle ore 10:30, Paolo Valente
> >> <paolo.vale...@linaro.org> ha scritto:
> >>
> >>
> &g
On Thu, Jan 11, 2018 at 08:57:21PM -0500, Mike Snitzer wrote:
> On Thu, Jan 11 2018 at 8:42pm -0500,
> Ming Lei <ming@redhat.com> wrote:
>
> > On Thu, Jan 11, 2018 at 10:37:37PM +, Bart Van Assche wrote:
> > > On Thu, 2018-01-11 at 17:07 -0500, Mi
From: Christoph Hellwig
Currently we assign managed interrupt vectors to all present CPUs. This
works fine for systems were we only online/offline CPUs. But in case of
systems that support physical CPU hotplug (or the virtualized version of
it) this means the additional CPUs
lwig <h...@lst.de>
(merged the three into one because any single one may not work, and fix
selecting online CPUs for scheduler)
Signed-off-by: Ming Lei <ming@redhat.com>
---
block/blk-mq.c | 19 ---
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/block/b
Hi,
This two patches support physical CPU hotplug, so that we can make blk-mq
scale well when new physical CPU is added or removed, and this use case
is normal for VM world.
Also this patchset fixes the following warning reported by Christian
Borntraeger:
On Thu, Jan 11, 2018 at 10:37:37PM +, Bart Van Assche wrote:
> On Thu, 2018-01-11 at 17:07 -0500, Mike Snitzer wrote:
> > Bart, if for some reason we regress for some workload you're able to
> > more readily test we can deal with it. But I'm too encouraged by Ming's
> > performance
On Thu, Jan 11, 2018 at 06:46:54PM +0100, Christoph Hellwig wrote:
> Thanks for looking into this Ming, I had missed it in the my current
> work overload. Can you send the updated series to Jens?
OK, I will post it out soon.
Thanks,
Ming
On Wed, Dec 20, 2017 at 04:47:21PM +0100, Christian Borntraeger wrote:
> On 12/18/2017 02:56 PM, Stefan Haberland wrote:
> > On 07.12.2017 00:29, Christoph Hellwig wrote:
> >> On Wed, Dec 06, 2017 at 01:25:11PM +0100, Christian Borntraeger wrote:
> >> t > commit
In the following patch, we will use blk_mq_try_issue_directly() for DM
to return the dispatch result, and DM need this informatin to improve
IO merge.
Signed-off-by: Ming Lei <ming@redhat.com>
---
block/blk-mq.c | 23 ++-
1 file changed, 14 insertions(+), 9 del
off-by: Ming Lei <ming@redhat.com>
---
block/blk-core.c | 3 +--
block/blk-mq.c | 34 ++
block/blk-mq.h | 3 +++
drivers/md/dm-rq.c | 19 ---
4 files changed, 50 insertions(+), 9 deletions(-)
diff --git a/block/blk-core.c b/block/b
No functional change, just to clean up code a bit, so that the following
change of using direct issue for blk_mq_request_bypass_insert() which is
needed by DM can be easier to do.
Signed-off-by: Ming Lei <ming@redhat.com>
---
block/blk-mq.c | 39 +++-
gets improved.
Signed-off-by: Ming Lei <ming@redhat.com>
---
drivers/md/dm-mpath.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 86bf502a8e51..fcddf5a62581 100644
--- a/drivers/md/dm-mpath.c
+++ b/d
makes sure that dm-rq returns BLK_STS_RESOURCE to blk-mq
only when underlying queue is out of resource, so we switch to return
DM_MAPIO_DELAY_REQUEU if either MPATHF_QUEUE_IO or MPATHF_PG_INIT_REQUIRED
is set in multipath_clone_and_map().
Signed-off-by: Ming Lei <ming@redhat.com>
---
driv
- add missed pg_init_all_paths() in patch 1, according to Bart's review
V2:
- drop 'dm-mpath: cache ti->clone during requeue', which is a bit
too complicated, and not see obvious performance improvement.
- make change on blk-mq part cleaner
Ming Lei (5):
dm-mp
0;
> }
>
> @@ -2121,7 +2130,6 @@ EXPORT_SYMBOL_GPL(dm_device_name);
>
> static void __dm_destroy(struct mapped_device *md, bool wait)
> {
> - struct request_queue *q = dm_get_md_queue(md);
> struct dm_table *map;
> int srcu_idx;
>
> @@ -2132,7 +2140,7 @@ static void __dm_destroy(struct mapped_device *md, bool
> wait)
> set_bit(DMF_FREEING, >flags);
> spin_unlock(&_minor_lock);
>
> - blk_set_queue_dying(q);
> + blk_set_queue_dying(md->queue);
>
> if (dm_request_based(md) && md->kworker_task)
> kthread_flush_worker(>kworker);
> --
> 2.15.0
>
Pass some of my block/DM sanity test, and blk-mq debugfs can be used
with this patch on DM-MPATH.
Tested-by: Ming Lei <ming@redhat.com>
--
Ming
T ((1 << QUEUE_FLAG_IO_STAT) |\
>(1 << QUEUE_FLAG_SAME_COMP)| \
> --
> 2.15.0
This way is safe for all other devices, even for DM it is safe too since
block does deal with NULL .make_request_fn well for legacy path.
Maybe QUEUE_FLAG_DEFER_REG can be renamed as QUEUE_FLAG_REG_BY_DRIVER,
but not a big deal, so
Reviewed-by: Ming Lei <ming@redhat.com>
--
Ming
di_unregister(disk->queue->backing_dev_info);
> blk_unregister_queue(disk);
> } else {
> WARN_ON(1);
> --
> 2.15.0
>
Reviewed-by: Ming Lei <ming@redhat.com>
--
Ming
On Wed, Jan 10, 2018 at 10:18:16AM -0800, Bart Van Assche wrote:
> Several SCSI transport and LLD drivers surround code that does not
> tolerate concurrent calls of .queuecommand() with scsi_target_block() /
> scsi_target_unblock(). These last two functions use
> blk_mq_quiesce_queue() /
701 - 800 of 2196 matches
Mail list logo