Re: [PATCH 12/15] scsi: initial blk-mq support

2014-02-06 Thread Sagi Grimberg
On 2/5/2014 2:41 PM, Christoph Hellwig wrote: Add support for using the blk-mq code to submit requests to SCSI drivers. There is very little blk-mq specific code, but that's partially because important functionality like partial completions and request requeueing is still missing in blk-mq. I

[PATCH][RFC] Add EVPD page 0x83 entries to sysfs

2014-02-06 Thread Hannes Reinecke
EVPD page 0x83 is used to uniquely identify the device. So instead of having each and every program issue a separate SG_IO call to retrieve this information it does make far more sense to display it in sysfs. Cc: Jeremy Linton jlin...@tributary.com Cc: Doug Gilbert dgilb...@interlog.com Cc: Kai

Re: [PATCH] st: Do not rewind for SG_IO

2014-02-06 Thread Hannes Reinecke
On 02/03/2014 10:58 PM, Jeremy Linton wrote: On 2/3/2014 2:51 PM, Kay Sievers wrote: This is not simple and not going to happen. Sibling devices in /sys cannot have a relationship in udev, there are only parent/child dependencies. Ok.. so if we can't ignore all the spare device nodes

Re: [PATCH][RFC] Add EVPD page 0x83 entries to sysfs

2014-02-06 Thread Hannes Reinecke
On 02/06/2014 02:04 PM, Hannes Reinecke wrote: EVPD page 0x83 is used to uniquely identify the device. So instead of having each and every program issue a separate SG_IO call to retrieve this information it does make far more sense to display it in sysfs. Cc: Jeremy Linton

Re: [PATCH] st: Do not rewind for SG_IO

2014-02-06 Thread Martin K. Petersen
Hannes == Hannes Reinecke h...@suse.de writes: Hannes Moving EVPD page 0x83 (and maybe 0x80, too) into sysfs will save Hannes quite a lot of headache we have currently; udev won't have to Hannes call 'sg_inq', information will be present even though the Hannes device itself might be temporarily

Re: [PATCH] st: Do not rewind for SG_IO

2014-02-06 Thread Hannes Reinecke
On 02/06/2014 02:21 PM, Martin K. Petersen wrote: Hannes == Hannes Reinecke h...@suse.de writes: Hannes Moving EVPD page 0x83 (and maybe 0x80, too) into sysfs will save Hannes quite a lot of headache we have currently; udev won't have to Hannes call 'sg_inq', information will be present even

Re: [PATCH] st: Do not rewind for SG_IO

2014-02-06 Thread Martin K. Petersen
Hannes == Hannes Reinecke h...@suse.de writes: My patch provides both the original VPD 0x83 and 0x80 bits as well as a handle identical to /sbin/scsi_id. Hannes Bah, don't do that. That should better be handled by udev Hannes rules. I've got a set of patches moving from scsi_id to sg_inq,

RE: [PATCH 10/22] isci: Use pci_enable_msix_range()

2014-02-06 Thread Dorau, Lukasz
On Tuesday, February 04, 2014 12:17 PM Alexander Gordeev agord...@redhat.com wrote: As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() and

Re: [PATCH] st: Do not rewind for SG_IO

2014-02-06 Thread James Bottomley
On Thu, 2014-02-06 at 08:50 -0500, Martin K. Petersen wrote: Hannes == Hannes Reinecke h...@suse.de writes: My patch provides both the original VPD 0x83 and 0x80 bits as well as a handle identical to /sbin/scsi_id. Hannes Bah, don't do that. That should better be handled by udev

Re: [PATCH] st: Do not rewind for SG_IO

2014-02-06 Thread Hannes Reinecke
On 02/06/2014 03:38 PM, James Bottomley wrote: On Thu, 2014-02-06 at 08:50 -0500, Martin K. Petersen wrote: Hannes == Hannes Reinecke h...@suse.de writes: My patch provides both the original VPD 0x83 and 0x80 bits as well as a handle identical to /sbin/scsi_id. Hannes Bah, don't do that.

I HAVE A PROPOSAL FOR YOU!

2014-02-06 Thread Yung Kyu Kim
Hello, The Project is about the exportation of 100,000 barrels of Light Crude Oil daily out from Iraq to Turkey through my client's company in Iraq at the rate of $92.00 a barrel. This amount to $9,200,000 daily. I ask for your support as a foreigner to handle this business project with my client

Re: [PATCH 12/17] scsi: avoid taking host_lock in scsi_run_queue unless nessecary

2014-02-06 Thread Christoph Hellwig
On Wed, Feb 05, 2014 at 03:54:17PM -0800, James Bottomley wrote: -/* - * Function: scsi_run_queue() - * - * Purpose:Select a proper request queue to serve next - * - * Arguments: q - last request's queue - * - * Returns: Nothing - * - * Notes: The

Re: [PATCH 02/15] blk-mq: support at_head inserations for blk_execute_rq

2014-02-06 Thread Christoph Hellwig
On Wed, Feb 05, 2014 at 06:27:38PM -0800, Muthu Kumar wrote: Currently its not used by any drivers. Are we sure we don't need it public? If sure, please remove the EXPORT_SYMBOL() for it. Drivers shouldn't use it, it's a low-level interface. As mentioned in the intro this is not quite a

Re: [PATCH 04/17] scsi: avoid useless free_list lock roundtrips

2014-02-06 Thread Christoph Hellwig
On Wed, Feb 05, 2014 at 03:44:04PM -0800, James Bottomley wrote: Why do this? cmd is still likely to be not NULL, which helps the compiler optimise. Because testing for non-NULL pointers gets that hint implicitly from gcc. -- To unsubscribe from this list: send the line unsubscribe linux-scsi

Re: [PATCH 05/17] scsi: simplify command allocation and freeing a bit

2014-02-06 Thread Christoph Hellwig
On Wed, Feb 05, 2014 at 03:51:35PM -0800, James Bottomley wrote: On Wed, 2014-02-05 at 04:39 -0800, Christoph Hellwig wrote: Just have one level of alloc/free functions that take a host instead of two levels for the allocation and different calling conventions for the free.

Re: [PATCH 00/17] SCSI data path micro-optimizations

2014-02-06 Thread Christoph Hellwig
On Wed, Feb 05, 2014 at 03:41:04PM -0800, James Bottomley wrote: I will say that you do make the series hard to review by including things that do code churn for no gain: like making all the error handling goto based instead of the current in-place if () clause based ... this doesn't do

Re: [PATCH 12/15] scsi: initial blk-mq support

2014-02-06 Thread Christoph Hellwig
On Thu, Feb 06, 2014 at 10:38:17AM +0200, Sagi Grimberg wrote: Both you and Nic offer a single HW queue per sdev. I'm wandering if that should be the LLD's decision (if chooses to use multiple queues)? Trying to understand how LLDs will fit in a way they exploit multi-queue and actually

Re: [PATCH 01/15] block: rework flush sequencing for blk-mq

2014-02-06 Thread Christoph Hellwig
On Wed, Feb 05, 2014 at 06:08:37PM -0800, Muthu Kumar wrote: diff --git a/block/blk-core.c b/block/blk-core.c index c00e0bd..d3eb330 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -693,11 +693,20 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id)

[PATCH] block/null_blk: Fix completion processing from LIFO to FIFO

2014-02-06 Thread Shlomo Pongratz
The completion queue is implemented using lockless list. The llist_add is adds the events to the list head which is a push operation. The processing of the completion elements is done by disconnecting all the pushed elements and iterating over the disconnected list. The problem is that the

Re: [PATCH] block/null_blk: Fix completion processing from LIFO to FIFO

2014-02-06 Thread Christoph Hellwig
On Thu, Feb 06, 2014 at 06:33:17PM +0200, Shlomo Pongratz wrote: The completion queue is implemented using lockless list. The llist_add is adds the events to the list head which is a push operation. The processing of the completion elements is done by disconnecting all the pushed elements

Re: [PATCH 02/17] megaraid: simplify internal command handling

2014-02-06 Thread Christoph Hellwig
Hi Neela, can you look over this from the megaraid perspective? On Wed, Feb 05, 2014 at 04:39:32AM -0800, Christoph Hellwig wrote: We don't use the passed in scsi command for anything, so just add a adapter-wide internal status to go along with the internal scb that is used unter int_mtx to

Re: [PATCH 13/17] scsi: push host_lock down into scsi_{host,target}_queue_ready

2014-02-06 Thread James Bottomley
On Wed, 2014-02-05 at 04:39 -0800, Christoph Hellwig wrote: Prepare for not taking a host-wide lock in the dispatch path by pushing the lock down into the places that actually need it. Note that this patch is just a preparation step, as it will actually increase lock roundtrips and thus

Re: [PATCH 02/15] blk-mq: support at_head inserations for blk_execute_rq

2014-02-06 Thread Muthu Kumar
On Thu, Feb 6, 2014 at 8:17 AM, Christoph Hellwig h...@infradead.org wrote: On Wed, Feb 05, 2014 at 06:27:38PM -0800, Muthu Kumar wrote: Currently its not used by any drivers. Are we sure we don't need it public? If sure, please remove the EXPORT_SYMBOL() for it. Drivers shouldn't use it,

Re: [PATCH 02/15] blk-mq: support at_head inserations for blk_execute_rq

2014-02-06 Thread Christoph Hellwig
On Thu, Feb 06, 2014 at 09:05:10AM -0800, Muthu Kumar wrote: Alright then.. I will wait for that patch. BTW, is the scsi-mq work done on your git tree only or anyone else has their own git tree For now I put out a git tree for those who don't like large patch series. Happy to take patches for

Re: [PATCH 13/17] scsi: push host_lock down into scsi_{host,target}_queue_ready

2014-02-06 Thread Bart Van Assche
On 02/06/14 17:56, James Bottomley wrote: Could you benchmark this lot and show what the actual improvement is just for this series, if any? I see a performance improvement of 12% with the SRP protocol for the SCSI core optimizations alone (I am still busy measuring the impact of the blk-mq

Re: [PATCH 13/17] scsi: push host_lock down into scsi_{host,target}_queue_ready

2014-02-06 Thread James Bottomley
On Thu, 2014-02-06 at 18:10 +0100, Bart Van Assche wrote: On 02/06/14 17:56, James Bottomley wrote: Could you benchmark this lot and show what the actual improvement is just for this series, if any? I see a performance improvement of 12% with the SRP protocol for the SCSI core

[PATCH 5/6] scsi: remove a useless get/put_device pair in scsi_next_command

2014-02-06 Thread Christoph Hellwig
From: Bart Van Assche bvanass...@acm.org Eliminate a get_device() / put_device() pair from scsi_next_command(). Both are atomic operations hence removing these slightly improves performance. [hch: slight changes due to different context] Signed-off-by: Bart Van Assche bvanass...@acm.org

[PATCH 0/6] first batch of SCSI data path micro-optimizations

2014-02-06 Thread Christoph Hellwig
This series contains a few optimizations for the SCSI data I/O path. These are the patches acceptable to James as-is from the previous series. No separate benchmarking has been performed for these patches. This work was sponsored by the ION division of Fusion IO. -- To unsubscribe from this list:

[PATCH 3/6] scsi: do not manipulate device reference counts in scsi_get/put_command

2014-02-06 Thread Christoph Hellwig
Many callers won't need this and we can optimize them away. In addition the handling in the __-prefixed variants was inconsistant to start with. Based on an earlier patch from Bart Van Assche. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi.c | 36

[PATCH 1/6] scsi: avoid useless free_list lock roundtrips

2014-02-06 Thread Christoph Hellwig
Avoid hitting the host-wide free_list lock unless we need to put a command back onto the freelist. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c

[PATCH 4/6] scsi: remove a useless get/put_device pair in scsi_request_fn

2014-02-06 Thread Christoph Hellwig
From: Bart Van Assche bvanass...@acm.org SCSI devices may only be removed by calling scsi_remove_device(). That function must invoke blk_cleanup_queue() before the final put of sdev-sdev_gendev. Since blk_cleanup_queue() waits for the block queue to drain and then tears it down, scsi_request_fn

[PATCH 6/6] scsi: remove a useless get/put_device pair in scsi_requeue_command

2014-02-06 Thread Christoph Hellwig
Avoid a spurious device get/put cycle by using scsi_put_command and folding scsi_unprep_request into scsi_requeue_command. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi_lib.c | 35 +++ 1 file changed, 3 insertions(+), 32 deletions(-) diff

[PATCH 2/6] scsi: avoid taking host_lock in scsi_run_queue unless nessecary

2014-02-06 Thread Christoph Hellwig
If we don't have starved devices we don't need to take the host lock to iterate over them. Also split the function up to be more clear. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi_lib.c | 43 --- 1 file changed, 24 insertions(+),

Re: [PATCH][RFC] Add EVPD page 0x83 entries to sysfs

2014-02-06 Thread Douglas Gilbert
On 14-02-06 08:04 AM, Hannes Reinecke wrote: EVPD page 0x83 is used to uniquely identify the device. So instead of having each and every program issue a separate SG_IO call to retrieve this information it does make far more sense to display it in sysfs. Cc: Jeremy Linton jlin...@tributary.com

Re: [PATCH] st: Do not rewind for SG_IO

2014-02-06 Thread Douglas Gilbert
On 14-02-06 10:13 AM, Hannes Reinecke wrote: On 02/06/2014 03:38 PM, James Bottomley wrote: On Thu, 2014-02-06 at 08:50 -0500, Martin K. Petersen wrote: Hannes == Hannes Reinecke h...@suse.de writes: My patch provides both the original VPD 0x83 and 0x80 bits as well as a handle identical to

Re: [PATCH] block/null_blk: Fix completion processing from LIFO to FIFO

2014-02-06 Thread Jens Axboe
On Thu, Feb 06 2014, Christoph Hellwig wrote: On Thu, Feb 06, 2014 at 06:33:17PM +0200, Shlomo Pongratz wrote: The completion queue is implemented using lockless list. The llist_add is adds the events to the list head which is a push operation. The processing of the completion elements

Re: [PATCH] scsi/isci/port_config: Fix a infinite loop.

2014-02-06 Thread Dan Williams
On Tue, Jul 16, 2013 at 7:54 PM, Xinghai Yu yuxing...@cn.fujitsu.com wrote: It seems the phy_index++; have been placed in wrong place, without it the while circle up will do a infinite loop. Signed-off-by: Xinghai Yu yuxing...@cn.fujitsu.com --- drivers/scsi/isci/port_config.c |2 +- 1

[PATCH 3/4] isci: fix needless ata reset escalations

2014-02-06 Thread Dan Williams
isci is needlessly tying libata's hands by returning SAM_STAT_CHECK_CONDITION to some ata errors. Instead, prefer SAS_PROTO_RESPONSE to let libata (via sas_ata_task_done()) disposition the device-to-host fis. For example isci is triggering an HSM Violation where AHCI is showing a simple media

[PATCH 0/4] isci, libsas fixes for 3.4-rc2

2014-02-06 Thread Dan Williams
Hi James, Here are some collected fixes. All but patch 2 are tagged for -stable. Patch 1 and 4 have been on the list since before the 3.14 merge window, patch 2 and 3 are new. Please apply, thank you. [PATCH 1/4] isci: fix reset timeout handling [PATCH 2/4] scsi, libsas: introduce scmd_dbg()

[PATCH 2/4] scsi, libsas: introduce scmd_dbg() to quiet false positive timeout messages

2014-02-06 Thread Dan Williams
libsas sometimes short circuits timeouts to force commands into error recovery. It is misleading to log that the command timed-out in sas_scsi_timed_out() when in fact it was just queued for error handling. It's also redundant in the case of a true timeout as libata eh will detect and report

[PATCH 4/4] isci: correct erroneous for_each_isci_host macro

2014-02-06 Thread Dan Williams
From: Lukasz Dorau lukasz.do...@intel.com In the first place, the loop 'for' in the macro 'for_each_isci_host' (drivers/scsi/isci/host.h:314) is incorrect, because it accesses the 3rd element of 2 element array. After the 2nd iteration it executes the instruction: ihost =

[PATCH 1/4] isci: fix reset timeout handling

2014-02-06 Thread Dan Williams
Remove an erroneous BUG_ON() in the case of a hard reset timeout. The reset timeout handler puts the port into the awaiting link-up state. The timeout causes the device to be disconnected and we need to be in the awaiting link-up state to re-connect the port. The BUG_ON() made the incorrect

Re: [PATCH 13/17] scsi: push host_lock down into scsi_{host,target}_queue_ready

2014-02-06 Thread Nicholas A. Bellinger
On Thu, 2014-02-06 at 18:10 +0100, Bart Van Assche wrote: On 02/06/14 17:56, James Bottomley wrote: Could you benchmark this lot and show what the actual improvement is just for this series, if any? I see a performance improvement of 12% with the SRP protocol for the SCSI core

Re: [PATCH 12/15] scsi: initial blk-mq support

2014-02-06 Thread Nicholas A. Bellinger
On Wed, 2014-02-05 at 04:41 -0800, Christoph Hellwig wrote: plain text document attachment (0012-scsi-initial-blk-mq-support.patch) Add support for using the blk-mq code to submit requests to SCSI drivers. There is very little blk-mq specific code, but that's partially because important

Re: [PATCH 06/32] target: Convert lu_gp_ref_cnt to kref

2014-02-06 Thread Nicholas A. Bellinger
On Wed, 2014-02-05 at 14:02 -0800, Andy Grover wrote: Hi nab, I'm getting back to looking at this patchset, but wanted to just discuss and understand this one first because all the kref ones are similar. see below. On 12/16/2013 12:52 PM, Nicholas A. Bellinger wrote: On Fri, 2013-12-13 at

LSI SAS2008 SATA TRIM not working

2014-02-06 Thread Kurt Miller
Various sources indicate that LSI's SAS2008 controllers support TRIM when running their IT firmware (LSI [1] and this list [2]). However, I have not been able to get it working with Dell PERC H200 or H310 cross flashed into LSI IT firmware. Currently I'm testing with Samsung 840 EVO SATA SSDs. I

FW: [LSF/MM TOPIC] New Storage capabilities

2014-02-06 Thread Knight, Frederick
Several new features are becoming a reality in SCSI and ATA this year, and I would like to participate in the discussions on supporting these new features. a) SCSI conglomerate LUNs (using more bits in the LUN to manage groupings of logical units); b) Atomic commands; c) IO

[PATCH v2] scsi: Add 'retry_timeout' to avoid infinite command retry

2014-02-06 Thread Eiichi Tsukata
Currently, scsi error handling in scsi_io_completion() tries to unconditionally requeue scsi command when device keeps some error state. For example, UNIT_ATTENTION causes infinite retry with action == ACTION_RETRY. This is because retryable errors are thought to be temporary and the scsi device

Investitionshilfe.

2014-02-06 Thread Miss Laura Buisson
Investitionshilfe. Ich bin Fräulein Laura Buisson, Einzel weiblich (nie verheiratet) mich und meinen jüngeren Bruder, plane ich, zu Ihrem Land für Investitionszwecke zu verlagern. Ich habe einige Fonds und im Hotel-und Transportgeschäft investieren wollen und wir $ 10.500.000,00 (zehn

Re: [PATCH 0/6] iscsi changes for scsi-misc

2014-02-06 Thread Mike Christie
On 12/20/2013 12:53 PM, micha...@cs.wisc.edu wrote: The following patches are some features and fixes for scsi-misc. James, if you were going to merge the libiscsi locking changes here http://www.spinics.net/lists/linux-scsi/msg69903.html do not bother. The qlogic patches that were just

Re: [PATCH 06/32] target: Convert lu_gp_ref_cnt to kref

2014-02-06 Thread Andy Grover
On 02/06/2014 03:51 PM, Nicholas A. Bellinger wrote: The problem with this patch and all of the other patches that follow the same logic is the false assumption that it's safe to return from configfs_group_operations-drop_item() before all references to the underlying data structure containing

Re: [PATCH 04/16] scsi_dh_alua: Make stpg synchronous

2014-02-06 Thread Mike Christie
On 01/31/2014 03:29 AM, Hannes Reinecke wrote: We should be issuing STPG synchronously as we need to evaluate the return code on failure. Signed-off-by: Hannes Reinecke h...@suse.de I think we need to also make dm-mpath.c use a non-ordered workqueue for kmpath_handlerd. With this patch and

Re: [PATCH 04/16] scsi_dh_alua: Make stpg synchronous

2014-02-06 Thread Mike Christie
On 02/06/2014 07:24 PM, Mike Christie wrote: On 01/31/2014 03:29 AM, Hannes Reinecke wrote: We should be issuing STPG synchronously as we need to evaluate the return code on failure. Signed-off-by: Hannes Reinecke h...@suse.de I think we need to also make dm-mpath.c use a non-ordered

Re: [PATCH v2] scsi: Add 'retry_timeout' to avoid infinite command retry

2014-02-06 Thread James Bottomley
On Fri, 2014-02-07 at 09:22 +0900, Eiichi Tsukata wrote: Currently, scsi error handling in scsi_io_completion() tries to unconditionally requeue scsi command when device keeps some error state. For example, UNIT_ATTENTION causes infinite retry with action == ACTION_RETRY. This is because

Re: [PATCH v2] scsi: Add 'retry_timeout' to avoid infinite command retry

2014-02-06 Thread Libo Chen
On 2014/2/7 13:46, James Bottomley wrote: On Fri, 2014-02-07 at 09:22 +0900, Eiichi Tsukata wrote: Currently, scsi error handling in scsi_io_completion() tries to unconditionally requeue scsi command when device keeps some error state. For example, UNIT_ATTENTION causes infinite retry with

[PATCH 0/6]: iscsi changes for scsi-misc (v2)

2014-02-06 Thread michaelc
This patchset has Mellanox's libiscsi locking changes, and various fixes. V2 - Fix for MaxCmdSn handling in patch 3/6 where the part of the function that also updates the MaxCmdSn also got cut by accident. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a

[PATCH 6/6] iscsi_tcp: check for valid session before accessing

2014-02-06 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu Check that the session is setup before accessing its connection. This fixes a oops where userspace tries to get the ip address before the session is bound to a host. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/iscsi_tcp.c |3

[PATCH 4/6] be2iscsi: fix lun test in device reset callout

2014-02-06 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu We want to be checking the scsi_cmnd's lun against the possible tasks in the driver. Current check tests task against itself which was useless. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/be2iscsi/be_main.c |2 +- 1 files

[PATCH 1/6] SCSI/libiscsi: Restructure iscsi_tcp r2t response logic

2014-02-06 Thread michaelc
From: Shlomo Pongratz shlo...@mellanox.com Restructure the iscsi_tcp_r2t_rsp routine in order to avoid allocating r2t from r2tpool.queue and returning it back in case the parameters rhdr-data_length and or rhdr-data_offset prohibit the requing. Since the values of these parameters are known

[PATCH 3/6] libiscsi: remove unneeded queue work when max_cmdsn is increased

2014-02-06 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu iscsi_queuecommand will only take in commands that can fit in the current window. So, if a command is on the cmdqueue then it can fit in the current window. If a command is on the mgmtqueue, then we are setting the immediate bit so they will also fit in

[PATCH 2/6] SCSI/libiscsi: Reduce locking contention in fast path (v2)

2014-02-06 Thread michaelc
From: Shlomo Pongratz shlo...@mellanox.com Replace the session lock with two locks, a forward lock and a backwards lock named frwd_lock and back_lock respectively. The forward lock protects resources that change while sending a request to the target, such as cmdsn, queued_cmdsn, and allocating