> --- a/drivers/scsi/esp_scsi.h
> +++ b/drivers/scsi/esp_scsi.h
> @@ -1,4 +1,4 @@
> -/* esp_scsi.h: Defines and structures for the ESP drier.
> +/* esp_scsi.h: Defines and structures for the ESP driver.
> *
> * Copyright (C) 2007 David S. Miller (da...@davemloft.net)
> */
>
On 15/11/2014 04:47, Ming Lei wrote:
> Since virtio_scsi has supported multi virtqueue already,
> it is natural to map the virtque to hw-queue of blk-mq.
>
> Cc: Paolo Bonzini
> Signed-off-by: Ming Lei
> ---
> V1:
> - support non-mq too
>
> dri
On 10/11/2014 17:05, Christoph Hellwig wrote:
>
> a) there is no multiath support for it, and we simply can't break existing
> setups that use.
> b) there is no support for I/O schedulers at all. This might be okay
> for virtio-scsi, where in general you have a host scheduler, but for
D_LBP_WS16);
> else if (sdkp->lbpws10)
> sd_config_discard(sdkp, SD_LBP_WS10);
> + else if (sdkp->lbpu && sdkp->max_unmap_blocks)
> + sd_config_discard(sdkp, SD_LBP_UNMAP)
On 09/11/2014 17:57, Ming Lei wrote:
> Since virtio_scsi has supported multi virtqueue already,
> it is natural to map virtque to hw-queue of blk-mq.
>
> Cc: Paolo Bonzini
> Signed-off-by: Ming Lei
> ---
> drivers/scsi/virtio_scsi.c | 154
> -
Il 09/10/2014 10:49, Paolo Bonzini ha scritto:
>
> It does not happen if you close QEMU with SIGTERM, ctrl-c, or with the
> "quit" command, because no attempt is done to bring down the VM data
> structures (or free memory, or close file descriptors) in case of a
> fatal
Il 09/10/2014 06:14, Nicholas A. Bellinger ha scritto:
> AFAICT from qemu code, the ioctl VHOST_SCSI_CLEAR_ENDPOINT is always
> called during shutdown in order to release the endpoint and drop this
> new configfs dependency.
As far as I can see, the only path leading to the ioctl is
vhost_scsi_set
Il 29/08/2014 08:08, Hannes Reinecke ha scritto:
>>
> No.
> FAILED for any eh_abort_cmd() means that the TMF hasn't been sent.
> So the midlayer escalates to the next EH step.
> The command will only ever be re-issued once EH completes.
Then the answer to Hans's question is yes. It is legal to ca
Il 28/08/2014 17:50, Elliott, Robert (Server Storage) ha scritto:
> Is the block layer prevented from issuing a new command with the
> same tag before the error handling is finished?
Tags are chosen by the LLDs, so it's up to it to pick the right tags.
Paolo
--
To unsubscribe from this list: send
Il 28/08/2014 16:17, Hannes Reinecke ha scritto:
>>
> As mentioned earlier, as soon as SCSI EH is invoked control
> is assumed to be transferred back to the SCSI midlayer.
> How the midlayer interprets any return value from the various eh_XX
> callbacks is immaterial to the LLDD.
>
> So even if th
Il 28/08/2014 14:26, Hans de Goede ha scritto:
>> > Then, blk_complete_request will do nothing because its call to
>> > blk_mark_rq_complete returns true.
>> >
>> > All this, of course, as long as ->scsi_done is called _before_ eh_abort
>> > returns.
> What about calling scsi_done after eh_abort i
Il 28/08/2014 14:04, Hannes Reinecke ha scritto:
>>
>> Setting TASK ABORTED aside, the important part is that an abort can do
>> one of two things:
>>
>> - complete the command, and then eh_abort should return after the driver
>> has noticed the completion and called the ->scsi_done callback for th
Il 25/08/2014 13:26, Hans de Goede ha scritto:
> Thanks Bart and Paolo, your insights into this are greatly appreciated.
>
> So with uas there are separate usb transaction for cmd, data in, data out
> and sense for each tag. At the time of abort, usually one of data in / data
> out and a sense usb
Il 25/08/2014 12:28, Bart Van Assche ha scritto:
>
> From SPC-4: "7.5.8 Control mode page [ ... ] A task aborted status (TAS)
> bit set to zero specifies that aborted commands shall be terminated by
> the device server without any response to the application client. A TAS
> bit set to one specifie
Il 23/08/2014 16:52, Hans de Goede ha scritto:
> Hi All,
>
> Now that the UAS driver is no longer marked as CONFIG_BROKEN,
> I'm getting quite a few bug reports about issues with UAS drives.
>
> One if the issues is that there might be a number of bugs in the
> abort handling path, as I don't thi
Il 18/07/2014 16:57, Ming Lei ha scritto:
> - if (sc->sense_buffer) {
> + if (resp->sense_len) {
In the (unlikely) case that sc->sense_buffer == NULL, you'd pass a NULL
to memcpy.
If you want, you can change this if to
if (sc->sense_buffer && resp->sense_len)
but frankly it seem
virtscsi_target_alloc. - Paolo]
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 42 +-
1 file changed, 29 insertions(+), 13 deletions(-)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 308256b5e4cb..f67a872de14b 100644
--- a
maximum when the
BUSY condition has resolved.
Signed-off-by: Venkatesh Srinivas
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 33 +
1 file changed, 33 insertions(+)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index f67a872de14b
Christoph asked me to rebase the two virtio-scsi patches from
http://thread.gmane.org/gmane.linux.kernel/1717796 that do not apply
anymore, patch 2 and 6.
These are on top of his drivers-for-3.16 branch, more precisely commit
8faeb529b2da (virtio-scsi: fix various bad behavior on aborted requests)
there's much to review there. :)
Reviewed-by: Paolo Bonzini
Paolo
--
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
_check scsi_add_host(struct Scsi_Host *host,
struct device *dev)
{
Reviewed-by: Paolo Bonzini
--
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
Il 24/06/2014 16:28, Christoph Hellwig ha scritto:
> Adding Paul and Nathan to cc here. I'm pretty sure the backend for ibmvscsi in
> KVM was all done in qemu and there is no dependency on ibmvstgt.
>
FWIW the ibmvscsi backend is indeed entirely in userspace
(hw/scsi/spapr_vscsi.c in the QEMU
Il 10/06/2014 10:04, Nicholas A. Bellinger ha scritto:
That said, there is one other small qla2xxx change to enable per-session
PI that is currently missing in Quinn's patch in scsi/for-next code.
Sooo, I'll go ahead and include Sagi's patches with the vhost-scsi
change below if there are no ob
Il 10/06/2014 09:07, Nicholas A. Bellinger ha scritto:
> OK, finally went over this, looks good to me:
>
> Acked-by: Michael S. Tsirkin
>
> However, we really should stop making more changes
> before fixing ANY_LAYOUT in this driver.
>
> virtio 1.0 should be out soon and that makes ANY_LAYOUT
>
Il 08/06/2014 18:05, Michael S. Tsirkin ha scritto:
OK, finally went over this, looks good to me:
Acked-by: Michael S. Tsirkin
However, we really should stop making more changes
before fixing ANY_LAYOUT in this driver.
virtio 1.0 should be out soon and that makes ANY_LAYOUT
a required featur
Il 05/06/2014 08:16, Liu Ping Fan ha scritto:
Take the following scene in guest:
seqA: scsi_done() -> gapX (before taking REQ_ATOM_COMPLETE)
seqB: scmd_eh_abort_handler()-> ...-> ibmvscsi_eh_abort_handler()->
...->scsi_put_command(scmd)
If seqA is scheduled at gapX, and seqB reclaims scmd.
Il 04/06/2014 19:29, Venkatesh Srinivas ha scritto:
Do you really want to poll the request VQs for completions if the TMF
was rejected?
I wasn't sure, but bugs in this path are hard enough that I preferred
the safer patch.
TMF ABORT may return FUNCTION REJECTED if the command to abort
compl
in patch 4
v2->v3: really fix all occurrences in patch 4
Ming Lei (2):
virtio_scsi: remove ACCESS_ONCE() and smp_read_barrier_depends()
virtio-scsi: replace target spinlock with seqcount
Paolo Bonzini (2):
virtio-scsi: avoid cancelling uninitialized work items
virtio-scsi: fi
Calling the workqueue interface on uninitialized work items isn't a
good idea even if they're zeroed. It's not failing catastrophically only
through happy accidents.
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion
req_vq is read from
scsi->req_vqs[vq->index - VIRTIO_SCSI_VQ_BASE] instead of
tgt->req_vq, so remove the unnecessary barrier.
Also remove related comment about the barrier.
Cc: Paolo Bonzini
Signed-off-by: Ming Lei
Signed-off-by: Paolo Bonzini
---
dri
: Paolo Bonzini
---
v1->v2: fix all occurrences [Bart] except one
v2->v3: really fix all occurrences [Bart]
drivers/scsi/scsi_error.c | 6 +++---
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index f17aa7
virtscsi_target_alloc. - Paolo]
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 42 +-
1 file changed, 29 insertions(+), 13 deletions(-)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index fc054935eb1f..f0b4cdbfceb0 100644
--- a
Gs or oopses.
Cc: sta...@vger.kernel.org
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index d66c4ee2c774..fda9fb35 100644
--- a/drivers
maximum when the
BUSY condition has resolved.
Signed-off-by: Venkatesh Srinivas
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 33 +
1 file changed, 33 insertions(+)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index fda9fb35
Il 04/06/2014 13:21, Bart Van Assche ha scritto:
Thanks for the quick respin. However, since you are mentioning that in
v2 all occurrences of "scmd->result |= DID_TIME_OUT << 16" have been
addressed, this made me wonder whether you had noticed the following
code in scsi_decide_disposition() ?
virtscsi_target_alloc. - Paolo]
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 42 +-
1 file changed, 29 insertions(+), 13 deletions(-)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index fc054935eb1f..f0b4cdbfceb0 100644
--- a
req_vq is read from
scsi->req_vqs[vq->index - VIRTIO_SCSI_VQ_BASE] instead of
tgt->req_vq, so remove the unnecessary barrier.
Also remove related comment about the barrier.
Cc: Paolo Bonzini
Signed-off-by: Ming Lei
Signed-off-by: Paolo Bonzini
---
dri
maximum when the
BUSY condition has resolved.
Signed-off-by: Venkatesh Srinivas
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 33 +
1 file changed, 33 insertions(+)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index fda9fb35
Gs or oopses.
Cc: sta...@vger.kernel.org
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index d66c4ee2c774..fda9fb35 100644
--- a/drivers
Calling the workqueue interface on uninitialized work items isn't a
good idea even if they're zeroed. It's not failing catastrophically only
through happy accidents.
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion
: Paolo Bonzini
---
v1->v2: fix all occurrences [Bart]
drivers/scsi/scsi_error.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index f17aa7aa7879..8e7a0f8d4f52 100644
--- a/drivers/scsi/scsi_error.c
+++ b/driv
in patch 4
Ming Lei (2):
virtio_scsi: remove ACCESS_ONCE() and smp_read_barrier_depends()
virtio-scsi: replace target spinlock with seqcount
Paolo Bonzini (2):
virtio-scsi: avoid cancelling uninitialized work items
virtio-scsi: fix various bad behavior on aborted requests
Ulrich Oberg
req_vq is read from
scsi->req_vqs[vq->index - VIRTIO_SCSI_VQ_BASE] instead of
tgt->req_vq, so remove the unnecessary barrier.
Also remove related comment about the barrier.
Cc: Paolo Bonzini
Signed-off-by: Ming Lei
Signed-off-by: Paolo Bonzini
---
dri
Paolo
Ming Lei (2):
virtio_scsi: remove ACCESS_ONCE() and smp_read_barrier_depends()
virtio-scsi: replace target spinlock with seqcount
Paolo Bonzini (2):
virtio-scsi: avoid cancelling uninitialized work items
virtio-scsi: fix various bad behavior on aborted requests
Ulrich Obergfe
maximum when the
BUSY condition has resolved.
Signed-off-by: Venkatesh Srinivas
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 33 +
1 file changed, 33 insertions(+)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index fda9fb35
Calling the workqueue interface on uninitialized work items isn't a
good idea even if they're zeroed. It's not failing catastrophically only
through happy accidents, and a debug kernel rightfully complains.
Cc: sta...@vger.kernel.org
Signed-off-by: Paolo Bonzini
---
drivers/scs
result field and initiate an unwanted command retry.
Fix this by using set_host_byte instead, following the model of
commit 2082ebc45af9c9c648383b8cde0dc1948eadbf31.
Cc: sta...@vger.kernel.org
Signed-off-by: Ulrich Obergfell
Signed-off-by: Paolo Bonzini
---
drivers/scsi/scsi_error.c | 2 +-
1 file
Gs or oopses.
Cc: sta...@vger.kernel.org
Cc: Ulrich Obergfell
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index d66c4ee2c774..fda9fb35 100644
virtscsi_target_alloc. - Paolo]
Signed-off-by: Paolo Bonzini
---
drivers/scsi/virtio_scsi.c | 42 +-
1 file changed, 29 insertions(+), 13 deletions(-)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index fc054935eb1f..f0b4cdbfceb0 100644
--- a
Il 03/06/2014 03:00, Martin K. Petersen ha scritto:
"Paolo" == Paolo Bonzini writes:
+ sdev_printk(KERN_ERR, sdev,
+ "%s: VPD page 0x83 NAA descriptor not found\n", __func__);
+
+ return;
Paolo> I suspect this error will be relatively common.
You're right. But
Il 29/05/2014 05:52, Martin K. Petersen ha scritto:
> + sdev_printk(KERN_ERR, sdev,
> + "%s: VPD page 0x83 NAA descriptor not found\n", __func__);
> +
> + return;
I suspect this error will be relatively common.
libata for example has
if (ata_id_has_wwn(args->id))
Il 30/05/2014 10:15, Liu Ping Fan ha scritto:
When running io stress test on large latency scsi-disk, e.g guest with virtscsi
on a nfs image. It can trigger the BUG_ON(test_bit(REQ_ATOM_COMPLETE,
&req->atomic_flags));
in blk_start_request().
Since there is a race between latency "finishing" scmd
Il 28/05/2014 00:21, Nicholas A. Bellinger ha scritto:
On Mon, 2014-05-26 at 13:30 -0400, Martin K. Petersen wrote:
"Nic" == Nicholas A Bellinger writes:
What about #ifdef'ing VIRTIO_SCSI_F_T10_PI support out if
!CONFIG_BLK_DEV_INTEGRITY?
Nic> I figured it was slightly cleaner to enable BL
Il 28/05/2014 03:48, Ming Lei ha scritto:
On Wed, May 28, 2014 at 12:57 AM, Paolo Bonzini wrote:
Il 27/05/2014 18:50, Venkatesh Srinivas ha scritto:
Hi,
I think this patch has a small race involving just two commands:
1. The first command to a target is in virtscsi_pick_vq(), after
Il 27/05/2014 18:50, Venkatesh Srinivas ha scritto:
Hi,
I think this patch has a small race involving just two commands:
1. The first command to a target is in virtscsi_pick_vq(), after
atomic_inc_return(&tgt->tgt_lock)) but before write_seqcount_begin()
2. A second command to the same targe
Il 27/05/2014 13:26, James Bottomley ha scritto:
You could use a different mechanism than a softirq to tell the abort
were successful, for example by overriding scsi_done. But with respect
to the block layer, the mechanics of avoiding the race and double-free
would probably be the same.
I thin
Il 27/05/2014 12:59, James Bottomley ha scritto:
On Tue, 2014-05-27 at 12:47 +0200, Paolo Bonzini wrote:
Il 27/05/2014 12:21, James Bottomley ha scritto:
I could also see us one day extending the TMF capability to abort any
running command, which would make even an assertion of block timed out
Il 27/05/2014 12:21, James Bottomley ha scritto:
I could also see us one day extending the TMF capability to abort any
running command, which would make even an assertion of block timed out
or completed invalid.
Actually the assertion would remain valid, and that's exactly what Bart
wants to d
Il 27/05/2014 10:56, James Bottomley ha scritto:
The whole reason BUG_ON doesn't leave a log trace is to try to prevent
corruption propagating to the data storage devices. What you propose
would be inviting that corruption in the name of getting a log entry.
Even this is not entirely correct.
().
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: Paolo Bonzini
Cc: Christoph Hellwig
Cc: Jens Axboe
Cc: Joe Lawrence
---
drivers/scsi/scsi.c | 2 +-
drivers/scsi/scsi_error.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/scsi.c b/drivers
Il 23/05/2014 15:28, Ming Lei ha scritto:
The spinlock of tgt_lock is only for serializing read and write
req_vq, one lockless seqcount is enough for the purpose.
On one 16core VM with vhost-scsi backend, the patch can improve
IOPS with 3% on random read test.
Nice. :) The patch looks good, t
Il 23/05/2014 12:37, Bart Van Assche ha scritto:
On 05/23/14 11:24, Paolo Bonzini wrote:
Il 23/05/2014 08:09, Hannes Reinecke ha scritto:
And when freeing a command we absolutely need to make sure that
the workqueue is empty.
So calling cancel_delayed_work() was the obvious thing to do.
You
Il 23/05/2014 08:09, Hannes Reinecke ha scritto:
And when freeing a command we absolutely need to make sure that
the workqueue is empty.
So calling cancel_delayed_work() was the obvious thing to do.
You would need cancel_delayed_work_sync, but if it really happened that
the work item is runni
Il 23/05/2014 03:28, Elliott, Robert (Server Storage) ha scritto:
Depending on the transport, there may be a race condition between
the command status and the ABORT TASK response; the ABORT TASK
response might get back first. I think that means
scsi_eh_abort_handler's call to scsi_finish_command
Il 22/05/2014 22:46, Nicholas A. Bellinger ha scritto:
Hi Fengguang,
On Thu, 2014-05-22 at 11:13 +0800, kbuild test robot wrote:
tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git
for-next
head: 4baaa7d589e24bfe87dfd6c7a1229108be404a28
commit: 4baaa7d589e24bfe87dfd6
Il 21/05/2014 15:30, Bart Van Assche ha scritto:
+static bool scmd_being_handled_in_other_context(struct scsi_cmnd *scmd)
+{
+ struct Scsi_Host *shost = scmd->device->host;
+ struct scsi_cmnd *c;
+ unsigned long flags;
+ bool ret = false;
+
+ if (!blk_rq_completed(sc
ull request,
Acked-by: Paolo Bonzini
for getting this in via the target tree.
Paolo
v4 changes:
- Convert virtio_scsi_init_hdr_pi to use pi_bytesout + pi_bytesin
(mst + paolo + nab)
- Use blk_integrity->tuple_size to calculate pi bytes (nab)
v3 changes:
- Use VIRTIO_SCSI_F_T10_PI to det
Il 22/05/2014 04:26, Nicholas A. Bellinger ha scritto:
From: Nicholas Bellinger
Hi MST, MKP, Paolo & Co,
Here is the v2 patch series for adding T1O protection information (PI)
SGL passthrough support between virtio-scsi LLD + vhost-scsi fabric
endpoints.
Following MST's recommendation, it inc
Il 21/05/2014 16:16, Mark Wu ha scritto:
Is it possible that when scsi_done is invoked, the scsi command or the
request has been freed and then reallocated for a new I/O request? Because
of this the bit flag REQ_ATOM_COMPLETE becomes unreliable. Thanks!
It is up to the driver to ensure that t
Il 20/05/2014 10:10, Bart Van Assche ha scritto:
REQ_ATOM_COMPLETE is already set before scsi_eh_scmd_add() is called
since that function is only invoked after the block layer has marked a
request as "complete". The only callers of scsi_eh_scmd_add() are
scsi_softirq_done(), scsi_times_out() and
rtio_scsi_cmd *cmd)
cmd->comp = ∁
if (virtscsi_kick_cmd(&vscsi->ctrl_vq, cmd,
- sizeof cmd->req.tmf, sizeof cmd->resp.tmf,
- GFP_NOIO) < 0)
+ sizeof cmd->req.tmf, sizeof cmd->resp.tmf) < 0)
Il 19/05/2014 21:07, Nicholas A. Bellinger ha scritto:
Hi MST,
So I've finally got some cycles to get back to this code, and wanted to
verify the outstanding items you had previously raised:
- Convert vhost-scsi to be independent of IOV layout using
memcpy_fromiovecend. (Does this effect exis
Il 19/05/2014 17:08, Bart Van Assche ha scritto:
On 05/19/14 16:08, Paolo Bonzini wrote:
2) reentrancy: the softirq handler and scmd_eh_abort_handler can run
concurrently, and call scsi_finish_command without any lock protecting
the calls. You can then get memory corruption.
I'm not
Hi all,
I'm trying to understand asynchronous abort in the current upstream
code, and the code seems to have some dubious locking.
Here are some examples of the issue:
1) dangling pointers: scsi_put_command calls cancel_delayed_work(), but
that doesn't mean that the scmd_eh_abort_handler cou
Il 08/05/2014 14:55, Ming Lei ha scritto:
On Thu, May 8, 2014 at 8:17 PM, Paolo Bonzini wrote:
Il 08/05/2014 12:44, Ming Lei ha scritto:
On Wed, 07 May 2014 18:43:45 +0200
Paolo Bonzini wrote:
Per-CPU spinlocks have bad scalability problems, especially if you're
overcommitting. Wr
Il 08/05/2014 12:44, Ming Lei ha scritto:
On Wed, 07 May 2014 18:43:45 +0200
Paolo Bonzini wrote:
Per-CPU spinlocks have bad scalability problems, especially if you're
overcommitting. Writing req_vq is not at all rare.
OK, thought about it further, and I believe seqcount may
be a
n't
needed now because req_vq is read from
scsi->req_vqs[vq->index - VIRTIO_SCSI_VQ_BASE] instead of
tgt->req_vq, so remove the unnecessary barrier.
Also remove related comment about the barrier.
Cc: Paolo Bonzini
Signed-off-by: Ming Lei
---
v2:
- take Paolo's
n't
needed now because req_vq is read from
scsi->req_vqs[vq->index - VIRTIO_SCSI_VQ_BASE] instead of
tgt->req_vq, so remove the unnecessary barrier.
Also remove related comment about the barrier.
Cc: Paolo Bonzini
Signed-off-by: Ming Lei
---
v1:
- fix comment on decrements of
Il 07/05/2014 18:24, Ming Lei ha scritto:
On Tue, 06 May 2014 15:17:15 +0200
Paolo Bonzini wrote:
Il 06/05/2014 11:26, Ming Lei ha scritto:
Hi Paolo and All,
One question is about ACCESS_ONCE() in virtscsi_pick_vq(),
looks it needn't since both reading and writing tgt->req_vq h
Il 07/05/2014 18:03, Ming Lei ha scritto:
*
* - likewise, decrements of reqs only occur when reqs != 0. If the decremented
* value is zero, the first CPU that enters virtscsi_queuecommand_multi will
* modify req_vq and the others will spin on tgt_lock.
The fact should be obvious too,
Il 07/05/2014 16:34, Ming Lei ha scritto:
> *
> - * An interesting effect of this policy is that only writes to req_vq need to
> - * take the tgt_lock. Read can be done outside the lock because:
> - *
> - * - writes of req_vq only occur when atomic_inc_return(&tgt->reqs) returns
> 1.
> - * In
about the barrier.
Cc: Paolo Bonzini
Signed-off-by: Ming Lei
---
drivers/scsi/virtio_scsi.c | 52 +++-
1 file changed, 3 insertions(+), 49 deletions(-)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index aead20f..0c77ed6 100644
-
Il 07/05/2014 03:07, Ming Lei ha scritto:
Hi Paolo,
On Tue, May 6, 2014 at 9:17 PM, Paolo Bonzini wrote:
Il 06/05/2014 11:26, Ming Lei ha scritto:
Hi Paolo and All,
One question is about ACCESS_ONCE() in virtscsi_pick_vq(),
looks it needn't since both reading and writing tgt->req_
Il 06/05/2014 11:26, Ming Lei ha scritto:
Hi Paolo and All,
One question is about ACCESS_ONCE() in virtscsi_pick_vq(),
looks it needn't since both reading and writing tgt->req_vq holds
tgt->tgt_lock.
You're right. It should be possible to avoid the lock in
virtscsi_pick_vq like this:
Il 25/04/2014 16:59, James Bottomley ha scritto:
This is a set of seven fixes, three (hpsa) and free'd command references
correcting bugs in the last round of updates and the remaining four
correcting problems within the SCSI error handler that was causing a
deadlock within USB.
The patch is ava
Il 09/04/2014 09:22, Michael S. Tsirkin ha scritto:
> The interface uses bytes instead of iovecs as the unit, and
> vhost-scsi can add the (temporary...) requirement that do_pi_nbytes
> and di_pi_nbytes comprise an integer number of iovecs.
>
> Paolo
That would be a reasonable intermediate step,
Il 11/04/2014 03:23, Fam Zheng ha scritto:
virtscsi_init calls virtscsi_remove_vqs on err, even before initializing
the vqs. The latter calls virtscsi_set_affinity, so let's check the
pointer there before setting affinity on it.
This fixes a panic when setting device's num_queues=2 on RHEL 6.5:
scsi->affinity_hint_set = false;
}
You put the if inside the loop, but it's really all or nothing since the
failure point is find_vqs.
Not a problem though; the queues are few and this is not a hot path anyway.
Acked-by: Paolo Bonzini
Paolo
--
To unsubscribe from this list: send t
Il 07/04/2014 05:16, Michael S. Tsirkin ha scritto:
Hmm still relying on a specific IOV layout I see :(
It's really a violation of the spec even though it works
fine with Linux guests.
I know this isn't the only place this is broken but
can't we finally fix it?
Since you are touching this code an
Il 07/04/2014 05:13, Nicholas A. Bellinger ha scritto:
> I guess we'll still be able to fix it after the merge window -
> (or worst case, revert the change) is this what you are suggesting?
>
Yes, but I would think that it is actually fixable. ;)
Otherwise, a v3.16 merge is an option as well.
Il 07/04/2014 05:55, Michael S. Tsirkin ha scritto:
> + u16 do_pi_niov; /* DataOUT PI Number of iovecs */
> + u16 di_pi_niov; /* DataIN PI Number of iovecs */
So this looks like a somewhat problematic interface to me in that
it talks in terms of iovecs not bytes.
So this perpet
Il 25/03/2014 16:31, Christoph Hellwig ha scritto:
Paolo,
do you have a virtio_scsi tree to picks this up in? We now have all
the infrastructure for it in James' tree.
I don't, I usually just give my Acked-by and James picks it up.
Paolo
--
To unsubscribe from this list: send the line "unsu
Il 17/03/2014 06:32, Nicholas A. Bellinger ha scritto:
> + if (vq->iov[0].iov_len == sizeof(v_req_pi)) {
> + req = (unsigned char *)&v_req_pi;
> + target = &v_req_pi.lun[1];
> + req_size = sizeof(v_req_pi);
> +
Il 06/03/2014 12:22, Hannes Reinecke ha scritto:
On 03/06/2014 11:09 AM, Paolo Bonzini wrote:
Il 06/03/2014 09:47, Fam Zheng ha scritto:
According to SPC-4, section 4.5.2.1, 252 is the limit of sense
data. So
increase the value.
Signed-off-by: Fam Zheng
---
include/linux/virtio_scsi.h | 2
Il 06/03/2014 09:47, Fam Zheng ha scritto:
According to SPC-4, section 4.5.2.1, 252 is the limit of sense data. So
increase the value.
Signed-off-by: Fam Zheng
---
include/linux/virtio_scsi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/virtio_scsi.h b/incl
get = v_req.lun[1];
> tpg = ACCESS_ONCE(vs_tpg[target]);
> --
> 1.8.5.3
>
Reviewed-by: Paolo Bonzini
--
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
Il 24/02/2014 06:32, Nicholas A. Bellinger ha scritto:
AFAICT up until this point the ->prio field has been unused, but
I'm certainly open to better ways of signaling (to vhost) that some
number of metadata iovs are to be expected.. Any thoughts..?
Hi nab,
the virtio-scsi side of the patch is
ort_handler = virtscsi_abort,
.eh_device_reset_handler = virtscsi_device_reset,
-- 1.7.10.4 -- 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
Il 05/02/2014 13:39, Christoph Hellwig ha scritto:
+ pool = scsi_find_host_cmd_pool(shost);
Should you have a WARN_ON somewhere if shost->hostt->cmd_size &&
shost->unchecked_isa_dma?
Apart from this,
Reviewed-by: Paolo Bonzini
Paolo
+ if (!pool) {
+
}
- spin_unlock_irqrestore(&shost->free_list_lock, flags);
- if (likely(cmd != NULL))
+ if (cmd)
scsi_pool_free_command(shost->cmd_pool, cmd);
put_device(dev);
Reviewed-by: Paolo Bonzini
--
To unsubscribe from this list: send the line
101 - 200 of 428 matches
Mail list logo