|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: A question on Zero Copy> Does the iSCSI layer want: > > A) Plain Zero copy, where the upper layer (iSCSI) asks > to read the next available "message" from the wire > into a buffer passed to the transport by iSCSI? > > <OR> > > B) A directed Zero Copy, where the upper layer (iSCSI) asks > to read a particular request to a specific buffer? > Randall, We would ideally have directed Zero Copy. It has to do with the block interface in most OSes. Clients of the block interface (the file system, the virtual memory manager) supply a buffer to the block subsystem. The result of any READ operation MUST appear in the supplied buffer. There is no opportunity for the block interface to do A. Thus, B is required. Actually, I lied a bit. If the buffer is in virtual memory, you can do a cute hack called page flipping. It's a hack because it's not general. If the READ data landed in physical memory with the same alignment as the buffer given to the block interface, then we can often just change the VM mapping to point to the new buffer. It's a hack because it requires the storage buffers and network buffers to be interchangeable. To be workable in many cases, it requires either very large transfers or page aligned buffers. It does not readily generalize to where the client of the block interface wants to specify a scatter list for the I/O READ. Anyway, the crux of the issue is the block interface. It may be better to modify the block interface in many OSes to be more modern and accept a data buffer back from the storage driver. Or the current interface may be better for applications that wish to keep simple data structures and logic by allowing them to control where the results of I/O operations lands. Of course, the aim of iSCSI is not revolutionize the storage stack but slip in under SCSI and block interface in a transparent fashion. So, directed Zero copy it is! Cheers, -Costa
Home Last updated: Tue Sep 04 01:06:11 2001 6315 messages in chronological order |