Re: [PATCH V6 4/5] blk-mq-sched: improve dispatching from sw queue

2017-10-12 Thread Ming Lei
On Thu, Oct 12, 2017 at 08:52:12AM -0600, Jens Axboe wrote: > On 10/12/2017 04:01 AM, Ming Lei wrote: > > On Tue, Oct 10, 2017 at 11:23:45AM -0700, Omar Sandoval wrote: > >> On Mon, Oct 09, 2017 at 07:24:23PM +0800, Ming Lei wrote: > >>> SCSI devices use host-wide tagset, and the shared driver tag

Re: [PATCH V6 4/5] blk-mq-sched: improve dispatching from sw queue

2017-10-12 Thread Jens Axboe
On 10/12/2017 09:22 AM, Ming Lei wrote: > On Thu, Oct 12, 2017 at 08:52:12AM -0600, Jens Axboe wrote: >> On 10/12/2017 04:01 AM, Ming Lei wrote: >>> On Tue, Oct 10, 2017 at 11:23:45AM -0700, Omar Sandoval wrote: On Mon, Oct 09, 2017 at 07:24:23PM +0800, Ming Lei wrote: > SCSI devices use

Re: [PATCH V6 4/5] blk-mq-sched: improve dispatching from sw queue

2017-10-12 Thread Bart Van Assche
On Thu, 2017-10-12 at 18:01 +0800, Ming Lei wrote: > Even EWMA approach isn't good on SCSI-MQ too, because > some SCSI's .cmd_per_lun is very small, such as 3 on > lpfc and qla2xxx, and one full flush will trigger > BLK_STS_RESOURCE easily. > > So I suggest to use the way of q->queue_depth first,

Re: [PATCH V6 4/5] blk-mq-sched: improve dispatching from sw queue

2017-10-12 Thread Jens Axboe
On 10/12/2017 09:33 AM, Bart Van Assche wrote: > On Thu, 2017-10-12 at 18:01 +0800, Ming Lei wrote: >> Even EWMA approach isn't good on SCSI-MQ too, because >> some SCSI's .cmd_per_lun is very small, such as 3 on >> lpfc and qla2xxx, and one full flush will trigger >> BLK_STS_RESOURCE easily. >>

Re: [PATCH V6 4/5] blk-mq-sched: improve dispatching from sw queue

2017-10-12 Thread Ming Lei
On Thu, Oct 12, 2017 at 09:37:11AM -0600, Jens Axboe wrote: > On 10/12/2017 09:33 AM, Bart Van Assche wrote: > > On Thu, 2017-10-12 at 18:01 +0800, Ming Lei wrote: > >> Even EWMA approach isn't good on SCSI-MQ too, because > >> some SCSI's .cmd_per_lun is very small, such as 3 on > >> lpfc and

Re: [PATCH v8 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-12 Thread Ming Lei
On Tue, Oct 10, 2017 at 02:03:45PM -0700, Bart Van Assche wrote: > The contexts from which a SCSI device can be quiesced or resumed are: > * Writing into /sys/class/scsi_device/*/device/state. > * SCSI parallel (SPI) domain validation. > * The SCSI device power management methods. See also

Re: [PATCH v8 03/10] md: Neither resync nor reshape while the system is frozen

2017-10-12 Thread Bart Van Assche
On Wed, 2017-10-11 at 12:32 -0700, Shaohua Li wrote: > On Wed, Oct 11, 2017 at 05:17:56PM +, Bart Van Assche wrote: > > On Tue, 2017-10-10 at 18:48 -0700, Shaohua Li wrote: > > > The problem is __md_stop_writes set some bit like MD_RECOVERY_FROZEN, > > > which > > > will prevent

Re: [PATCH v8 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-12 Thread Bart Van Assche
On Fri, 2017-10-13 at 00:02 +0800, Ming Lei wrote: > On Tue, Oct 10, 2017 at 02:03:45PM -0700, Bart Van Assche wrote: > > [ ... ] > > + /* If the SCSI device has already been quiesced, do nothing. */ > > + if (blk_set_preempt_only(q)) > > + return 0; > > Last time, I have mentioned

Re: [PATCH v8 03/10] md: Neither resync nor reshape while the system is frozen

2017-10-12 Thread Shaohua Li
On Thu, Oct 12, 2017 at 04:59:01PM +, Bart Van Assche wrote: > On Wed, 2017-10-11 at 12:32 -0700, Shaohua Li wrote: > > On Wed, Oct 11, 2017 at 05:17:56PM +, Bart Van Assche wrote: > > > On Tue, 2017-10-10 at 18:48 -0700, Shaohua Li wrote: > > > > The problem is __md_stop_writes set some

Re: [Nouveau] [PATCH 03/10] driver:gpu: return -ENOMEM on allocation failure.

2017-10-12 Thread Daniel Vetter
On Wed, Sep 13, 2017 at 01:02:12PM +0530, Allen Pais wrote: > Signed-off-by: Allen Pais Applied to drm-misc-next, thanks. -Daniel > --- > drivers/gpu/drm/gma500/mid_bios.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Hello

2017-10-12 Thread Mr Neil Trotter
A Donation Of 1 Million British Pounds To You In Good Faith

[PATCH V7 2/6] blk-mq-sched: move actual dispatching into one helper

2017-10-12 Thread Ming Lei
So that it becomes easy to support to dispatch from sw queue in the following patch. No functional change. Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval Suggested-by: Christoph Hellwig # for simplifying dispatch logic

[PATCH V7 1/6] blk-mq-sched: fix scheduler bad performance

2017-10-12 Thread Ming Lei
When hw queue is busy, we shouldn't take requests from scheduler queue any more, otherwise it is difficult to do IO merge. This patch fixes the awful IO performance on some SCSI devices(lpfc, qla2xxx, ...) when mq-deadline/kyber is used by not taking requests if hw queue is busy. Reviewed-by:

[PATCH V7 3/6] sbitmap: introduce __sbitmap_for_each_set()

2017-10-12 Thread Ming Lei
We need to iterate ctx starting from any ctx in round robin way, so introduce this helper. Reviewed-by: Omar Sandoval Cc: Omar Sandoval Signed-off-by: Ming Lei --- include/linux/sbitmap.h | 64

[PATCH V7 4/6] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops

2017-10-12 Thread Ming Lei
For SCSI devices, there is often per-request-queue depth, which need to be respected before queuing one request. The current blk-mq always dequeues one request first, then calls .queue_rq() to dispatch the request to lld. One obvious issue of this way is that I/O merge may not be good, because

[PATCH V7 5/6] blk-mq-sched: improve dispatching from sw queue

2017-10-12 Thread Ming Lei
SCSI devices use host-wide tagset, and the shared driver tag space is often quite big. Meantime there is also queue depth for each lun( .cmd_per_lun), which is often small, for example, on both lpfc and qla2xxx, .cmd_per_lun is just 3. So lots of requests may stay in sw queue, and we always flush

[PATCH V7 6/6] SCSI: implement .get_budget and .put_budget for blk-mq

2017-10-12 Thread Ming Lei
We need to tell blk-mq to reserve resource before queuing one request, so implement these two callbacks. Then blk-mq can avoid to dequeue request earlier, and IO merge can be improved a lot. Signed-off-by: Ming Lei --- drivers/scsi/scsi_lib.c | 42

[PATCH V7 0/6] blk-mq-sched: improve sequential I/O performance

2017-10-12 Thread Ming Lei
Hi Jens, In Red Hat internal storage test wrt. blk-mq scheduler, we found that I/O performance is much bad with mq-deadline, especially about sequential I/O on some multi-queue SCSI devcies(lpfc, qla2xxx, SRP...) Turns out one big issue causes the performance regression: requests are still

Re: [PATCH V7 4/6] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops

2017-10-12 Thread Jens Axboe
On 10/12/2017 12:37 PM, Ming Lei wrote: > For SCSI devices, there is often per-request-queue depth, which need > to be respected before queuing one request. > > The current blk-mq always dequeues one request first, then calls .queue_rq() > to dispatch the request to lld. One obvious issue of this

Re: [PATCH V7 5/6] blk-mq-sched: improve dispatching from sw queue

2017-10-12 Thread Bart Van Assche
On 10/12/17 11:37, Ming Lei wrote: [ ... ] This patch improves dispatching from sw queue by using the callback of .get_budget and .put_budget Reviewed-by: Omar Sandoval Reviewed-by: Bart Van Assche Signed-off-by: Ming Lei ---

Re: [PATCH v7 9/9] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-12 Thread Martin Steigerwald
Bart Van Assche - 10.10.17, 15:27: > On Tue, 2017-10-10 at 09:57 +0200, Martin Steigerwald wrote: > > > Bart Van Assche - 09.10.17, 16:14: > > > > > The contexts from which a SCSI device can be quiesced or resumed are: > > > [ ... ] > > > > > > Does this as reliably fix the issue as the

[PATCH] scsi: lpfc: Fix a precedence bug in lpfc_nvme_io_cmd_wqe_cmpl()

2017-10-12 Thread Dan Carpenter
The ! has higher precedence than the & operation. I've added parenthesis so this works as intended. Fixes: 952c303b329c ("scsi: lpfc: Ensure io aborts interlocked with the target.") Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/lpfc/lpfc_nvme.c

[PATCH 6/8] scsi/ipr: Use sgl_alloc_order() and sgl_free_order()

2017-10-12 Thread Bart Van Assche
Use the sgl_alloc_order() and sgl_free_order() functions instead of open coding these functions. Signed-off-by: Bart Van Assche Cc: linux-scsi@vger.kernel.org Cc: Martin K. Petersen Cc: Brian King ---

[PATCH 7/8] scsi/pmcraid: Remove an unused structure member

2017-10-12 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Cc: linux-scsi@vger.kernel.org Cc: Martin K. Petersen Cc: Anil Ravindranath --- drivers/scsi/pmcraid.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/pmcraid.h

[PATCH 5/8] target: Use sgl_alloc_order() and sgl_free()

2017-10-12 Thread Bart Van Assche
Use the sgl_alloc_order() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche Cc: Nicholas A. Bellinger Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg

[PATCH 3/8] nvmet/fc: Use sgl_alloc() and sgl_free()

2017-10-12 Thread Bart Van Assche
Use the sgl_alloc() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche Cc: Keith Busch Cc: Christoph Hellwig Cc: James Smart Cc: Johannes Thumshirn

[PATCH 0/8] Introduce sgl_alloc() and sgl_free()

2017-10-12 Thread Bart Van Assche
Hello Jens, As you probably know there are multiple drivers that both allocate a scatter/gather list and populate that list with pages. This patch series moves the code for allocating and freeing such scatterlists from these drivers into a new source file, namely lib/sgl_alloc. Please consider

[PATCH 4/8] nvmet/rdma: Use sgl_alloc() and sgl_free()

2017-10-12 Thread Bart Van Assche
Use the sgl_alloc() and sgl_free() functions instead of open coding these functions. Signed-off-by: Bart Van Assche Cc: Keith Busch Cc: Christoph Hellwig Cc: Sagi Grimberg --- drivers/nvme/target/Kconfig | 1 +

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

2017-10-12 Thread Bart Van Assche
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 --- crypto/Kconfig | 1 + crypto/scompress.c | 52

[PATCH 1/8] lib: Introduce sgl_alloc() and sgl_free()

2017-10-12 Thread Bart Van Assche
Many kernel drivers contain code that allocate and free both a scatterlist and the pages that populate that scatterlist. Introduce functions under lib/ that perform these tasks instead of duplicating this functionality in multiple drivers. Signed-off-by: Bart Van Assche

[PATCH 8/8] scsi/pmcraid: Use sgl_alloc_order() and sgl_free_order()

2017-10-12 Thread Bart Van Assche
Use the sgl_alloc_order() and sgl_free_order() functions instead of open coding these functions. Signed-off-by: Bart Van Assche Cc: linux-scsi@vger.kernel.org Cc: Martin K. Petersen Cc: Anil Ravindranath ---

Re: [PATCH 1/8] lib: Introduce sgl_alloc() and sgl_free()

2017-10-12 Thread Jens Axboe
On 10/12/2017 04:45 PM, Bart Van Assche wrote: > Many kernel drivers contain code that allocate and free both a > scatterlist and the pages that populate that scatterlist. > Introduce functions under lib/ that perform these tasks instead > of duplicating this functionality in multiple drivers. >

Re: [PATCH 1/8] lib: Introduce sgl_alloc() and sgl_free()

2017-10-12 Thread Bart Van Assche
On Thu, 2017-10-12 at 16:52 -0600, Jens Axboe wrote: > On 10/12/2017 04:45 PM, Bart Van Assche wrote: > > +++ b/include/linux/sgl_alloc.h > > @@ -0,0 +1,16 @@ > > +#ifndef _SGL_ALLOC_H_ > > +#define _SGL_ALLOC_H_ > > + > > +#include /* bool, gfp_t */ > > + > > +struct scatterlist; > > + > >

Re: [PATCH V7 4/6] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops

2017-10-12 Thread Ming Lei
On Thu, Oct 12, 2017 at 12:46:24PM -0600, Jens Axboe wrote: > On 10/12/2017 12:37 PM, Ming Lei wrote: > > For SCSI devices, there is often per-request-queue depth, which need > > to be respected before queuing one request. > > > > The current blk-mq always dequeues one request first, then calls

Re: [PATCH V7 5/6] blk-mq-sched: improve dispatching from sw queue

2017-10-12 Thread Ming Lei
On Thu, Oct 12, 2017 at 11:48:22AM -0700, Bart Van Assche wrote: > On 10/12/17 11:37, Ming Lei wrote: > > [ ... ] > > > > This patch improves dispatching from sw queue by using the callback of > > .get_budget and .put_budget > > > > Reviewed-by: Omar Sandoval > > Reviewed-by:

Re: [PATCH] target: make config_item_type const

2017-10-12 Thread kbuild test robot
Hi Bhumika, [auto build test WARNING on target/master] [also build test WARNING on v4.14-rc4 next-20171009] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 4/5] qla2xxx: Changes to support N2N logins

2017-10-12 Thread kbuild test robot
Hi Duane, [auto build test WARNING on scsi/for-next] [also build test WARNING on v4.14-rc4 next-20171009] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH 4/5] qla2xxx: Changes to support N2N logins

2017-10-12 Thread kbuild test robot
Hi Duane, [auto build test WARNING on scsi/for-next] [also build test WARNING on v4.14-rc4 next-20171009] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH V6 4/5] blk-mq-sched: improve dispatching from sw queue

2017-10-12 Thread Ming Lei
On Tue, Oct 10, 2017 at 11:23:45AM -0700, Omar Sandoval wrote: > On Mon, Oct 09, 2017 at 07:24:23PM +0800, Ming Lei wrote: > > SCSI devices use host-wide tagset, and the shared driver tag space is > > often quite big. Meantime there is also queue depth for each lun( > > .cmd_per_lun), which is

[PATCH] target: make config_item_type const

2017-10-12 Thread Bhumika Goyal
This is a followup patch for: https://lkml.org/lkml/2017/10/11/375 and https://patchwork.kernel.org/patch/649/ Make these structures const as they are either passed to the functions having the argument as const or stored as a reference in the "ci_type" const field of a config_item structure.

[PATCH v2 0/5] qcom-ufs: phy/hcd: Refactor phy initialization code

2017-10-12 Thread Vivek Gautam
Refactoring the qcom-ufs phy and host controller code to move further towards the generic phy usage. Right now the qcom-ufs exports a bunch of APIs that are used by the host controller to initialize the phy. With this patch series, we populate the phy_init() which was a no-op earlier. The host

[PATCH v2 5/5] ufs/phy: qcom: Refactor to use phy_init call

2017-10-12 Thread Vivek Gautam
Refactor ufs_qcom_power_up_sequence() to get rid of ugly exported phy APIs and use the phy_init() and phy_power_on() to do the phy initialization. Signed-off-by: Vivek Gautam --- Changes since v1: - The UFS phy retain state in low power mode. The phy can enter

[PATCH v2 3/5] phy: qcom-ufs: Add support to set phy mode

2017-10-12 Thread Vivek Gautam
Adding support to set desired UFS phy mode that can be set from the host controller. Signed-off-by: Vivek Gautam --- Changes since v1: - none. drivers/phy/qualcomm/phy-qcom-ufs-i.h| 2 ++ drivers/phy/qualcomm/phy-qcom-ufs-qmp-14nm.c | 14 ++

[PATCH v2 2/5] phy: Add UFS PHY modes

2017-10-12 Thread Vivek Gautam
UFS phy has two modes for each High speed generation. These modes are identified by two rates of operations - Rate A, and Rate B. Add these UFS phy modes to phy framework. Signed-off-by: Vivek Gautam --- Changes since v1: - Rebased on linux-phy/next.

[PATCH v2 4/5] scsi/ufs: qcom: Set phy mode based on the controllers HS MODE

2017-10-12 Thread Vivek Gautam
Set the phy mode based on the UFS HS PA mode. This lets the controller let phy know the mode in which the PHY Adapter is running and set the phy rates accordingly. Signed-off-by: Vivek Gautam Reviewed-by: Subhash Jadavani --- Changes since

[PATCH v2 1/5] dt-bindings: phy: Add PHY_TYPE_UFS definition

2017-10-12 Thread Vivek Gautam
Add definition for UFS phy type. Signed-off-by: Vivek Gautam --- Changes since v1: - none. include/dt-bindings/phy/phy.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/phy/phy.h b/include/dt-bindings/phy/phy.h index

Re: [PATCH] scsi: sd: add check for changing allow_restart

2017-10-12 Thread weiping zhang
On Wed, Oct 11, 2017 at 01:22:18PM -0400, Martin K. Petersen wrote: > > weiping, > > > /sys/class/scsi_disk/0:2:0:0/allow_restart can be changed to 0 unexpectly by > > writing invalid string, like following: > > > > echo asdf > /sys/class/scsi_disk/0:2:0:0/allow_restart > > Please switch to

[PATCH v2 0/2] change allow_restart, manage_start_stop to bool in sysfs

2017-10-12 Thread weiping zhang
Changes since V1: switch kstrtoint to kstrtobool. add fix for manage_start_stop. weiping zhang (2): scsi: sd: change allow_restart to bool in sysfs interface scsi: sd: change manage_start_stop to bool in sysfs interface drivers/scsi/sd.c | 12 ++-- 1 file changed, 10 insertions(+),

[PATCH v2 1/2] scsi: sd: change allow_restart to bool in sysfs interface

2017-10-12 Thread weiping zhang
/sys/class/scsi_disk/0:2:0:0/allow_restart can be changed to 0 unexpectly by writing invalid string, like following: echo asdf > /sys/class/scsi_disk/0:2:0:0/allow_restart Signed-off-by: weiping zhang --- drivers/scsi/sd.c | 6 +- 1 file changed, 5

[PATCH v2 2/2] scsi: sd: change manage_start_stop to bool in sysfs interface

2017-10-12 Thread weiping zhang
/sys/class/scsi_disk/0:2:0:0/manage_start_stop can be changed to 0 unexpectly by writing invalid string. Signed-off-by: weiping zhang --- drivers/scsi/sd.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c

Re: [PATCH 1/5] qla2xxx: Add module param ql2xenablemsix

2017-10-12 Thread Johannes Thumshirn
On Wed, Oct 11, 2017 at 01:36:46PM -0700, Madhani, Himanshu wrote: [...] > +int ql2xenablemsix = 1; > +module_param(ql2xenablemsix, int, 0444); > +MODULE_PARM_DESC(ql2xenablemsix, > +"Set to enable MSI or MSI-X interrupt mechanism.\n" > +" Default is 1, enable MSI-X interrupt mechanism.\n"

Re: [PATCH 3/5] qla2xxx: Allow MBC_GET_PORT_DATABASE to query and save the port states

2017-10-12 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH 2/5] qla2xxx: Add ATIO-Q processing for INTx mode

2017-10-12 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn Although I'd love to have a more descriptive changelog. -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg

Re: [PATCH 5/5] qla2xxx: Update driver version to 10.00.00.02-k

2017-10-12 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH 4/5] qla2xxx: Changes to support N2N logins

2017-10-12 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB