Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Jens Axboe
On 10/15/18 4:44 PM, Richard Weinberger wrote: > Am Dienstag, 16. Oktober 2018, 00:04:20 CEST schrieb Jens Axboe: >> On 10/15/18 3:46 PM, Richard Weinberger wrote: >>> Am Montag, 15. Oktober 2018, 22:55:29 CEST schrieb Christoph Hellwig: On Mon, Oct 15, 2018 at 10:42:47PM +0200, Richard

Re: [PATCH -next] null_blk: remove set but not used variable 'q'

2018-10-15 Thread Jens Axboe
On 10/15/18 7:45 PM, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/block/null_blk_main.c: In function 'end_cmd': > drivers/block/null_blk_main.c:609:24: warning: > variable 'q' set but not used [-Wunused-but-set-variable] > > It not used any more after commit >

[PATCH -next] null_blk: remove set but not used variable 'q'

2018-10-15 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/block/null_blk_main.c: In function 'end_cmd': drivers/block/null_blk_main.c:609:24: warning: variable 'q' set but not used [-Wunused-but-set-variable] It not used any more after commit e50b1e327aeb ("null_blk: remove legacy IO path")

Re: [PATCH v2] block: fix rdma queue mapping

2018-10-15 Thread Sagi Grimberg
Can we please make forward progress on this? Christoph, Sagi:  it seems you think /proc/irq/$IRP/smp_affinity shouldn't be allowed if drivers support managed affinity. Is that correct? Perhaps that can be codified and be a way forward?  IE: Somehow allow the admin to choose either "managed

Re: [PATCH] blk-mq: provider helper for setting up an SQ queue and tag set

2018-10-15 Thread Ming Lei
On Mon, Oct 15, 2018 at 09:34:36AM -0600, Jens Axboe wrote: > This pattern is repeated throughout all the blk-mq conversions. > Provide a basic helper to get it done. > > Signed-off-by: Jens Axboe > --- > block/blk-mq.c | 33 + > include/linux/blk-mq.h |

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Richard Weinberger
Am Dienstag, 16. Oktober 2018, 00:04:20 CEST schrieb Jens Axboe: > On 10/15/18 3:46 PM, Richard Weinberger wrote: > > Am Montag, 15. Oktober 2018, 22:55:29 CEST schrieb Christoph Hellwig: > >> On Mon, Oct 15, 2018 at 10:42:47PM +0200, Richard Weinberger wrote: > Sadly not. I'm checking now

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Jens Axboe
On 10/15/18 3:46 PM, Richard Weinberger wrote: > Am Montag, 15. Oktober 2018, 22:55:29 CEST schrieb Christoph Hellwig: >> On Mon, Oct 15, 2018 at 10:42:47PM +0200, Richard Weinberger wrote: Sadly not. I'm checking now what exactly is broken. >>> >>> I take this back. Christoph's fixup makes

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Richard Weinberger
Am Montag, 15. Oktober 2018, 22:55:29 CEST schrieb Christoph Hellwig: > On Mon, Oct 15, 2018 at 10:42:47PM +0200, Richard Weinberger wrote: > > > Sadly not. I'm checking now what exactly is broken. > > > > I take this back. Christoph's fixup makes reading work. > > The previous version corrupted

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Christoph Hellwig
On Mon, Oct 15, 2018 at 10:42:47PM +0200, Richard Weinberger wrote: > > Sadly not. I'm checking now what exactly is broken. > > I take this back. Christoph's fixup makes reading work. > The previous version corrupted my test block device in interesting ways > and confused all tests. > But the

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Richard Weinberger
Am Montag, 15. Oktober 2018, 21:17:46 CEST schrieb Richard Weinberger: > Am Montag, 15. Oktober 2018, 10:45:41 CEST schrieb Christoph Hellwig: > > On Mon, Oct 15, 2018 at 10:40:06AM +0200, Richard Weinberger wrote: > > > hm, this breaks UML. > > > Every filesystem fails to mount. > > > > > > I

Re: [PATCH v2] block: BFQ default for single queue devices

2018-10-15 Thread Paolo Valente
> Il giorno 15 ott 2018, alle ore 21:26, Jens Axboe ha > scritto: > > On 10/15/18 12:26 PM, Paolo Valente wrote: >> >> >>> Il giorno 15 ott 2018, alle ore 17:39, Jens Axboe ha >>> scritto: >>> >>> On 10/15/18 8:10 AM, Linus Walleij wrote: This sets BFQ as the default scheduler for

Re: [PATCH 03/17] ps3disk: convert to blk-mq

2018-10-15 Thread Jens Axboe
On 10/15/18 1:24 PM, Geoff Levand wrote: > Hi Jens, > > On 10/15/2018 11:38 AM, Jens Axboe wrote: >> Weird, it looks like we're waiting for something to complete, and then >> we have a few others waiting for queue new IO. >> >> Can you try and move the blk_mq_end_request() inside the priv->lock

Re: [PATCH v2] block: BFQ default for single queue devices

2018-10-15 Thread Jens Axboe
On 10/15/18 12:26 PM, Paolo Valente wrote: > > >> Il giorno 15 ott 2018, alle ore 17:39, Jens Axboe ha >> scritto: >> >> On 10/15/18 8:10 AM, Linus Walleij wrote: >>> This sets BFQ as the default scheduler for single queue >>> block devices (nr_hw_queues == 1) if it is available. This >>>

Re: [PATCH 03/17] ps3disk: convert to blk-mq

2018-10-15 Thread Geoff Levand
Hi Jens, On 10/15/2018 11:38 AM, Jens Axboe wrote: > Weird, it looks like we're waiting for something to complete, and then > we have a few others waiting for queue new IO. > > Can you try and move the blk_mq_end_request() inside the priv->lock > section and see if that helps? With the change

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Richard Weinberger
Am Montag, 15. Oktober 2018, 10:45:41 CEST schrieb Christoph Hellwig: > On Mon, Oct 15, 2018 at 10:40:06AM +0200, Richard Weinberger wrote: > > hm, this breaks UML. > > Every filesystem fails to mount. > > > > I did some very rough tests, it seems that the driver fails to read > > data correctly

Re: [PATCH 03/17] ps3disk: convert to blk-mq

2018-10-15 Thread Jens Axboe
On 10/15/18 12:38 PM, Jens Axboe wrote: > On 10/15/18 12:23 PM, Geoff Levand wrote: >> Hi Jens, >> >> On 10/15/2018 09:27 AM, Jens Axboe wrote:> Can you try and change the queue >> depth to 1 instead of 2? It's set in> the tag_set, as ->queue_depth. >> >> With this change: >> >> -

Re: [PATCH 03/17] ps3disk: convert to blk-mq

2018-10-15 Thread Jens Axboe
On 10/15/18 12:23 PM, Geoff Levand wrote: > Hi Jens, > > On 10/15/2018 09:27 AM, Jens Axboe wrote:> Can you try and change the queue > depth to 1 instead of 2? It's set in> the tag_set, as ->queue_depth. > > With this change: > > - set->queue_depth = 2; > + set->queue_depth = 1; >

Re: [PATCH v2] block: BFQ default for single queue devices

2018-10-15 Thread Paolo Valente
> Il giorno 15 ott 2018, alle ore 17:02, Bart Van Assche > ha scritto: > > On Mon, 2018-10-15 at 16:10 +0200, Linus Walleij wrote: >> + * For blk-mq devices, we default to using: >> + * - "none" for multiqueue devices (nr_hw_queues != 1) >> + * - "bfq", if available, for single queue devices

Re: [PATCH v2] block: BFQ default for single queue devices

2018-10-15 Thread Paolo Valente
> Il giorno 15 ott 2018, alle ore 17:39, Jens Axboe ha > scritto: > > On 10/15/18 8:10 AM, Linus Walleij wrote: >> This sets BFQ as the default scheduler for single queue >> block devices (nr_hw_queues == 1) if it is available. This >> affects notably MMC/SD-cards but also UBI and the

Re: [PATCH 03/17] ps3disk: convert to blk-mq

2018-10-15 Thread Geoff Levand
Hi Jens, On 10/15/2018 09:27 AM, Jens Axboe wrote:> Can you try and change the queue depth to 1 instead of 2? It's set in> the tag_set, as ->queue_depth. With this change: - set->queue_depth = 2; + set->queue_depth = 1; Something is still wrong. It can sometimes boot, sometimes

Re: [PATCH v2 00/11] Convert floppy drivers to blk-mq

2018-10-15 Thread Omar Sandoval
On Sun, Oct 14, 2018 at 12:12:24PM +1100, Finn Thain wrote: > On Thu, 11 Oct 2018, Omar Sandoval wrote: > > > From: Omar Sandoval > > > > Hi, > > > > This series converts the various floppy drivers to blk-mq. Save for the > > last one (floppy), they're compile-tested only. If I've Cc'd you,

Re: [PATCH 03/17] ps3disk: convert to blk-mq

2018-10-15 Thread Jens Axboe
On 10/15/18 10:27 AM, Jens Axboe wrote: > On 10/15/18 10:22 AM, Geoff Levand wrote: >> Hi Jens, >> >> On 10/12/2018 05:58 PM, Jens Axboe wrote: >>> On 10/12/18 4:47 PM, Geoff Levand wrote: On 10/11/2018 09:58 AM, Jens Axboe wrote: > Convert from the old request_fn style driver to blk-mq.

Re: [PATCH 03/17] ps3disk: convert to blk-mq

2018-10-15 Thread Jens Axboe
On 10/15/18 10:22 AM, Geoff Levand wrote: > Hi Jens, > > On 10/12/2018 05:58 PM, Jens Axboe wrote: >> On 10/12/18 4:47 PM, Geoff Levand wrote: >>> On 10/11/2018 09:58 AM, Jens Axboe wrote: Convert from the old request_fn style driver to blk-mq. >>> >>> I tested this on PS3 applied to

Re: [PATCH v2 02/11] swim: convert to blk-mq

2018-10-15 Thread Laurent Vivier
On 11/10/2018 21:20, Omar Sandoval wrote: > From: Omar Sandoval > > The only interesting thing here is that there may be two floppies (i.e., > request queues) sharing the same controller, so we use the global struct > swim_priv->lock to check whether the controller is busy. Compile-tested >

Re: [PATCH 03/17] ps3disk: convert to blk-mq

2018-10-15 Thread Geoff Levand
Hi Jens, On 10/12/2018 05:58 PM, Jens Axboe wrote: > On 10/12/18 4:47 PM, Geoff Levand wrote: >> On 10/11/2018 09:58 AM, Jens Axboe wrote: >>> Convert from the old request_fn style driver to blk-mq. >> >> I tested this on PS3 applied to v4.19-rc7, and on boot it either >> gets a deadlock message

Re: [PATCH v2] block: BFQ default for single queue devices

2018-10-15 Thread Jens Axboe
On 10/15/18 8:10 AM, Linus Walleij wrote: > This sets BFQ as the default scheduler for single queue > block devices (nr_hw_queues == 1) if it is available. This > affects notably MMC/SD-cards but also UBI and the loopback > device. > > I have been running it for a while without any negative >

[PATCH] blk-mq: provider helper for setting up an SQ queue and tag set

2018-10-15 Thread Jens Axboe
This pattern is repeated throughout all the blk-mq conversions. Provide a basic helper to get it done. Signed-off-by: Jens Axboe --- block/blk-mq.c | 33 + include/linux/blk-mq.h | 4 2 files changed, 37 insertions(+) diff --git a/block/blk-mq.c

Re: [PATCH v2] block: BFQ default for single queue devices

2018-10-15 Thread Bart Van Assche
On Mon, 2018-10-15 at 16:10 +0200, Linus Walleij wrote: > + * For blk-mq devices, we default to using: > + * - "none" for multiqueue devices (nr_hw_queues != 1) > + * - "bfq", if available, for single queue devices > + * - "mq-deadline" if "bfq" is not available for single queue devices > + * -

Re: [PATCH 01/17] sunvdc: convert to blk-mq

2018-10-15 Thread Jens Axboe
On 10/15/18 8:19 AM, Jens Axboe wrote: > On 10/15/18 4:38 AM, Ming Lei wrote: >>> @@ -320,7 +320,7 @@ static void vdc_end_one(struct vdc_port *port, struct >>> vio_dring_state *dr, >>> >>> rqe->req = NULL; >>> >>> - __blk_end_request(req, (desc->status ? BLK_STS_IOERR : 0), desc->size);

Re: [PATCH v2] block: BFQ default for single queue devices

2018-10-15 Thread Oleksandr Natalenko
Hi. On 15.10.2018 16:10, Linus Walleij wrote: This sets BFQ as the default scheduler for single queue block devices (nr_hw_queues == 1) if it is available. This affects notably MMC/SD-cards but also UBI and the loopback device. I have been running it for a while without any negative effects on

Re: [PATCH v2] block: BFQ default for single queue devices

2018-10-15 Thread Paolo Valente
> Il giorno 15 ott 2018, alle ore 16:10, Linus Walleij > ha scritto: > > This sets BFQ as the default scheduler for single queue > block devices (nr_hw_queues == 1) if it is available. This > affects notably MMC/SD-cards but also UBI and the loopback > device. > > I have been running it for

Re: [PATCH 01/17] sunvdc: convert to blk-mq

2018-10-15 Thread Jens Axboe
On 10/15/18 4:38 AM, Ming Lei wrote: >> @@ -320,7 +320,7 @@ static void vdc_end_one(struct vdc_port *port, struct >> vio_dring_state *dr, >> >> rqe->req = NULL; >> >> -__blk_end_request(req, (desc->status ? BLK_STS_IOERR : 0), desc->size); >> +blk_mq_end_request(req, desc->status

Re: [PATCH 07/17] uml: convert ubd to blk-mq

2018-10-15 Thread Jens Axboe
On 10/15/18 4:27 AM, Ming Lei wrote: > On Thu, Oct 11, 2018 at 10:58:59AM -0600, Jens Axboe wrote: >> @@ -947,9 +970,12 @@ static int ubd_add(int n, char **error_out) >> >> err = 0; >> out: >> +blk_mq_free_tag_set(_dev->tag_set); >> +out1: >> return err; >> >> out_cleanup: >> +

[PATCH v2] block: BFQ default for single queue devices

2018-10-15 Thread Linus Walleij
This sets BFQ as the default scheduler for single queue block devices (nr_hw_queues == 1) if it is available. This affects notably MMC/SD-cards but also UBI and the loopback device. I have been running it for a while without any negative effects on my pet systems and I want some wider testing so

Re: [PATCH 01/17] sunvdc: convert to blk-mq

2018-10-15 Thread Ming Lei
On Thu, Oct 11, 2018 at 10:58:53AM -0600, Jens Axboe wrote: > Convert from the old request_fn style driver to blk-mq. > > Cc: David Miller > Signed-off-by: Jens Axboe > --- > drivers/block/sunvdc.c | 161 - > 1 file changed, 110 insertions(+), 51

Re: [PATCH 07/17] uml: convert ubd to blk-mq

2018-10-15 Thread Ming Lei
On Thu, Oct 11, 2018 at 10:58:59AM -0600, Jens Axboe wrote: > Just a straight forward conversion. The retry handling could > potentially be done by blk-mq as well, but that's for another > day. > > Cc: Jeff Dike > Signed-off-by: Jens Axboe > --- > arch/um/drivers/ubd_kern.c | 154

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Anton Ivanov
On 10/15/18 9:40 AM, Richard Weinberger wrote: Christoph, [CC'ing also Anton, he improved the old driver a lot.] I was just about to start testing it :) Anton, this patch is based on: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/?h=mq-conversions Thanks. I remember

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Christoph Hellwig
On Mon, Oct 15, 2018 at 10:40:06AM +0200, Richard Weinberger wrote: > hm, this breaks UML. > Every filesystem fails to mount. > > I did some very rough tests, it seems that the driver fails to read > data correctly as soon the upper layer tries to get more than 4096 bytes > at once out of the

Re: [PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Richard Weinberger
Christoph, [CC'ing also Anton, he improved the old driver a lot.] Anton, this patch is based on: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/?h=mq-conversions Am Montag, 15. Oktober 2018, 08:56:37 CEST schrieb Christoph Hellwig: > There is no good reason to create a

[PATCH, RFC] ubd: remove use of blk_rq_map_sg

2018-10-15 Thread Christoph Hellwig
There is no good reason to create a scatterlist in the ubd driver, it can just iterate the request directly. Signed-off-by: Christoph Hellwig --- Now that we have the blk-mq conversion something like the patch below should help to simplify the driver even further. arch/um/drivers/ubd_kern.c |