Re: [PATCH V13 03/10] mmc: block: Add blk-mq support

2017-11-10 Thread Linus Walleij
Following up on this: On Thu, Nov 9, 2017 at 4:52 PM, Linus Walleij wrote: >> No one has ever suggested that the legacy API will remain. Once blk-mq is >> ready the old code gets deleted. > > The block layer maintainers most definately think MQ is ready > but you seem

Re: nvme multipath support V7

2017-11-10 Thread Christoph Hellwig
I've updated the git tree with the Kconfig type fix, the instance fixup from Keith (plus extensive comments explaning the issue) and the various reviews. I'll wait for the buildbot a and do a little more manual testing and will send it to Jens in the afternoon.

Re: [PATCH V13 08/10] mmc: block: blk-mq: Separate card polling from recovery

2017-11-10 Thread Linus Walleij
On Thu, Nov 9, 2017 at 2:02 PM, Adrian Hunter wrote: > On 09/11/17 14:52, Linus Walleij wrote: >> On Thu, Nov 9, 2017 at 8:56 AM, Adrian Hunter >> wrote: >>> On 08/11/17 11:30, Linus Walleij wrote: On Fri, Nov 3, 2017 at 2:20 PM, Adrian

Re: [PATCH] block: avoid null pointer dereference on null disk

2017-11-10 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH V13 05/10] mmc: cqhci: support for command queue enabled host

2017-11-10 Thread Linus Walleij
On Thu, Nov 9, 2017 at 1:55 PM, Adrian Hunter wrote: > On 09/11/17 14:26, Linus Walleij wrote: I think the above approach to put any CQE-specific callbacks directly into the struct mmc_host_ops is way more viable. >>> >>> Nothing to do with CQE. This is CQHCI.

[PATCH V4] scsi_debugfs: fix crash in scsi_show_rq()

2017-11-10 Thread Ming Lei
cmd->cmnd can be allocated/freed dynamically in case of T10_PI_TYPE2_PROTECTION, so we should check it in scsi_show_rq() because this request may have been freed already here, and cmd->cmnd has been set as null. We choose to accept read-after-free and dump request data as far as possible. This

[PATCH 07/12 v5] mmc: queue: simplify queue logic

2017-11-10 Thread Linus Walleij
The if() statment checking if there is no current or previous request is now just looking ahead at something that will be concluded a few lines below. Simplify the logic by moving the assignment of .asleep. Signed-off-by: Linus Walleij --- ChangeLog v1->v5: - Rebasing

[PATCH 10/12 v5] mmc: queue/block: pass around struct mmc_queue_req*s

2017-11-10 Thread Linus Walleij
Instead of passing two pointers around several pointers to mmc_queue_req, request, mmc_queue, and reassigning to the left and right, issue mmc_queue_req and dereference the queue and request from the mmq_queue_req where needed. The struct mmc_queue_req is the thing that has a lifecycle after all:

[PATCH 02/12 v5] mmc: core: add a workqueue for completing requests

2017-11-10 Thread Linus Walleij
As we want to complete requests autonomously from feeding the host with new requests, we create a workqueue to deal with this specifically in response to the callback from a host driver. This is necessary to exploit parallelism properly. This patch just adds the workqueu, later patches will make

[PATCH 01/12 v5] mmc: core: move the asynchronous post-processing

2017-11-10 Thread Linus Walleij
This moves the asynchronous post-processing of a request over to the finalization function. The patch has a slight semantic change: Both places will be in the code path for if (host->areq) and in the same sequence, but before this patch, the next request was started before performing

[PATCH 00/12 v5] Multiqueue for MMC/SD

2017-11-10 Thread Linus Walleij
This is the fifth iteration of this patch set. I *HOPE* that we can scrap this patch set and merge Adrian's patches instead, because they also bring CQE support which is nice. I had some review comments on his series, mainly that it needs to kill off the legacy block layer code path that noone

[PATCH 06/12 v5] mmc: core: kill off the context info

2017-11-10 Thread Linus Walleij
The last member of the context info: is_waiting_last_req is just assigned values, never checked. Delete that and the whole context info as a result. Signed-off-by: Linus Walleij --- ChangeLog v1->v5: - Rebasing on the "next" branch in the MMC tree. ---

[PATCH 03/12 v5] mmc: core: replace waitqueue with worker

2017-11-10 Thread Linus Walleij
The waitqueue in the host context is there to signal back from mmc_request_done() through mmc_wait_data_done() that the hardware is done with a command, and when the wait is over, the core will typically submit the next asynchronous request that is pending just waiting for the hardware to be

[PATCH 12/12 v5] mmc: switch MMC/SD to use blk-mq multiqueueing v5

2017-11-10 Thread Linus Walleij
This switches the MMC/SD stack to use the multiqueue block layer interface. We kill off the kthread that was just calling blk_fetch_request() and let blk-mq drive all traffic, nice, that is how it should work. Due to having switched the submission mechanics around so that the completion of

[PATCH 11/12 v5] mmc: block: issue requests in massive parallel

2017-11-10 Thread Linus Walleij
This makes a crucial change to the issueing mechanism for the MMC requests: Before commit "mmc: core: move the asynchronous post-processing" some parallelism on the read/write requests was achieved by speculatively postprocessing a request and re-preprocess and re-issue the request if something

[PATCH 09/12 v5] mmc: queue: stop flushing the pipeline with NULL

2017-11-10 Thread Linus Walleij
Remove all the pipeline flush: i.e. repeatedly sending NULL down to the core layer to flush out asynchronous requests, and also sending NULL after "special" commands to achieve the same flush. Instead: let the "special" commands wait for any ongoing asynchronous transfers using the completion,

[PATCH 08/12 v5] mmc: block: shuffle retry and error handling

2017-11-10 Thread Linus Walleij
Instead of doing retries at the same time as trying to submit new requests, do the retries when the request is reported as completed by the driver, in the finalization worker. This is achieved by letting the core worker call back into the block layer using a callback in the asynchronous request,

[PATCH 05/12] mmc: core: do away with is_new_req

2017-11-10 Thread Linus Walleij
The host context member "is_new_req" is only assigned values, never checked. Delete it. Signed-off-by: Linus Walleij --- ChangeLog v1->v5: - Rebasing on the "next" branch in the MMC tree. --- drivers/mmc/core/core.c | 1 - drivers/mmc/core/queue.c | 5 -

[PATCH 04/12] mmc: core: do away with is_done_rcv

2017-11-10 Thread Linus Walleij
The "is_done_rcv" in the context info for the host is no longer needed: it is clear from context (ha!) that as long as we are waiting for the asynchronous request to come to completion, we are not done receiving data, and when the finalization work has run and completed the completion, we are

Re: [PATCH 5/7] nvme: also expose the namespace identification sysfs files for mpath nodes

2017-11-10 Thread Hannes Reinecke
On 11/09/2017 06:44 PM, Christoph Hellwig wrote: > We do this by adding a helper that returns the ns_head for a device that > can belong to either the per-controller or per-subsystem block device > nodes, and otherwise reuse all the existing code. > > Signed-off-by: Christoph Hellwig

[PATCH] blk-mq: only run the hardware queue if IO is pending

2017-11-10 Thread Jens Axboe
Currently we are inconsistent in when we decide to run the queue. Using blk_mq_run_hw_queues() we check if the hctx has pending IO before running it, but we don't do that from the individual queue run function, blk_mq_run_hw_queue(). This results in a lot of extra and pointless queue runs,

Re: [PATCH 00/12 v5] Multiqueue for MMC/SD

2017-11-10 Thread Linus Walleij
On Fri, Nov 10, 2017 at 11:01 AM, Linus Walleij wrote: > Removing a card during I/O does not work well however :/ > So I guess I would need to work on that if this series should > continue. (Hopefully unlikely.) I tested a bit more and it turns out this doesn't work on

Re: [GIT PULL] nvme updates for Linux 4.15

2017-11-10 Thread Jens Axboe
On 11/10/2017 08:18 AM, Jens Axboe wrote: > On 11/10/2017 07:34 AM, Christoph Hellwig wrote: >> Hi Jens, >> >> another round of NVMe updates for 4.15. >> >> The biggest items are: >> >> - native multipath support (me + Hannes) >> - userspace notifications for AENs (Keith) >> - obey the command

[GIT PULL] nvme updates for Linux 4.15

2017-11-10 Thread Christoph Hellwig
Hi Jens, another round of NVMe updates for 4.15. The biggest items are: - native multipath support (me + Hannes) - userspace notifications for AENs (Keith) - obey the command effects log page (Keith) in addition to that lots of fixes from a wide variety of people. The following changes

Re: [GIT PULL] nvme updates for Linux 4.15

2017-11-10 Thread Jens Axboe
On 11/10/2017 07:34 AM, Christoph Hellwig wrote: > Hi Jens, > > another round of NVMe updates for 4.15. > > The biggest items are: > > - native multipath support (me + Hannes) > - userspace notifications for AENs (Keith) > - obey the command effects log page (Keith) > > in addition to that

Re: [PATCH] ide: ide-atapi: fix compile error with defining macro DEBUG

2017-11-10 Thread Jens Axboe
On 11/10/2017 12:59 AM, Hongxu Jia wrote: > Compile ide-atapi failed with defining macro "DEBUG" > ... > |drivers/ide/ide-atapi.c:285:52: error: 'struct request' has > no member named 'cmd'; did you mean 'csd'? > | debug_log("%s: rq->cmd[0]: 0x%x\n", __func__, rq->cmd[0]); > ... > > Since we

Re: [PATCH] blk-mq: respect queue dead via blk_mq_quiesce_queue

2017-11-10 Thread Bart Van Assche
On Sun, 2017-11-05 at 15:38 +, Bart Van Assche wrote: > On Sun, 2017-11-05 at 20:10 +0800, Ming Lei wrote: > > diff --git a/block/blk-core.c b/block/blk-core.c > > index 048be4aa6024..0b121f29e3b1 100644 > > --- a/block/blk-core.c > > +++ b/block/blk-core.c > > @@ -658,6 +658,10 @@ void

Re: [PATCH v3 2/8] crypto: scompress - use sgl_alloc() and sgl_free()

2017-11-10 Thread Bart Van Assche
On Fri, 2017-11-03 at 15:23 -0700, Bart Van Assche wrote: > Use the sgl_alloc() and sgl_free() functions instead of open coding > these functions. > > Signed-off-by: Bart Van Assche > Cc: Ard Biesheuvel > Cc: Herbert Xu

Re: [PATCH V4] scsi_debugfs: fix crash in scsi_show_rq()

2017-11-10 Thread James Bottomley
On Fri, 2017-11-10 at 17:01 +0800, Ming Lei wrote: > cmd->cmnd can be allocated/freed dynamically in case of > T10_PI_TYPE2_PROTECTION, > so we should check it in scsi_show_rq() because this request may have > been freed already here, and cmd->cmnd has been set as null. > > We choose to accept

Re: [GIT PULL] nvme updates for Linux 4.15

2017-11-10 Thread Jens Axboe
On 11/10/2017 10:38 AM, Jens Axboe wrote: > On 11/10/2017 10:33 AM, Christoph Hellwig wrote: >> On Fri, Nov 10, 2017 at 10:27:24AM -0700, Jens Axboe wrote: >>> That makes for a bit of an awkward merge, why wasn't this fixed up >>> in your tree? >> >> Because you asked me to always base on

Re: [PATCH] blk-mq: only run the hardware queue if IO is pending

2017-11-10 Thread Christoph Hellwig
On Fri, Nov 10, 2017 at 09:12:18AM -0700, Jens Axboe wrote: > Currently we are inconsistent in when we decide to run the queue. Using > blk_mq_run_hw_queues() we check if the hctx has pending IO before > running it, but we don't do that from the individual queue run function, >

Re: [PATCH] blk-mq: only run the hardware queue if IO is pending

2017-11-10 Thread Jens Axboe
On 11/10/2017 10:34 AM, Christoph Hellwig wrote: > On Fri, Nov 10, 2017 at 10:31:29AM -0700, Jens Axboe wrote: >> On 11/10/2017 10:29 AM, Christoph Hellwig wrote: >>> On Fri, Nov 10, 2017 at 09:12:18AM -0700, Jens Axboe wrote: Currently we are inconsistent in when we decide to run the queue.

Re: [GIT PULL] nvme updates for Linux 4.15

2017-11-10 Thread Jens Axboe
On 11/10/2017 10:33 AM, Christoph Hellwig wrote: > On Fri, Nov 10, 2017 at 10:27:24AM -0700, Jens Axboe wrote: >> That makes for a bit of an awkward merge, why wasn't this fixed up >> in your tree? > > Because you asked me to always base on for-4.15/block last time? That's not what I meant. It's

Re: [PATCH] blk-mq: only run the hardware queue if IO is pending

2017-11-10 Thread Jens Axboe
On 11/10/2017 10:29 AM, Christoph Hellwig wrote: > On Fri, Nov 10, 2017 at 09:12:18AM -0700, Jens Axboe wrote: >> Currently we are inconsistent in when we decide to run the queue. Using >> blk_mq_run_hw_queues() we check if the hctx has pending IO before >> running it, but we don't do that from

[PATCH] brd: remove unused brd_mutex

2017-11-10 Thread Mikulas Patocka
Remove unused mutex brd_mutex. It is unused since the commit ff26956875c2 ("brd: remove support for BLKFLSBUF"). Signed-off-by: Mikulas Patocka --- drivers/block/brd.c |1 - 1 file changed, 1 deletion(-) Index: linux-2.6/drivers/block/brd.c

Re: [GIT PULL] nvme updates for Linux 4.15

2017-11-10 Thread Christoph Hellwig
On Fri, Nov 10, 2017 at 08:22:32AM -0700, Jens Axboe wrote: > Actually, double checking, one of them is a little suspicious: > > if (a == _attr_uuid.attr) { > <<< HEAD > if (uuid_is_null(>uuid) && > !memchr_inv(ns->nguid, 0, sizeof(ns->nguid))) >

Re: [GIT PULL] nvme updates for Linux 4.15

2017-11-10 Thread Jens Axboe
On 11/10/2017 10:22 AM, Christoph Hellwig wrote: > On Fri, Nov 10, 2017 at 08:22:32AM -0700, Jens Axboe wrote: >> Actually, double checking, one of them is a little suspicious: >> >> if (a == _attr_uuid.attr) { >> <<< HEAD >> if (uuid_is_null(>uuid) && >>

Re: [PATCH] blk-mq: only run the hardware queue if IO is pending

2017-11-10 Thread Christoph Hellwig
On Fri, Nov 10, 2017 at 10:31:29AM -0700, Jens Axboe wrote: > On 11/10/2017 10:29 AM, Christoph Hellwig wrote: > > On Fri, Nov 10, 2017 at 09:12:18AM -0700, Jens Axboe wrote: > >> Currently we are inconsistent in when we decide to run the queue. Using > >> blk_mq_run_hw_queues() we check if the

Re: [GIT PULL] nvme updates for Linux 4.15

2017-11-10 Thread Christoph Hellwig
On Fri, Nov 10, 2017 at 10:27:24AM -0700, Jens Axboe wrote: > That makes for a bit of an awkward merge, why wasn't this fixed up > in your tree? Because you asked me to always base on for-4.15/block last time?

Re: [PATCH] brd: remove unused brd_mutex

2017-11-10 Thread Jens Axboe
On 11/10/2017 10:29 AM, Mikulas Patocka wrote: > Remove unused mutex brd_mutex. It is unused since the commit ff26956875c2 > ("brd: remove support for BLKFLSBUF"). Thanks, applied. -- Jens Axboe

Re: [PATCH v3 2/8] crypto: scompress - use sgl_alloc() and sgl_free()

2017-11-10 Thread Ard Biesheuvel
On 10 November 2017 at 16:43, Bart Van Assche wrote: > On Fri, 2017-11-03 at 15:23 -0700, Bart Van Assche wrote: >> Use the sgl_alloc() and sgl_free() functions instead of open coding >> these functions. >> >> Signed-off-by: Bart Van Assche >> Cc:

Re: [PATCH] blk-mq: only run the hardware queue if IO is pending

2017-11-10 Thread Jens Axboe
On 11/10/2017 03:28 PM, Omar Sandoval wrote: > On Fri, Nov 10, 2017 at 09:12:18AM -0700, Jens Axboe wrote: >> Currently we are inconsistent in when we decide to run the queue. Using >> blk_mq_run_hw_queues() we check if the hctx has pending IO before >> running it, but we don't do that from the

Re: [PATCH] blk-mq: improve tag waiting setup for non-shared tags

2017-11-10 Thread Omar Sandoval
On Thu, Nov 09, 2017 at 04:00:09PM -0700, Jens Axboe wrote: > If we run out of driver tags, we currently treat shared and non-shared > tags the same - both cases hook into the tag waitqueue. This is a bit > more costly than it needs to be on unshared tags, since we have to both > grab the hctx

Re: [PATCH] blk-mq: only run the hardware queue if IO is pending

2017-11-10 Thread Omar Sandoval
On Fri, Nov 10, 2017 at 09:12:18AM -0700, Jens Axboe wrote: > Currently we are inconsistent in when we decide to run the queue. Using > blk_mq_run_hw_queues() we check if the hctx has pending IO before > running it, but we don't do that from the individual queue run function, >

Re: [PATCH] blk-mq: respect queue dead via blk_mq_quiesce_queue

2017-11-10 Thread Ming Lei
On Fri, Nov 10, 2017 at 04:30:35PM +, Bart Van Assche wrote: > On Sun, 2017-11-05 at 15:38 +, Bart Van Assche wrote: > > On Sun, 2017-11-05 at 20:10 +0800, Ming Lei wrote: > > > diff --git a/block/blk-core.c b/block/blk-core.c > > > index 048be4aa6024..0b121f29e3b1 100644 > > > ---

Re: [PATCH V4] scsi_debugfs: fix crash in scsi_show_rq()

2017-11-10 Thread Ming Lei
On Fri, Nov 10, 2017 at 08:51:58AM -0800, James Bottomley wrote: > On Fri, 2017-11-10 at 17:01 +0800, Ming Lei wrote: > > cmd->cmnd can be allocated/freed dynamically in case of > > T10_PI_TYPE2_PROTECTION, > > so we should check it in scsi_show_rq() because this request may have > > been freed

Re: [PATCH 00/12 v5] Multiqueue for MMC/SD

2017-11-10 Thread Ulf Hansson
On 10 November 2017 at 11:01, Linus Walleij wrote: > This is the fifth iteration of this patch set. > > I *HOPE* that we can scrap this patch set and merge Adrian's > patches instead, because they also bring CQE support which is > nice. I had some review comments on his

Re: [PATCH V13 06/10] mmc: sdhci-pci: Add CQHCI support for Intel GLK

2017-11-10 Thread Linus Walleij
On Thu, Nov 9, 2017 at 8:12 AM, Adrian Hunter wrote: > On 08/11/17 11:24, Linus Walleij wrote: >> On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter >> wrote: >> >>> Add CQHCI initialization and implement CQHCI operations for Intel GLK. >>> >>>