Re: [PATCH] SCSI: sd: don't fail if the device doesn't recognize SYNCHRONIZE CACHE

2014-02-05 Thread Daniel Mack
On 01/15/2014 09:37 PM, Alan Stern wrote: Evidently some wacky USB-ATA bridges don't recognize the SYNCHRONIZE CACHE command, as shown in this email thread: http://marc.info/?t=13897835622r=1w=2 The fact that we can't tell them to drain their caches shouldn't prevent the system

[no subject]

2014-02-05 Thread YUNG KIM
-- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

I HAVE A PROPOSAL FOR YOU!

2014-02-05 Thread YUNG 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

Proposal for a scalable SCSI midlayer

2014-02-05 Thread Christoph Hellwig
We've run into many issues where the SCSI layer simply does not scale to keep up with today's hardware, be that in simple single-thread IOPs, or in lock contention when using multiple LUNs or targets under a single SCSI host. This proposal tries to draw a path how to fix this properly and avoids

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

2014-02-05 Thread Christoph Hellwig
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 decrease performance on its own. Signed-off-by: Christoph Hellwig

[PATCH 08/17] scsi: do not manipulate device reference counts in scsi_get/put_command

2014-02-05 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 06/17] scsi: add support for per-host cmd pools

2014-02-05 Thread Christoph Hellwig
This allows drivers to specify the size of their per-command private data in the host template and then get extra memory allocated for each command instead of needing another allocation in -queuecommand. With the current SCSI code that already does multiple allocations for each command this

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

2014-02-05 Thread Christoph Hellwig
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. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi.c | 77 +++ 1 file changed,

[PATCH 10/17] scsi: micro-optimize scsi_next_command()

2014-02-05 Thread Christoph Hellwig
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 Signed-off-by: Christoph Hellwig h...@lst.de ---

[PATCH 01/17] scsi: handle command allocation failure in scsi_reset_provider

2014-02-05 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi_error.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 78b004d..f8b54c1 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -2289,6

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

2014-02-05 Thread Christoph Hellwig
This series contains various optimizations for the SCSI data I/O path. They increase the number of IOPS seen with iSCSI or SRP between 2% and 3.5% in workloads that previously hit the host_lock hard. While this isn't a lot it now fully shifts the contention to the queue_lock, which will get out

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

2014-02-05 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 | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c

[PATCH 17/17] scsi: fix the {host,target,device}_blocked counter mess

2014-02-05 Thread Christoph Hellwig
Seems like these counters are missing any sort of synchronization for updates, as a over 10 year old comment from me noted. Fix this by using atomic counters, and while we're at it also make sure they are in the same cacheline as the _busy counters and not needlessly stored to in every I/O

[PATCH 11/17] scsi: micro-optimize scsi_requeue_command()

2014-02-05 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 15/17] scsi: convert host_busy to atomic_t

2014-02-05 Thread Christoph Hellwig
Avoid taking the host-wide host_lock to check the per-host queue limit. Instead we do an atomic_inc_return early on to grab our slot in the queue, and if nessecary decrement it after finishing all checks. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/advansys.c |4

[PATCH 03/17] scsi: remove scsi_allocate_command/scsi_free_command

2014-02-05 Thread Christoph Hellwig
All users are gone, so we can get rid of these. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi.c | 56 -- include/scsi/scsi_cmnd.h |3 --- 2 files changed, 59 deletions(-) diff --git a/drivers/scsi/scsi.c

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

2014-02-05 Thread Christoph Hellwig
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 pass back the return value and get rid of all the complexities and abuse of the scsi_cmnd structure. Signed-off-by: Christoph Hellwig

[PATCH 16/17] scsi: convert device_busy to atomic_t

2014-02-05 Thread Christoph Hellwig
Avoid taking the queue_lock to check the per-device queue limit. Instead we do an atomic_inc_return early on to grab our slot in the queue, and if nessecary decrement it after finishing all checks. Unlike the host and target busy counters this doesn't allow us to avoid the queue_lock in the

[PATCH 14/17] scsi: convert target_busy to an atomic_t

2014-02-05 Thread Christoph Hellwig
Avoid taking the host-wide host_lock to check the per-target queue limit. Instead we do an atomic_inc_return early on to grab our slot in the queue, and if nessecary decrement it after finishing all checks. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi_lib.c| 52

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

2014-02-05 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 | 31 --- 1 file changed, 12 insertions(+), 19

[PATCH 07/17] virtio_scsi: use cmd_size

2014-02-05 Thread Christoph Hellwig
Taken almost entirely from Nicholas Bellinger's scsi-mq conversion. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/virtio_scsi.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c

[PATCH 09/17] scsi: micro-optimize scsi_request_fn()

2014-02-05 Thread Christoph Hellwig
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 cannot be active anymore after

[PATCH 04/15] blk-mq: handle dma_drain_size

2014-02-05 Thread Christoph Hellwig
Make blk-mq handle the dma_drain_size field the same way as the old request path. Signed-off-by: Christoph Hellwig h...@lst.de --- block/blk-mq.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index 6838fe8..0b72927 100644 --- a/block/blk-mq.c

[PATCH 00/15] A different approach for using blk-mq in the SCSI layer

2014-02-05 Thread Christoph Hellwig
As explained in my earlier proposal I think we need to move to blk-mq for the SCSI midlayer quickly, and in a way that keeps all the existing queueing mechanisms working. This series shows my current progress towards this goal. It works under medium loads for iSCSI and virtio_scsi and I'm fairly

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

2014-02-05 Thread Christoph Hellwig
This is neede for proper SG_IO operation as well as various uses of blk_execute_rq from the SCSI midlayer. Signed-off-by: Christoph Hellwig h...@lst.de --- block/blk-exec.c |4 ++-- block/blk-mq.c | 17 ++--- block/blk-mq.h |2 ++

[PATCH 14/15] iscsi_tcp: use blk_mq

2014-02-05 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/iscsi_tcp.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index add6d15..44aae3d 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -957,6 +957,7 @@

[PATCH 08/15] scsi: cleanup scsi_end_request calling conventions

2014-02-05 Thread Christoph Hellwig
Don't bother returning a stale pointer when a bool does the work much better. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi_lib.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/scsi_lib.c

[PATCH 07/15] block: remove unprep_rq_fn

2014-02-05 Thread Christoph Hellwig
Now that scsi doesn't use it anymore there's no user left. Signed-off-by: Christoph Hellwig h...@lst.de --- block/blk-core.c | 11 ++- block/blk-settings.c | 17 - include/linux/blkdev.h |3 --- 3 files changed, 2 insertions(+), 29 deletions(-) diff --git

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

2014-02-05 Thread Christoph Hellwig
Switch to using a preallocated flush_rq for blk-mq similar to what's done with the old request path. This allows us to set up the request properly with a tag from the actually allowed range and -rq_disk as needed by some drivers. To make life easier we also switch to dynamic allocation of

[PATCH 13/15] scsi: partially stub out scsi_adjust_queue_depth when using blk-mq

2014-02-05 Thread Christoph Hellwig
This will have to be funnelled to blk-mq directly, but skip it for now. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index cf5c110..014b642 100644 ---

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

2014-02-05 Thread Christoph Hellwig
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 hope to keep most of the additions for these in

[PATCH 10/15] scsi: split __scsi_queue_insert

2014-02-05 Thread Christoph Hellwig
Factor out a helper to set the _blocked values, which we'll reuse for the blk-mq code path. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi_lib.c | 44 ++-- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git

[PATCH 09/15] scsi: centralize command re-queueing in scsi_dispatch_fn

2014-02-05 Thread Christoph Hellwig
Make sure we only have the logic for requeing commands in one place. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi.c | 36 +--- drivers/scsi/scsi_lib.c |6 -- 2 files changed, 17 insertions(+), 25 deletions(-) diff --git

[PATCH 03/15] blk-mq: divert __blk_put_request for MQ ops

2014-02-05 Thread Christoph Hellwig
__blk_put_request needs to call into the blk-mq code just like blk_put_request. As we don't have the queue lock in this case both end up calling the same function. Signed-off-by: Christoph Hellwig h...@lst.de --- block/blk-core.c |5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 06/15] scsi: reintroduce scsi_driver.init_command

2014-02-05 Thread Christoph Hellwig
Instead of letting the ULD play games with the prep_fn move back to the model of a central prep_fn with a callback to the ULD. This already cleans up and shortens the code by itself, and will be required to properly support blk-mq in the SCSI midlayer. Signed-off-by: Christoph Hellwig

[PATCH 15/15] virtio_scsi: use blk_mq

2014-02-05 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/virtio_scsi.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index d9a6074..59b030c 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -680,6

[PATCH 11/15] scsi: factor out __scsi_init_queue

2014-02-05 Thread Christoph Hellwig
Factor code common out so that it can be reused independently for the blk-mq code path. Split from a bigger patch by Nicholas Bellinger. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi_lib.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff

[PATCH 05/15] blk-mq: initialize sg_reserved_size

2014-02-05 Thread Christoph Hellwig
To behave the same way as the old request path. Signed-off-by: Christoph Hellwig h...@lst.de --- block/blk-mq.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index 0b72927..d116282 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1363,6 +1363,8 @@

Dispo am Anschlag? ** Jetzt sofort ab 4,5 Prozent und ohne *Schufa* wieder Geld bekommen

2014-02-05 Thread Kathrin Schmid
Guten Tag, wieso zahlen Sie für einen Kredit so hohe Zinsen? Jetzt (noch) haben Sie bei ausländischen Instituten die besten Chancen. Also ideal für jeden, der frisches Geld braucht und insbesondere für Selbständige. Die Zinsen liegen zwischen 4,5% und 5,5% Zinsen p.a., die Kredite haben

Re: [PATCH] bio_integrity_add_page: check for BIO_POOL_NONE before determining nr_vecs on slab

2014-02-05 Thread David Milburn
On 02/03/2014 09:55 PM, Martin K. Petersen wrote: David == David Milburn dmilb...@redhat.com writes: David When enabling DIX T10-DIF-TYPE1-IP protection you can hit the David bip_vec full condition which fails to attach the integrity David metadata and returns 0 back to bio_integrity_prep()

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

2014-02-05 Thread James Bottomley
On Wed, 2014-02-05 at 14:47 +0900, Eiichi Tsukata wrote: Currently, scsi error handling in scsi_decide_disposition() tries to unconditionally requeue scsi command when device keeps some error state. This is because retryable errors are thought to be temporary and the scsi device will soon

[v2.6.34-stable 010/213] block: add and use scsi_blk_cmd_ioctl

2014-02-05 Thread Paul Gortmaker
From: Paolo Bonzini pbonz...@redhat.com --- This is a commit scheduled for the next v2.6.34 longterm release. http://git.kernel.org/?p=linux/kernel/git/paulg/longterm-queue-2.6.34.git If you see a problem with using this for longterm, please comment.

[v2.6.34-stable 011/213] block: fail SCSI passthrough ioctls on partition devices

2014-02-05 Thread Paul Gortmaker
From: Paolo Bonzini pbonz...@redhat.com --- This is a commit scheduled for the next v2.6.34 longterm release. http://git.kernel.org/?p=linux/kernel/git/paulg/longterm-queue-2.6.34.git If you see a problem with using this for longterm, please comment.

Re: [PATCH V2 0/8] be2iscsi: Update to 10.2.125.0

2014-02-05 Thread Mike Christie
On 01/29/2014 01:16 AM, Jayamohan Kallickal wrote: From: Jayamohan Kallickal jayamohan.kallic...@emulex.com This patchset updates be2iscsi driver to 10.2.125.0. Regarding comments by Mike Christie on Version 1 Patch 5/7) - converted to common function Patch 4/7 - Will withdraw for

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

2014-02-05 Thread Andy Grover
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 15:58 -0800, Andy Grover wrote: Use kref to handle

[PATCH 33/51] scsi, fcoe: Fix CPU hotplug callback registration

2014-02-05 Thread Srivatsa S. Bhat
Subsystems that want to register CPU hotplug callbacks, as well as perform initialization for the CPUs that are already online, often do it as shown below: get_online_cpus(); for_each_online_cpu(cpu) init_cpu(cpu);

[PATCH 31/51] scsi, bnx2i: Fix CPU hotplug callback registration

2014-02-05 Thread Srivatsa S. Bhat
Subsystems that want to register CPU hotplug callbacks, as well as perform initialization for the CPUs that are already online, often do it as shown below: get_online_cpus(); for_each_online_cpu(cpu) init_cpu(cpu);

[PATCH 32/51] scsi, bnx2fc: Fix CPU hotplug callback registration

2014-02-05 Thread Srivatsa S. Bhat
Subsystems that want to register CPU hotplug callbacks, as well as perform initialization for the CPUs that are already online, often do it as shown below: get_online_cpus(); for_each_online_cpu(cpu) init_cpu(cpu);

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

2014-02-05 Thread James Bottomley
On Wed, 2014-02-05 at 04:39 -0800, Christoph Hellwig wrote: This series contains various optimizations for the SCSI data I/O path. They increase the number of IOPS seen with iSCSI or SRP between 2% and 3.5% in workloads that previously hit the host_lock hard. While this isn't a lot it now

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

2014-02-05 Thread James Bottomley
On Wed, 2014-02-05 at 04:39 -0800, Christoph Hellwig wrote: Avoid hitting the host-wide free_list lock unless we need to put a command back onto the freelist. This one looks like it can go independently on its own. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi.c | 13

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

2014-02-05 Thread James Bottomley
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. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi.c | 77

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

2014-02-05 Thread James Bottomley
On Wed, 2014-02-05 at 04:39 -0800, Christoph Hellwig wrote: 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. This looks reasonable and can potentially go separately too. Signed-off-by: Christoph Hellwig

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

2014-02-05 Thread Muthu Kumar
On Wed, Feb 5, 2014 at 4:41 AM, Christoph Hellwig h...@infradead.org wrote: Switch to using a preallocated flush_rq for blk-mq similar to what's done with the old request path. This allows us to set up the request properly with a tag from the actually allowed range and -rq_disk as needed by

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

2014-02-05 Thread Muthu Kumar
diff --git a/block/blk-mq.h b/block/blk-mq.h index b771080..88a2366 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -30,6 +30,8 @@ void blk_mq_init_flush(struct request_queue *q); void blk_mq_drain_queue(struct request_queue *q); void blk_mq_free_queue(struct request_queue *q); void

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

2014-02-05 Thread Eiichi Tsukata
(2014/02/06 1:55), James Bottomley wrote: On Wed, 2014-02-05 at 14:47 +0900, Eiichi Tsukata wrote: Currently, scsi error handling in scsi_decide_disposition() tries to unconditionally requeue scsi command when device keeps some error state. This is because retryable errors are thought to be