From owner-freebsd-fs Fri Jul 19 09:13:05 1996 Return-Path: owner-fs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA05503 for fs-outgoing; Fri, 19 Jul 1996 09:13:05 -0700 (PDT) Received: from darkstar.isi.edu (darkstar.isi.edu [128.9.128.127]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id JAA05498 for ; Fri, 19 Jul 1996 09:13:04 -0700 (PDT) Received: from dash.isi.edu by darkstar.isi.edu (5.65c/5.61+local-23) id ; Fri, 19 Jul 1996 09:12:59 -0700 Received: from dash.isi.edu (johnh@localhost.isi.edu [127.0.0.1]) by dash.isi.edu (8.7.5/8.7.3) with ESMTP id JAA29334 for ; Fri, 19 Jul 1996 09:12:53 -0700 Message-Id: <199607191612.JAA29334@dash.isi.edu> X-Url: To: freebsd-fs@freebsd.org Subject: Re: About buffer cache In-Reply-To: <199607191431.JAA00152@dyson.iquest.net> Date: Fri, 19 Jul 1996 09:12:52 -0700 From: John Heidemann Sender: owner-fs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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