diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2010-03-22 10:52:03 +0100 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2010-03-22 10:52:03 +0100 |
commit | f17211efe374200d532a9f27173e15b018e5538e (patch) | |
tree | 3a5ed34c5d75a0c7bb1b4a4b5ca7f8f6655f3a1e /doc/grep.texi | |
parent | 29e920cd16d1225761ea92bb8a8d8e125e0c68d9 (diff) | |
download | grep-f17211efe374200d532a9f27173e15b018e5538e.tar.gz |
grep: remove --mmap
mmap is a bad idea for sequentially accessed file because it will cause
a page fault for every read page. Just consider it a failed experiment,
and ignore --mmap while accepting it for backwards compatibility.
* configure.ac (AC_FUNC_MMAP): Remove.
* doc/grep.texi (Other options): Say --mmap is ignored.
* src/grep.c (mmap_option): Remove.
(long_options): Do not reference it.
(bufmapped, initial_bufoffset): Remove.
(reset, fillbuf): Remove HAVE_MMAP code.
(grepfile): Remove bufmapped reference.
(usage): Say --mmap is ignored.
Diffstat (limited to 'doc/grep.texi')
-rw-r--r-- | doc/grep.texi | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/doc/grep.texi b/doc/grep.texi index c2a494d1..87480de4 100644 --- a/doc/grep.texi +++ b/doc/grep.texi @@ -667,12 +667,10 @@ This can cause a performance penalty. @item --mmap @opindex --mmap @cindex memory mapped input -If possible, use the @code{mmap} system call to read input, -instead of the default @code{read} system call. -In some situations, @samp{--mmap} yields better performance. -However, @samp{--mmap} can cause undefined behavior (including core dumps) -if an input file shrinks while @command{grep} is operating, -or if an I/O error occurs. +This option is ignored for backwards compatibility. It used to read +input with the @code{mmap} system call, instead of the default @code{read} +system call. On modern systems, @samp{--mmap} rarely if ever yields +better performance. @item -U @itemx --binary |