Concurrent I/O (VX_CONCURRENT) allows multiple processes to read from or write to the same file without blocking other read(2) or write(2) calls. POSIX semantics requires read and write calls to be serialized on a file with other read and write calls. With POSIX semantics, a read call either reads the data before or after the write call occurred. With the VX_CONCURRENT advisory set, the read and write operations are not serialized as in the case of a character device. This advisory is generally used by applications that require high performance for accessing data and do not perform overlapping writes to the same file. It is the responsibility of the application or the running threads to coordinate the write activities to the same file when using Concurrent I/O.
Concurrent I/O can be enabled in the following ways:
By specifying the O_CIO
open flag for the open() system call. The O_CIO
flag is exclusive. If a file is opened using the O_CIO
flag, then any non-CIO open() call fails, and vice versa. The O_CIO
flag does not allow the mmap() and the shmat() subroutines to access the file. The length of data to be read or written and the file offset must be page-aligned to be transferred as direct I/O with concurrent reads and writes.
By using the cio mount option. The read(2) and write(2) operations occurring on all of the files in this particular file system will use concurrent I/O.
See cio mount option.
See the mount_vxfs
(1M) manual page.