From owner-freebsd-hackers Thu Jul 29 11:56: 7 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from lestat.nas.nasa.gov (lestat.nas.nasa.gov [129.99.33.127]) by hub.freebsd.org (Postfix) with ESMTP id D25031560B for ; Thu, 29 Jul 1999 11:55:43 -0700 (PDT) (envelope-from thorpej@lestat.nas.nasa.gov) Received: from lestat (localhost [127.0.0.1]) by lestat.nas.nasa.gov (8.8.8/8.6.12) with ESMTP id JAA29492; Thu, 29 Jul 1999 09:48:58 -0700 (PDT) Message-Id: <199907291648.JAA29492@lestat.nas.nasa.gov> To: Matthew Dillon Cc: "Daniel C. Sobral" , hackers@FreeBSD.ORG Subject: Re: MADV_SEQUENTIAL and GNU Grep Reply-To: Jason Thorpe From: Jason Thorpe Date: Thu, 29 Jul 1999 09:48:57 -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 29 Jul 1999 09:26:12 -0700 (PDT) Matthew Dillon wrote: > Yes, it will work. Oops. I do see one problem though... if you do > this the underlying file object will be marked for sequential operation > even after the grep (in this case) exits. That is, an madvise() of > MADV_NORMAL, SEQUENTIAL, or RANDOM appears to have a permanent effect > on the object. This is probably not correct behavior. We could probably > fix this by moving this particular flag from the object to the vm_entry. In NetBSD, we store advice in the map entry, specifically because two different processes may wish to have different access patterns on the same object. Just a data point. -- Jason R. Thorpe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message