bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] grep: remove --mmap


From: Paolo Bonzini
Subject: Re: [PATCH 3/3] grep: remove --mmap
Date: Mon, 22 Mar 2010 11:09:20 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3

On 03/22/2010 10:31 AM, Jim Meyering wrote:
Paolo Bonzini wrote:

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): Remove --mmap.
* 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): Remove --mmap.
...
-      --help                display this help and exit\n\
-      --mmap                use memory-mapped input if possible\n"));
+      --help                display this help and exit\n"));

This is fine, but as long as --mmap is still accepted, it's best to
leave traces of it in --help and texinfo docs, so that people
understand why --max-count=N may not (yet) be abbreviated as --m=N.

Also, please add a comment saying something like this:

   FIXME: undocumented in Mar 2010; warn in N; remove in M

so it doesn't stay with us forever.
Making N=2011 or 2012 works for me, and M=N+2 seems like enough lead time.

I posted v2 of this patch, and pushed it after "make distcheck".

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]