Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jul 1996 09:12:52 -0700
From:      John Heidemann <johnh@ISI.EDU>
To:        freebsd-fs@freebsd.org
Subject:   Re: About buffer cache 
Message-ID:  <199607191612.JAA29334@dash.isi.edu>
In-Reply-To: <199607191431.JAA00152@dyson.iquest.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 19 Jul 1996 09:31:05 CDT, "John S. Dyson" wrote: 
>On some OSes there is the ability to tune the buffer cache/filesystem
>to be warned of certain behavior.  Specifically, on sequential file
>reads we will currently retain the old, sequentially read data,
>non-preferentially.

SunOS has an madvise option MADV_SEQUENTIAL, and code in the kernel to
optimize access for these pages.  The BSD madvise(2) man page has the
same option.  The assumption is that the pages will only be accessed
once (like in a cp), so it tries to free the pages as soon as they're
no longer in use.  This sounds like the behavior you want when reading
large multimedia files.

Although this approach only works with mmap'ed regions, if you're
doing multimedia I hope you're doing mmap'ing and not paying an extra
data copy with the read/write interface.

   -John Heidemann



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607191612.JAA29334>