Re: Official request: Please make GNU grep the default

From: Alan Cox <alan.l.cox_at_gmail.com>
Date: Tue, 17 Aug 2010 16:24:34 -0500
On Tue, Aug 17, 2010 at 3:29 PM, Dimitry Andric <dimitry_at_andric.com> wrote:

> On 2010-08-17 18:29, Alan Cox wrote:
> > Try it again on a memory resident file with the MAP_PREFAULT_READ option
> > that is provided by this patch:
> >
> > http://www.cs.rice.edu/~alc/MAP_PREFAULT_READ.patch<http://www.cs.rice.edu/%7Ealc/MAP_PREFAULT_READ.patch>
>
> A time trial gives:
>
>  grep with normal mmap()       1396s
>  grep with prefault mmap()     1354s
>  grep with regular read()      1354s
>
> So normal mmap is ~3% slower, and prefault mmap does not seem to make
> any measurable difference.  I guess the added complexity is not really
> worth it, for now.
>

Do you know what fraction of this time is being spent in the kernel?  Does
the value of "sysctl vm.pmap.pde.mappings" increase as a result of your
test?  If not, there is still room for improvement in the results with
mmap().

Alan
Received on Tue Aug 17 2010 - 19:24:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:06 UTC