summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorMatthew Dillon <dillon@FreeBSD.org>2001-05-24 07:22:27 +0000
committerMatthew Dillon <dillon@FreeBSD.org>2001-05-24 07:22:27 +0000
commitac8f990bdebc788c11f8449ca0fd90b65c3b9048 (patch)
tree45502480909b9387717f8c31f6c7cc48ea8fa747 /lib/libc
parente8f64f5ebfec3904f6af65188172995a24c5494e (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/fcntl.25
-rw-r--r--lib/libc/sys/open.27
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2
index b2911e584047..479e0973b0a9 100644
--- a/lib/libc/sys/fcntl.2
+++ b/lib/libc/sys/fcntl.2
@@ -147,6 +147,11 @@ corresponds to the
.Dv O_APPEND
flag of
.Xr open 2 .
+.It Dv O_DIRECT
+Minimize or eliminate the cache effects of reading and writing. The system
+will attempt to avoid caching the data you read or write. If it cannot
+avoid caching the data, it will minimize the impact the data has on the cache.
+Use of this flag can drastically reduce performance if not used with care.
.It Dv O_ASYNC
Enable the
.Dv SIGIO
diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2
index 769ac27f0e01..1a29a17d3690 100644
--- a/lib/libc/sys/open.2
+++ b/lib/libc/sys/open.2
@@ -83,6 +83,7 @@ O_TRUNC truncate size to 0
O_EXCL error if create and file exists
O_SHLOCK atomically obtain a shared lock
O_EXLOCK atomically obtain an exclusive lock
+O_DIRECT eliminate or reduce cache effects
O_FSYNC synchronous writes
O_NOFOLLOW do not follow symlinks
.Ed
@@ -150,6 +151,12 @@ If creating a file with
the request for the lock will never fail
(provided that the underlying filesystem supports locking).
.Pp
+.Dv O_DIRECT may be used to
+minimize or eliminate the cache effects of reading and writing. The system
+will attempt to avoid caching the data you read or write. If it cannot
+avoid caching the data, it will minimize the impact the data has on the cache.
+Use of this flag can drastically reduce performance if not used with care.
+.Pp
If successful,
.Fn open
returns a non-negative integer, termed a file descriptor.