From owner-freebsd-hackers Fri May 16 01:50:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id BAA17395 for hackers-outgoing; Fri, 16 May 1997 01:50:03 -0700 (PDT) Received: from haldjas.folklore.ee (Haldjas.folklore.ee [193.40.6.121]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id BAA17347 for ; Fri, 16 May 1997 01:49:51 -0700 (PDT) Received: from localhost (narvi@localhost) by haldjas.folklore.ee (8.8.4/8.8.4) with SMTP id LAA08613; Fri, 16 May 1997 11:48:55 +0300 (EEST) Date: Fri, 16 May 1997 11:48:54 +0300 (EEST) From: Narvi To: Terry Lambert cc: James Mansion , freebsd-hackers@FreeBSD.ORG Subject: Re: mmap() In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, 16 May 1997, Narvi wrote: > > > On Thu, 15 May 1997, Terry Lambert wrote: > > > > > It would have a cost higher than not doing it (ie: non-zero). Using > > mmap() and then doing sequential I/O is probably a very limited market, > > so John would have to amke a decision to accept the non-0 degradation > > on that basis. > > > > Well, isn't grep doing the same? Mmap a file and then walk it line by line > and output the line matching the regular expression? Any program that > processes some kind of text file line by line will most probably express > the same kind of access pattern. > > I am not sure, but in case of several processes accessing one file using > MADV_WILLNEED / MADV_DONTNEED could perhaps help? > > Sander > > By the way - in the source of grep, madvise(.. MADV_SEQUENCIAL ..) is > commented for being slover. I will give it a try... > Well, FreeBSD grep doesn't use mmap, as HAVE_WORKING_MMAP is not defined in the Makefile... Sander > [a huge snip] > > > > > Regards, > > Terry Lambert > > terry@lambert.org > > --- > > Any opinions in this posting are my own and not those of my present > > or previous employers. > > > >