[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/9] Add full scatter-gather support for SCSI ge
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 0/9] Add full scatter-gather support for SCSI generic devices |
Date: |
Thu, 17 Dec 2015 11:31:36 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
On 17/12/2015 09:47, Alex Pyrgiotis wrote:
>> > Which commands have large payloads and are on the data path, for
>> > scsi-block? Or is the use case just scsi-generic (e.g. tape devices?)?
>> >
>> > (Just trying to understand before I dive into the patches).
> Sure, no problem. The commands that have large payloads and are on the
> data path are the classic SCSI READ/WRITE commands. Usually, these
> commands are implemented with vectored reads/writes, which utilize the
> controller's scatter-gather list.
>
> However, when opening a "scsi-block" device with the default cache
> policy (cache=writeback), QEMU fallbacks to the "scsi-generic" functions
> (i.e, SG_IO ioctl requests) for reading/writing data [1]. In this case,
> the data are copied in a bounce buffer, which is the issue that this
> patch tackles.
Right, I forgot about that. However, falling back to scsi-generic
effectively means that scsi-block is always O_DIRECT/cache=none. So why
not just specify cache=none?
We can improve the code to print a warning if you don't. (It needs some
care: iscsi never caches, independent of the cache= argument, so we
don't want to warn for it. But it can be done).
Paolo
[Qemu-devel] [PATCH 5/9] scsi-generic: Separate `sg_io_hdr' initializations, Alex Pyrgiotis, 2015/12/16
[Qemu-devel] [PATCH 4/9] scsi-generic: Add common functions, Alex Pyrgiotis, 2015/12/16
[Qemu-devel] [PATCH 3/9] dma-helpers: Do not truncate small qiovs, Alex Pyrgiotis, 2015/12/16
[Qemu-devel] [PATCH 7/9] scsi-generic: Make data-copying logic clearer, Alex Pyrgiotis, 2015/12/16
[Qemu-devel] [PATCH 6/9] scsi-generic: Make request execution buf-specific, Alex Pyrgiotis, 2015/12/16
[Qemu-devel] [PATCH 2/9] dma-helpers: Add support for ioctl operations, Alex Pyrgiotis, 2015/12/16
[Qemu-devel] [PATCH 1/9] dma-helpers: Expose the sg mapping logic, Alex Pyrgiotis, 2015/12/16