Re: [PATCH v2 2/2] block: virtio-blk: support multi virt queues per virtio-blk device

2014-06-26 Thread Ming Lei
On Thu, Jun 26, 2014 at 3:45 PM, Michael S. Tsirkin wrote: > On Thu, Jun 26, 2014 at 10:08:46AM +0800, Ming Lei wrote: >> Firstly this patch supports more than one virtual queues for virtio-blk >> device. >> >> Secondly this patch maps the virtual queue to blk-mq's

[PATCH v3 2/2] block: virtio-blk: support multi virt queues per virtio-blk device

2014-06-26 Thread Ming Lei
Firstly this patch supports more than one virtual queues for virtio-blk device. Secondly this patch maps the virtual queue to blk-mq's hardware queue. With this approach, both scalability and performance can be improved. Signed-off-by: Ming Lei --- drivers/block/virtio_blk.c |

[PATCH v3 1/2] include/uapi/linux/virtio_blk.h: introduce feature of VIRTIO_BLK_F_MQ

2014-06-26 Thread Ming Lei
feature of VIRTIO_BLK_F_MQ so that more than one virtual queues can be used to virtio-blk device, then above problems can be solved or eased. Signed-off-by: Ming Lei --- include/uapi/linux/virtio_blk.h |5 + 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/virtio_blk.h b/include

[PATCH v3 0/2] block: virtio-blk: support multi vq per virtio-blk

2014-06-26 Thread Ming Lei
same cache line - make each queue's name different V1: - remove RFC since no one objects - add '__u8 unused' for pending as suggested by Rusty - use virtio_cread_feature() directly, suggested by Rusty Thanks, -- Ming Lei -- To unsubscribe from this lis

Re: [PATCH v3 0/2] block: virtio-blk: support multi vq per virtio-blk

2014-06-26 Thread Ming Lei
On Thu, Jun 26, 2014 at 5:41 PM, Ming Lei wrote: > Hi, > > These patches try to support multi virtual queues(multi-vq) in one > virtio-blk device, and maps each virtual queue(vq) to blk-mq's > hardware queue. > > With this approach, both scalability and performance on v

Re: [PATCH 5/7] blk-mq: initialize request on allocation

2014-04-17 Thread Ming Lei
-- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ Thanks, -- Ming Lei -

Re: [PATCH 5/7] blk-mq: initialize request on allocation

2014-04-17 Thread Ming Lei
On Thu, Apr 17, 2014 at 10:57 PM, Christoph Hellwig wrote: > On Thu, Apr 17, 2014 at 10:54:23PM +0800, Ming Lei wrote: >> On Mon, Apr 14, 2014 at 4:30 PM, Christoph Hellwig wrote: >> > If we want to share tag and request allocation between queues we cannot >> > ini

[PATCH next 0/4] blk-mq: misc changes

2014-04-17 Thread Ming Lei
Hi, Three are fixes, and another one is cleanup. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FA

[PATCH next 4/4] blk-mq: initialize req->q in allocation

2014-04-17 Thread Ming Lei
gned-off-by: Ming Lei --- block/blk-mq.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 1eff3d9..b7a51ed 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -82,7 +82,6 @@ static struct request *__blk_mq_alloc_request(struct blk_mq_h

[PATCH next 1/4] blk-mq: free hctx->ctx_map when init failed

2014-04-17 Thread Ming Lei
Avoid memory leak in the failure path. Signed-off-by: Ming Lei --- block/blk-mq.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index ee225cc..5fbbb22 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1289,6 +1289,7 @@ static int blk_mq_init_hw_queues

[PATCH next 3/4] blk-mq: user (1 << order) to implement order_to_size()

2014-04-17 Thread Ming Lei
Signed-off-by: Ming Lei --- block/blk-mq.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index baff2d0..1eff3d9 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1130,12 +1130,7 @@ static void blk_mq_free_rq_map(struct

[PATCH next 2/4] blk-mq: fix allocation of set->tags

2014-04-17 Thread Ming Lei
type of set->tags is struct blk_mq_tags **. Signed-off-by: Ming Lei --- block/blk-mq.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 5fbbb22..baff2d0 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1537,7 +1537,7 @@

Re: [PATCH next 3/4] blk-mq: user (1 << order) to implement order_to_size()

2014-04-18 Thread Ming Lei
On Fri, Apr 18, 2014 at 3:03 AM, Jörg-Volker Peetz wrote: > Ming Lei wrote, on 04/17/2014 17:49: >> Signed-off-by: Ming Lei >> --- >> block/blk-mq.c |7 +-- >> 1 file changed, 1 insertion(+), 6 deletions(-) >> >> diff --git a/block/blk-mq.c b/b

Re: [PATCH next 3/4] blk-mq: user (1 << order) to implement order_to_size()

2014-04-18 Thread Ming Lei
.h CALLscripts/checksyscalls.sh CHK include/generated/compile.h CC block/blk-mq.o CHK kernel/config_data.h LD block/built-in.o LINKvmlinux LD vmlinux.o MODPOST vmlinux.o Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe

[PATCH v1 next 3/4] blk-mq: user (1 << order) to implement order_to_size()

2014-04-19 Thread Ming Lei
Cc: Jörg-Volker Peetz Cc: Max Filippov Signed-off-by: Ming Lei --- block/blk-mq.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index c277797..3a560a4 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1130,12 +1130,7 @@ static

[PATCH v1 next 4/4] blk-mq: initialize req->q in allocation

2014-04-19 Thread Ming Lei
gned-off-by: Ming Lei --- block/blk-mq.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 3a560a4..c26b3be 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -82,7 +82,6 @@ static struct request *__blk_mq_alloc_request(struct blk_mq_h

[PATCH v1 next 1/4] blk-mq: free hctx->ctx_map when init failed

2014-04-19 Thread Ming Lei
Avoid memory leak in the failure path. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei --- block/blk-mq.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index ee225cc..5fbbb22 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1289,6 +1289,7

[PATCH v1 next 2/4] blk-mq: fix allocation of set->tags

2014-04-19 Thread Ming Lei
type of set->tags is struct blk_mq_tags **. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei --- block/blk-mq.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 5fbbb22..c277797 100644 --- a/block/blk-mq.c +++ b/block/blk-m

[PATCH v1 next 0/4] blk-mq: misc changes

2014-04-19 Thread Ming Lei
Hi, Three of them are fixes, another one is cleanup. V1: - line break(2/4) - use explicit cast(3/4) Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo inf

Re: [PATCH v1 next 0/4] blk-mq: misc changes

2014-04-21 Thread Ming Lei
On Tue, Apr 22, 2014 at 9:03 AM, Jens Axboe wrote: > On 2014-04-19 04:00, Ming Lei wrote: >> >> Hi, >> >> Three of them are fixes, another one is cleanup. >> >> V1: >> - line break(2/4) >> - use explicit cast(3/4) > > >

[PATCH 0/9] block/aio: loop mq conversion and kernel aio

2014-07-23 Thread Ming Lei
Hi, The first 6 patches convert current loop driver into blk-mq, and loop's scalability can get improved a lot. The 7th and 8th patches introduce kernel AIO support, most of is borrow from Dave's work last year, and thanks to ITER_BVEC, now it is easier to implement kernel AIO now. The 9th patch

[PATCH 1/9] blk-mq: export blk_mq_freeze_queue and blk_mq_unfreeze_queue

2014-07-23 Thread Ming Lei
It is handy to use the two helpers for switching backend file in loop driver, so export them. Signed-off-by: Ming Lei --- block/blk-mq.c |4 +++- block/blk-mq.h |1 - include/linux/blk-mq.h |2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/block

[PATCH 3/9] block: loop: convert to blk-mq

2014-07-23 Thread Ming Lei
as cleanup too. Signed-off-by: Ming Lei --- drivers/block/loop.c | 294 ++ drivers/block/loop.h | 14 +-- 2 files changed, 137 insertions(+), 171 deletions(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 6cb1beb..1af5265 100644

[PATCH 2/9] blk-mq: introduce init_flush_rq_fn callback in 'blk_mq_ops'

2014-07-23 Thread Ming Lei
Currently pdu of the flush rq is simlpy copied from another rq, it isn't enough to initialize pointer field well, so introduce the callback for driver to handle the case easily. Signed-off-by: Ming Lei --- block/blk-mq.c |7 +++ include/linux/blk-mq.h | 11 +++ 2

[PATCH 4/9] block: loop: say goodby to bio

2014-07-23 Thread Ming Lei
Switch to block request completely. Signed-off-by: Ming Lei --- drivers/block/loop.c | 46 -- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 1af5265..0729c3d 100644 --- a/drivers

[PATCH 5/9] block: loop: introduce lo_discard() and lo_req_flush()

2014-07-23 Thread Ming Lei
No behaviour change, just move the handling for REQ_DISCARD and REQ_FLUSH in these two functions. Signed-off-by: Ming Lei --- drivers/block/loop.c | 73 +++--- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/drivers/block/loop.c b

[PATCH 6/9] block: loop: don't handle REQ_FUA explicitly

2014-07-23 Thread Ming Lei
block core handles REQ_FUA by its flush state machine, so won't do it in loop explicitly. Signed-off-by: Ming Lei --- drivers/block/loop.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 96f945e..96

[PATCH 7/9] aio: add aio_kernel_() interface

2014-07-23 Thread Ming Lei
ve Kleikamp Cc: Benjamin LaHaise Cc: Alexander Viro Cc: linux-fsde...@vger.kernel.org Cc: linux-...@kvack.org (open list:AIO) Signed-off-by: Ming Lei --- fs/aio.c| 114 +++ include/linux/aio.h | 21 +- 2 files changed, 134 i

[PATCH 8/9] fd/direct-io: introduce should_dirty for kernel aio

2014-07-23 Thread Ming Lei
For pages from kernel AIO, it is required to dirty them before direct IO. The idea is borrowd from Dave previous post. Cc: Zach Brown Cc: Dave Kleikamp Cc: Benjamin LaHaise Cc: Alexander Viro Cc: linux-fsde...@vger.kernel.org Signed-off-by: Ming Lei --- fs/direct-io.c |9 ++--- 1

[PATCH 9/9] block: loop: support to submit I/O via kernel aio based

2014-07-23 Thread Ming Lei
Part of the patch is based on Dave's previous post. It is easy to observe that loop block device thoughput can be increased by > 100% in single job randread, libaio engine, direct I/O fio test. Cc: Zach Brown Cc: Dave Kleikamp Cc: Benjamin LaHaise Signed-off-by: Ming Lei --- drive

Re: [PATCH 7/9] aio: add aio_kernel_() interface

2014-07-23 Thread Ming Lei
On Thu, Jul 24, 2014 at 7:16 AM, Zach Brown wrote: > On Thu, Jul 24, 2014 at 06:55:28AM +0800, Ming Lei wrote: >> From: Dave Kleikamp >> >> This adds an interface that lets kernel callers submit aio iocbs without >> going through the user space syscalls. This lets

Re: [PATCH 9/9] block: loop: support to submit I/O via kernel aio based

2014-07-23 Thread Ming Lei
On Thu, Jul 24, 2014 at 6:55 AM, Ming Lei wrote: > Part of the patch is based on Dave's previous post. > > It is easy to observe that loop block device thoughput > can be increased by > 100% in single job randread, > libaio engine, direct I/O fio test. > > Cc: Za

Re: [PATCH v2] firmware loader: allow disabling of udev as firmware loader

2014-06-05 Thread Ming Lei
ELL_RBU=y > and udev without the firmware loading support, but I don't have the > hardware to test the lattice/dell drivers, so additional testing would > be appreciated. > > Reviewed-by: Tom Gundersen > Cc: Ming Lei > Cc: Greg Kroah-Hartman > Cc: Abhay

Re: [Regression] commit 8a4aeec8d(libata/ahci: accommodate tag ordered controllers)

2014-06-05 Thread Ming Lei
On Thu, Jun 5, 2014 at 9:12 PM, Dan Williams wrote: > On Thu, Jun 5, 2014 at 1:53 AM, Ming Lei wrote: >> Hi Dan and Tejun, >> >> Looks the commit 8a4aeec8d(libata/ahci: accommodate tag ordered >> controllers) causes below sata failure[1] on APM AHCI controller. >>

Re: [PATCH v2] firmware loader: allow disabling of udev as firmware loader

2014-06-05 Thread Ming Lei
On Thu, Jun 5, 2014 at 8:25 PM, Tom Gundersen wrote: > > On 5 Jun 2014 14:18, "Ming Lei" wrote: >> >> On Wed, Jun 4, 2014 at 11:48 PM, Takashi Iwai wrote: >> > [The patch was originally proposed by Tom Gundersen, and rewritten >> > afterwards by me

Re: [PATCH v2] firmware loader: allow disabling of udev as firmware loader

2014-06-05 Thread Ming Lei
On Thu, Jun 5, 2014 at 9:47 PM, Takashi Iwai wrote: > At Thu, 5 Jun 2014 21:31:56 +0800, > Ming Lei wrote: >> >> On Thu, Jun 5, 2014 at 8:25 PM, Tom Gundersen wrote: >> > >> > On 5 Jun 2014 14:18, "Ming Lei" wrote: >> >> >> >&

Re: blk-mq: bitmap tag: performance degradation?

2014-06-05 Thread Ming Lei
ith a small device that > supported msi-x and could be used as an irq trigger :-) Maybe null_blk at IRQ_TIMER mode is more close to a real device, and I guess the result may be different with mode IRQ_NONE/IRQ_SOFTIRQ. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line &qu

Re: [PATCH v2] firmware loader: allow disabling of udev as firmware loader

2014-06-05 Thread Ming Lei
On Thu, Jun 5, 2014 at 10:05 PM, Takashi Iwai wrote: > At Thu, 5 Jun 2014 21:59:52 +0800, > Ming Lei wrote: >> >> On Thu, Jun 5, 2014 at 9:47 PM, Takashi Iwai wrote: >> > At Thu, 5 Jun 2014 21:31:56 +0800, >> > Ming Lei wrote: >> >> >> &

Re: [PATCH v2] firmware loader: allow disabling of udev as firmware loader

2014-06-05 Thread Ming Lei
On Thu, Jun 5, 2014 at 10:32 PM, Tom Gundersen wrote: > On Thu, Jun 5, 2014 at 4:24 PM, Ming Lei wrote: >> On Thu, Jun 5, 2014 at 10:05 PM, Takashi Iwai wrote: >>> At Thu, 5 Jun 2014 21:59:52 +0800, >>> Ming Lei wrote: >>>> >>>> On Thu, Jun 5,

Re: [PATCH v2] firmware loader: allow disabling of udev as firmware loader

2014-06-05 Thread Ming Lei
On Thu, Jun 5, 2014 at 11:15 PM, Tom Gundersen wrote: > On Thu, Jun 5, 2014 at 4:54 PM, Ming Lei wrote: >>> Ubuntu currently enables the firmware loader in both the kernel and in >>> udev, so would not yet have a problem here at the moment. However, I >>> spoke w

Re: blk-mq: bitmap tag: performance degradation?

2014-06-05 Thread Ming Lei
On Fri, Jun 6, 2014 at 1:17 AM, Jens Axboe wrote: > On 06/05/2014 08:16 AM, Ming Lei wrote: >> On Thu, Jun 5, 2014 at 10:03 PM, Jens Axboe wrote: >>> On 2014-06-05 08:01, Alexander Gordeev wrote: >>>> >>>> On Wed, Jun 04, 2014 at 08:18:42AM -0600, Jens A

Re: [Regression] commit 8a4aeec8d(libata/ahci: accommodate tag ordered controllers)

2014-06-05 Thread Ming Lei
Hi Tejun, On Thu, Jun 5, 2014 at 9:41 PM, Tejun Heo wrote: > Hello, > > (cc'ing ahci_xgene folks) > > On Thu, Jun 05, 2014 at 09:24:04PM +0800, Ming Lei wrote: >> On Thu, Jun 5, 2014 at 9:12 PM, Dan Williams >> wrote: >> > On Thu, Jun 5, 2014 at 1:53 AM

Re: blk-mq: bitmap tag: performance degradation?

2014-06-05 Thread Ming Lei
On Fri, Jun 6, 2014 at 9:55 AM, Jens Axboe wrote: > On 2014-06-05 17:33, Ming Lei wrote: >> >> On Fri, Jun 6, 2014 at 1:17 AM, Jens Axboe wrote: >>> >>> On 06/05/2014 08:16 AM, Ming Lei wrote: >>>> >>>> On Thu, Jun 5, 2014 at 10:

Re: blk-mq: bitmap tag: performance degradation?

2014-06-05 Thread Ming Lei
On Fri, Jun 6, 2014 at 9:55 AM, Jens Axboe wrote: > On 2014-06-05 17:33, Ming Lei wrote: >> >> On Fri, Jun 6, 2014 at 1:17 AM, Jens Axboe wrote: >>> >>> On 06/05/2014 08:16 AM, Ming Lei wrote: >>>> >>>> On Thu, Jun 5, 2014 at 10:

Re: [Regression] commit 8a4aeec8d(libata/ahci: accommodate tag ordered controllers)

2014-06-05 Thread Ming Lei
On Fri, Jun 6, 2014 at 10:57 AM, Dan Williams wrote: > On Fri, 2014-06-06 at 09:47 +0800, Ming Lei wrote: >> Hi Tejun, >> >> On Thu, Jun 5, 2014 at 9:41 PM, Tejun Heo wrote: >> > Hello, >> > >> > (cc'ing ahci_xgene folks) >> >

Re: [PATCH v2] firmware loader: allow disabling of udev as firmware loader

2014-06-06 Thread Ming Lei
On Fri, Jun 6, 2014 at 10:15 PM, Tom Gundersen wrote: > On Fri, Jun 6, 2014 at 4:03 PM, Takashi Iwai wrote: >> At Fri, 6 Jun 2014 07:00:22 +0800, >> Ming Lei wrote: >>> >>> On Thu, Jun 5, 2014 at 11:15 PM, Tom Gundersen wrote: >>> > On

Re: [Regression] commit 8a4aeec8d(libata/ahci: accommodate tag ordered controllers)

2014-06-07 Thread Ming Lei
Hi Suman, Could you forward the patches to me so that I can give a test? I don't subscribe to linux-ide list. Thanks, -- Ming Lei On Sat, Jun 7, 2014 at 5:33 AM, Suman Tripathi wrote: > Hi , > > I have just posted 3 patches "ata: Fix the dma state machine lockup for AP

Re: [PATCH v6] NVMe: conversion to blk-mq

2014-06-08 Thread Ming Lei
nvme :00:07.0: completed id 0 twice on queue 0 when running fio randread(libaio, iodepth:64) with more than 3 jobs. And looks no such failure when jobs is 1 or 2. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [Regression] commit 8a4aeec8d(libata/ahci: accommodate tag ordered controllers)

2014-06-08 Thread Ming Lei
hment, but I will look at / test your next version. Also, Loc mentioned that only your early chip has the problem, I am wondering why you don't take Dan's approach just for the affected chips? Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-ker

Re: [PATCH v6] NVMe: conversion to blk-mq

2014-06-09 Thread Ming Lei
On Mon, Jun 9, 2014 at 2:00 PM, Matias Bjørling wrote: > On Mon, Jun 9, 2014 at 6:35 AM, Ming Lei wrote: >> On Fri, Jun 6, 2014 at 8:20 PM, Matias Bjørling wrote: >>> This converts the current NVMe driver to utilize the blk-mq layer. >> >> Looks it can't

Re: [PATCH v6] NVMe: conversion to blk-mq

2014-06-09 Thread Ming Lei
On Mon, Jun 9, 2014 at 3:50 PM, Ming Lei wrote: > On Mon, Jun 9, 2014 at 2:00 PM, Matias Bjørling wrote: >> On Mon, Jun 9, 2014 at 6:35 AM, Ming Lei wrote: >>> On Fri, Jun 6, 2014 at 8:20 PM, Matias Bjørling wrote: >>>> This converts the current NVMe driv

Re: [PATCH v6] NVMe: conversion to blk-mq

2014-06-09 Thread Ming Lei
On Mon, Jun 9, 2014 at 3:53 PM, Ming Lei > > After pulling from your tree, the problem still persists. > > I test nvme over qemu, and both linus/next tree can > work well with qemu nvme. One problem I found is that rq->start_time isn't set after you cleared IO_STAT

Re: [PATCH v6] NVMe: conversion to blk-mq

2014-06-09 Thread Ming Lei
On Mon, Jun 9, 2014 at 10:08 PM, Jens Axboe wrote: > On 2014-06-08 22:35, Ming Lei wrote: >> >> On Fri, Jun 6, 2014 at 8:20 PM, Matias Bjørling wrote: >>> >>> This converts the current NVMe driver to utilize the blk-mq layer. >> >> >> Looks it

Re: [PATCH v6] NVMe: conversion to blk-mq

2014-06-09 Thread Ming Lei
On Mon, Jun 9, 2014 at 11:10 PM, Jens Axboe wrote: > On 2014-06-09 09:07, Ming Lei wrote: > > You are right, I didn't get to the bottom of the thread first. > Might be better to just have ->start_time set always, regardless of io stats > being enabled or not. Yes, just li

Re: [PATCH v6] NVMe: conversion to blk-mq

2014-06-09 Thread Ming Lei
f3d >> >> >> So without this patch we can get duplicate completions? That could >> explain the issues that Robert sees with scsi-mq and hpsa.. Use-after-free may cause duplicate completions. BTW, is the scsi-mq patchset public now? Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] blk-mq: add timer in blk_mq_start_request

2014-06-09 Thread Ming Lei
, there is no such guarantee at all. Signed-off-by: Ming Lei --- block/blk-mq.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index a6ee74e..bf6e13d 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -406,16 +40

[PATCH] blk-mq: kick requeue list in blk_mq_requeue_request()

2014-06-09 Thread Ming Lei
. Cc: Matias Bjørling Cc: Christoph Hellwig Signed-off-by: Ming Lei --- block/blk-mq.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index cb4c785..4c78539 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -462,6 +462,7 @@ void blk_mq_requeue_request

Re: [PATCH] blk-mq: kick requeue list in blk_mq_requeue_request()

2014-06-10 Thread Ming Lei
On Tue, Jun 10, 2014 at 7:28 PM, Christoph Hellwig wrote: > On Tue, Jun 10, 2014 at 12:52:05PM +0800, Ming Lei wrote: >> blk_mq_requeue_request() should kick off the requeue list so >> that the request can be scheduled to queue finally. >> >> In nvme conversion patch,

Re: [PATCH v6] NVMe: conversion to blk-mq

2014-06-10 Thread Ming Lei
On Tue, Jun 10, 2014 at 7:35 PM, Christoph Hellwig wrote: > On Mon, Jun 09, 2014 at 11:35:00PM +0800, Ming Lei wrote: >> >> Use-after-free may cause duplicate completions. >> >> BTW, is the scsi-mq patchset public now? > > It always has been. I've posted it

Re: [PATCH] blk-mq: kick requeue list in blk_mq_requeue_request()

2014-06-10 Thread Ming Lei
On Tue, Jun 10, 2014 at 8:45 PM, Christoph Hellwig wrote: > On Tue, Jun 10, 2014 at 07:45:47PM +0800, Ming Lei wrote: >> OK, but the API name is a bit confusing, and that is easy to cause >> misuse, like in nvme. >> >> Also requeue one request in completion handler

Re: hanging aio process

2014-06-11 Thread Ming Lei
On Wed, Jun 4, 2014 at 1:24 PM, Gu Zheng wrote: > Hi Guys, > What's the status of this issue? Has it been fixed? Yes, it is fixed by percpu_ref, and is merged to 3.15 already. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&q

Re: [PATCH v6] NVMe: conversion to blk-mq

2014-06-11 Thread Ming Lei
On Mon, Jun 9, 2014 at 6:40 PM, Ming Lei wrote: > The root cause is that device returns > NVME_INTERNAL_DEV_ERROR(0x6) with your conversion > patch. The above problem is caused by qemu not handling -EAGAIN from io_submit(), so please ignore the report. Thanks, -- Ming Lei -- To un

Re: [PATCH 1/1] firmware: read firmware size using i_size_read()

2014-06-13 Thread Ming Lei
size = i_size_read(file_inode(file)); > if (size <= 0) > return -EINVAL; > buf = vmalloc(size); > -- fw_file_size() not only return size of the file, but also check if it is a regular file, and its size. Thanks, -- Ming Lei -- To unsubscribe

Re: [PATCH v2 1/1] firmware: read firmware size using i_size_read()

2014-06-13 Thread Ming Lei
On Fri, Jun 13, 2014 at 11:09 PM, Dmitry Kasatkin wrote: > There is no need to read attr because inode structure contains size > of the file. Use i_size_read() instead. > > Signed-off-by: Dmitry Kasatkin Acked-by: Ming Lei Thanks, -- Ming Lei -- To unsubscribe from this list: s

[RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device

2014-06-13 Thread Ming Lei
Firstly this patch supports more than one virtual queues for virtio-blk device. Secondly this patch maps the virtual queue to blk-mq's hardware queue. With this approach, both scalability and performance problem can be improved. Signed-off-by: Ming Lei --- drivers/block/virtio_blk.c |

[RFC PATCH 1/2] include/uapi/linux/virtio_blk.h: introduce feature of VIRTIO_BLK_F_MQ

2014-06-13 Thread Ming Lei
of VIRTIO_BLK_F_MQ so that more than one virtual queues can be used to virtio-blk device, then above problems can be solved or eased. Signed-off-by: Ming Lei --- include/uapi/linux/virtio_blk.h |4 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/virtio_blk.h b/include

[RFC PATCH 0/2] block: virtio-blk: support multi vq per virtio-blk

2014-06-13 Thread Ming Lei
feature -- top thoughput: 199K iops So even for one quadcore VM, if the virtqueue number is increased from 1 to 2, both scalability and performance can get improved a lot. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the b

Re: [PATCH] block: mq flush: fix race between IPI handler and mq flush worker

2014-05-20 Thread Ming Lei
On Tue, May 20, 2014 at 11:23 PM, Christoph Hellwig wrote: > On Tue, May 20, 2014 at 11:20:25AM +0800, Ming Lei wrote: >> - the conflict on the two structures just happens with flush >> requests because rq->requeue_work is only used to queue >> flush requests > >

Re: [PATCH] block: mq flush: fix race between IPI handler and mq flush worker

2014-05-20 Thread Ming Lei
On Wed, May 21, 2014 at 1:36 PM, Christoph Hellwig wrote: > On Wed, May 21, 2014 at 01:16:14PM +0800, Ming Lei wrote: >> I am wondering if virtio-blk is trivial block driver, :-) > > It's about as simple as it gets. > >> > The scsi-mq work that I plant to sub

Re: [jet.c...@intel.com: [bio] kernel BUG at drivers/block/virtio_blk.c:166!]

2014-05-26 Thread Ming Lei
l segment number is bigger than queue_max_segments(), so wondering if blk_recount_segments() can always decrease physical segment number. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More major

Re: [PATCH V3] bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-05-27 Thread Ming Lei
page can be merged to last segment, it should have been covered by code in branch of 'if (bio->bi_vcnt > 0) ...', shouldn't it? Or maybe it is better to make that code cover your case since looks your case is similar with that one according to your commit log. Thanks, -- M

Re: [PATCH V3] bio: modify __bio_add_page() to accept pages that don't start a new segment

2014-05-27 Thread Ming Lei
On Tue, May 27, 2014 at 7:58 PM, Maurizio Lombardi wrote: > On Tue, May 27, 2014 at 06:15:45PM +0800, Ming Lei wrote: >> >> If the page can be merged to last segment, it should have been >> covered by code in branch of 'if (bio->bi_vcnt > 0) ...', shouldn'

[PATCH 1/3] blk-mq: fix leak of hctx->ctx_map

2014-05-27 Thread Ming Lei
hctx->ctx_map should have been freed inside blk_mq_free_queue(). Signed-off-by: Ming Lei --- block/blk-mq.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index 54e7886..ba39fa7 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1841,6 +1841,7 @@ v

[PATCH 0/3] blk-mq: fix leak of hctx->ctx_map

2014-05-27 Thread Ming Lei
Misc changes. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH 2/3] blk-mq: avoid code duplication

2014-05-27 Thread Ming Lei
blk_mq_exit_hw_queues() and blk_mq_free_hw_queues() are introduced to avoid code duplication. Signed-off-by: Ming Lei --- block/blk-mq.c | 60 ++-- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/block/blk-mq.c b/block/blk

[PATCH 3/3] block: only allocate/free mq_usage_counter in blk-mq

2014-05-27 Thread Ming Lei
The percpu counter is only used for blk-mq, so move its allocation and free inside blk-mq, and don't allocate it for legacy queue device. Signed-off-by: Ming Lei --- block/blk-core.c |7 +-- block/blk-mq.c|5 + block/blk-sysfs.c |2 -- 3 files changed, 6 inser

Re: [PATCH 0/3] blk-mq: fix leak of hctx->ctx_map

2014-05-27 Thread Ming Lei
On Tue, May 27, 2014 at 10:36 PM, Jens Axboe wrote: > On 05/27/2014 08:20 AM, Ming Lei wrote: >> Misc changes. > > All look good, however they don't apply to the current for-3.16/core > branch. What are they against? I hand applied 1, but could you > regenerate 2+3 aga

[PATCH v1 0/3] blk-mq: misc changes

2014-05-27 Thread Ming Lei
Hi, Misc changes, and the v1 is against the latest for-next branch of block tree. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

[PATCH v1 1/3] blk-mq: fix leak of hctx->ctx_map

2014-05-27 Thread Ming Lei
hctx->ctx_map should have been freed inside blk_mq_free_queue(). Signed-off-by: Ming Lei --- block/blk-mq.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index 62082c5..dad22a9 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1846,6 +1846,7 @@ v

[PATCH v1 3/3] block: only allocate/free mq_usage_counter in blk-mq

2014-05-27 Thread Ming Lei
The percpu counter is only used for blk-mq, so move its allocation and free inside blk-mq, and don't allocate it for legacy queue device. Signed-off-by: Ming Lei --- block/blk-core.c |7 +-- block/blk-mq.c|5 + block/blk-sysfs.c |2 -- 3 files changed, 6 inser

[PATCH v1 2/3] blk-mq: avoid code duplication

2014-05-27 Thread Ming Lei
blk_mq_exit_hw_queues() and blk_mq_free_hw_queues() are introduced to avoid code duplication. Signed-off-by: Ming Lei --- block/blk-mq.c | 61 ++-- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/block/blk-mq.c b/block/blk

Re: [PATCH] block: mq flush: fix race between IPI handler and mq flush worker

2014-05-27 Thread Ming Lei
d it. Looks writing over ext4(especially sync writing) can survive with Christoph's patch now, thanks Christoph. Reported-and-tested-by: Ming Lei Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord..

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Ming Lei
why bi_iter.bi_size need to be decreased by 'len'? In the failure path, it wasn't added by 'len', was it? Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Ming Lei
On Wed, May 28, 2014 at 11:42 PM, Ming Lei wrote: > Hi Dongsu, > > On Wed, May 28, 2014 at 11:09 PM, Dongsu Park > wrote: >> From: Dongsu Park >> >> Commit 3979ef4dcf3d1de55a560a3a4016c30a835df44d ("bio-modify- >> __bio_add_page-to-accept-pages-that-dont

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Ming Lei
On Thu, May 29, 2014 at 1:21 AM, Maurizio Lombardi wrote: > Hi Ming, > > On Thu, May 29, 2014 at 12:59:19AM +0800, Ming Lei wrote: >> >> Actually, the correct thing may be like what did in the >> attached patch, as Maurizio discussed with me[1]. >> >> Ve

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Ming Lei
On Thu, May 29, 2014 at 11:35 AM, Jet Chen wrote: > On 05/29/2014 12:59 AM, Ming Lei wrote: >> On Wed, May 28, 2014 at 11:42 PM, Ming Lei wrote: >>> Hi Dongsu, >>> >>> On Wed, May 28, 2014 at 11:09 PM, Dongsu Park >>> wr

Re: [PATCH 0/3] percpu_ida: support to export allocation/free information

2014-05-05 Thread Ming Lei
Hi, On Tue, Apr 29, 2014 at 10:53 PM, Ming Lei wrote: > Hi, > > These patches support to export percpu_ida allocation/free information > via sysfs, so that percpu_ida performance can be monitored, and > at least two use cases: > > - some parameters(such as percpu_max_siz

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-29 Thread Ming Lei
On Thu, May 29, 2014 at 2:06 PM, Jet Chen wrote: > On 05/29/2014 01:44 AM, Ming Lei wrote: > This patch works, thanks. > > Tested-by: Jet Chen Jet, thanks for your test. On Thu, May 29, 2014 at 3:04 PM, Maurizio Lombardi wrote: > > Jens, can you review and merge it? I wil

[PATCH] block/bio.c: update bi_iter.bi_size before recounting segments

2014-05-29 Thread Ming Lei
817095&w=2 Cc: Jens Axboe Cc: Maurizio Lombardi Cc: Dongsu Park Cc: Christoph Hellwig Cc: Kent Overstreet Cc: Andrew Morton Reported-by: Jet Chen Tested-by: Jet Chen Signed-off-by: Ming Lei --- Andrew, could you put the patch in your -mm tree because the previous two patches were

[PATCH] block: virtio_blk: don't hold spin lock during world switch

2014-05-29 Thread Ming Lei
engine=libaio iodepth=64 filename=/dev/vdc group_reporting=1 [f1] rw=randread Cc: Rusty Russell Cc: "Michael S. Tsirkin" Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Ming Lei --- drivers/block/virtio_blk.c |9 +

Re: [PATCH] block: virtio_blk: don't hold spin lock during world switch

2014-05-29 Thread Ming Lei
On Fri, May 30, 2014 at 11:19 AM, Jens Axboe wrote: > On 2014-05-29 20:49, Ming Lei wrote: >> >> Firstly, it isn't necessary to hold lock of vblk->vq_lock >> when notifying hypervisor about queued I/O. >> >> Secondly, virtqueue_notify() will cause world sw

Re: [PATCH] block: virtio_blk: don't hold spin lock during world switch

2014-05-29 Thread Ming Lei
On Fri, May 30, 2014 at 11:35 AM, Jens Axboe wrote: > On 2014-05-29 21:34, Ming Lei wrote: >> >> On Fri, May 30, 2014 at 11:19 AM, Jens Axboe wrote: >>> >>> On 2014-05-29 20:49, Ming Lei wrote: >>>> >>>> >>>> Firstly,

[PATCH 0/2] blk-mq: fix schedule from atomic context

2014-05-31 Thread Ming Lei
Hi Jens, These two patches fix the problem of schedule from atomic context which is introduced in bitmap based allocation. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordo

[PATCH 1/2] blk-mq: move blk_mq_get_ctx/blk_mq_put_ctx to mq private header

2014-05-31 Thread Ming Lei
The blk-mq tag code need these helpers. Signed-off-by: Ming Lei --- block/blk-mq.c | 22 -- block/blk-mq.h | 22 ++ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 0f5879c..b9230c5 100644 --- a

[PATCH 2/2] blk-mq: fix schedule from atomic context

2014-05-31 Thread Ming Lei
blk_mq_put_ctx() has to be called before io_schedule() in bt_get(). This patch fixes the problem by taking similar approach from percpu_ida allocation for the situation. Signed-off-by: Ming Lei --- block/blk-mq-tag.c | 48 +++- block/blk-mq-tag.h

Re: [PATCH] block: virtio_blk: don't hold spin lock during world switch

2014-06-02 Thread Ming Lei
large to warrant a stable inclusion even if it isn't a >> regression. > > If you're running SMP under an emulator where exits are expensive, then > this wins. Under KVM it's marginal at best. Both my tests on arm64 and x86 are under KVM, and looks the patch can impro

[PATCH] blk-mq: fix sparse warning on missed __percpu annotation

2014-06-02 Thread Ming Lei
'struct blk_mq_ctx' is __percpu, so add the annotation and fix the sparse warning reported from Fengguang: [block:for-linus 2/3] block/blk-mq.h:75:16: sparse: incorrect type in initializer (different address spaces) Reported-by: kbuild test robot Signed-off-by

Re: [patch]blk-mq: blk_mq_tag_to_rq should handle flush request

2014-06-04 Thread Ming Lei
ned int tag) > { > struct request *rq = tags->rqs[tag]; > > if ((rq->cmd_flags & REQ_FLUSH_SEQ) && rq->q->flush_rq->tag == tag) > return rq->q->flush_rq; > return rq; > } Looks we thought it together, :-) Also may

Re: [patch]blk-mq: blk_mq_tag_to_rq should handle flush request

2014-06-04 Thread Ming Lei
On Wed, Jun 4, 2014 at 11:48 PM, Jens Axboe wrote: > On 06/04/2014 09:43 AM, Ming Lei wrote: >> On Wed, Jun 4, 2014 at 11:31 PM, Christoph Hellwig >> wrote: >>> On Wed, Jun 04, 2014 at 09:02:19AM -0600, Jens Axboe wrote: >>>>> scsi_mq_find_tag only gets

Re: [patch]blk-mq: blk_mq_tag_to_rq should handle flush request

2014-06-04 Thread Ming Lei
On Thu, Jun 5, 2014 at 12:09 AM, Jens Axboe wrote: > On 06/04/2014 10:00 AM, Ming Lei wrote: >> On Wed, Jun 4, 2014 at 11:48 PM, Jens Axboe wrote: >>> On 06/04/2014 09:43 AM, Ming Lei wrote: >>>> On Wed, Jun 4, 2014 at 11:31 PM, Christoph Hellwig >>>>

<    8   9   10   11   12   13   14   15   16   17   >