Asynchronous I/O and scatter/gather I/O
The document devotes five pages to naming just one file in Linux 2.6.0, fs/direct-io.c which is said to contain direct copying of AIO and scatter/gather code (the readv and writev functions) from the Dynix/ptx v4.6.1 file kernel/os/vfs_dio.c. No specific lines of code are listed but there is much verbiage about the mental contamination of two individual IBM contributors.
The files listed are from the GNU C Library package glibc-2.3.2 [download] [gpl, lgpl, licenses]. It was released on 1 March 2003. The next release was 2.3.3 on 3 August 2003. The Hatch letter (157-28), to which this document is an exhibit, was dated 19 April 2004.
SCO/Caldera itself had redistributed these files. The document contains this statement: "At the time it redistributed Linux, SCO was not aware that its intellectual property had been copied or misappropriated and placed into Linux without SCO's authorization or consent."
| include/aio.h | 1-6 | 100% |
| rt/aio.h | 1-237 | 100% |
| rt/aio_error.c | 1-40 | 100% |
| rt/aio_return.c | 1-40 | 100% |
| sysdeps/pthread/aio_cancel.c | 1-153 | 100% |
| sysdeps/pthread/aio_fsync.c | 1-60 | 100% |
| sysdeps/pthread/aio_misc.c | 1-705 | 100% |
| sysdeps/pthread/aio_misc.h | 1-127 | 100% |
| sysdeps/pthread/aio_notify.c | 1-146 | 100% |
| sysdeps/pthread/aio_read.c | 1-32 | 100% |
| sysdeps/pthread/aio_read64.c | 1-32 | 100% |
| sysdeps/pthread/aio_suspend.c | 1-164 | 100% |
| sysdeps/pthread/aio_write.c | 1-32 | 100% |
| sysdeps/pthread/aio_write64.c | 1-32 | 100% |
| sysdeps/unix/sysv/linux/aio_sigqueue.c | 1-58 | 100% |
Total 15 files, 1864 lines
The files listed are from a patch released by SGI's KAIO project, an implementation of POSIX Asynchronous I/O. The project is now defunct. The URL given in the document is a reference (no longer accurate, if indeed it ever was) to the kaio mailing list archive of December 1999. The specific version of the patch complained of is apparently the attachment of Christopher Smith's email of 15 December 1999, which applies against Linux 2.2.14. It is curious that this specific version was complained of, as the same material had appeared in both older and newer versions of the patch. The Hatch letter (157-28), to which this document is an exhibit, was dated 19 April 2004.
The document contains this statement: "None of the following files or lines of code have ever appeared in any Linux-related product distributed by SCO."
The patch touches seventeen files, but SCO's document mentions only two of them.
patching file Documentation/Configure.help patching file arch/i386/config.in patching file arch/i386/kernel/entry.S patching file drivers/scsi/sd.c patching file fs/buffer.c patching file fs/pipe.c patching file fs/read_write.c patching file include/asm-i386/errno.h patching file include/asm-i386/unistd.h patching file include/linux/aio.h patching file include/linux/mm.h patching file include/linux/sched.h patching file init/main.c Hunk #1 succeeded at 1283 (offset 12 lines). patching file kernel/exit.c patching file kernel/fork.c patching file mm/filemap.c patching file mm/page_alloc.c
The document specifies lines 834-1236 of mm/filemap.c but this makes no sense in the context of the patched file. It appears to be a misinterpretation of the text of the patch's unified diff ("@@ -808,6 +834,1226 @@") compounded with a typographical error (1236 vice 1226), and most probably was intended to specify lines 837-2056 of the patched file.
| include/linux/aio.h | 1-303 | 100% |
| mm/filemap.c | 837-2056 | 40% |
Total 2 files, 1523 lines
The following overview of the KAIO project is taken from the libdba README.
The asynchronous I/O (AIO) facility implements interfaces defined by the POSIX standard. The AIO facility implemented in the SGI Linux Environment 1.1 differs from glibc implementation. The glibc version realizes asynchrony by employing slave threads to process the I/O requests. This implies that only as many I/O requests as the number of slaves are truly asynchronous at the device, since the slaves use the blocking system calls to service the I/O: when a slave thread is processing an I/O request, it is blocked in that I/O system call.
The SGI AIO version is mostly implemented in the Linux kernel. To distinguish with the glibc version, we will use the term KAIO. In KAIO, when possible, I/O requests are implemented as split-phase I/O requests. With split-phase I/O, the initiating request (such as an aio_read) truly queues the I/O at the device as the first phase of the I/O request; a second phase of the I/O request, performed as part of the I/O completion, propagates results of the request. The results may include the contents of the I/O buffer on a read, the number of bytes read or written, and any error status. Thus, with split-phase I/O as much asynchrony as the device can support is actually achieved. However, not all file systems or devices readily support split-phase I/O. Currently, KAIO only supports split-phase I/O for file systems that employ generic_file_read() as their read routine (several file systems in current Linux kernel use generic_file_read, including popular ext2), and for all Character Disk Devices (Raw) which is also provided as part of SGI Linux Environment 1.1. For requests which are not split-phase, KAIO employs slave threads, similar to the glibc implementation.