Re: Removal of ENABLE_VFS_IOOPT
Alan L. Cox <alc <at> imimic.com>
2003-03-02 20:29:11 GMT
Peter Wemm wrote:
> "Alan L. Cox" wrote:
> > Before I begin work on vm_object locking, I'd like to remove
> > ENABLE_VFS_IOOPT from the kernel sources. ENABLE_VFS_IOOPT was a
> > work-in-progress by John Dyson to perform zero-copy file system I/O.
> > Unfortunately, it still has some unresolved issues, and no one has taken
> > an active interest in fixing them.
> Hold on a second.. I thought the zero-copy folks fixed this up and it
> is required for turning on zero-copy mode etc.
> I remember they added code to fix the read() coherency problems.
No, they didn't. The zero-copy sockets code introduced a new page-based
copy-on-write mechanism and a new parameter to uiomoveco()
("disposable") that guaranteed that the new mechanism wouldn't be used
for ENABLE_VFS_IOOPT. In contrast, ENABLE_VFS_IOOPT tried to use the
preexisting object-based copy-on-write mechanism. Except for a few
lines of code in kern_subr.c's userspaceco(), the two mechanisms are
distinct. Specifically, the page flipping logic is totally distinct:
vm_pgmoveco() for zero-copy sockets and vm_uiomove() for
Someday, someone could attempt to reimplement ENABLE_VFS_IOOPT using the
page-based mechanism, in which case, the four snippets of code in
ffs_vnops.c could be useful. Aside from that, the code which lives in
vm_map.* and vm_object.* is dead weight.