From owner-freebsd-hackers Fri May 16 01:44:00 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id BAA17180 for hackers-outgoing; Fri, 16 May 1997 01:44:00 -0700 (PDT) Received: from agora.rdrop.com (root@agora.rdrop.com [199.2.210.241]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id BAA17171 for ; Fri, 16 May 1997 01:43:58 -0700 (PDT) Received: from haldjas.folklore.ee (Haldjas.folklore.ee [193.40.6.121]) by agora.rdrop.com (8.8.5/8.8.5) with ESMTP id BAA03889 for ; Fri, 16 May 1997 01:43:05 -0700 (PDT) Received: from localhost (narvi@localhost) by haldjas.folklore.ee (8.8.4/8.8.4) with SMTP id LAA08287; Fri, 16 May 1997 11:27:50 +0300 (EEST) Date: Fri, 16 May 1997 11:27:50 +0300 (EEST) From: Narvi To: Terry Lambert cc: James Mansion , freebsd-hackers@FreeBSD.ORG Subject: Re: mmap() In-Reply-To: <199705152313.QAA16073@phaeton.artisoft.com> 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 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... [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. >