From owner-freebsd-fs Wed Oct 2 14:59:37 1996 Return-Path: owner-fs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA09955 for fs-outgoing; Wed, 2 Oct 1996 14:59:37 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id OAA09950; Wed, 2 Oct 1996 14:59:33 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id OAA04844; Wed, 2 Oct 1996 14:57:30 -0700 From: Terry Lambert Message-Id: <199610022157.OAA04844@phaeton.artisoft.com> Subject: Re: vnode and cluster read-ahead To: heo@cslsun10.sogang.ac.kr (Heo Sung-Gwan) Date: Wed, 2 Oct 1996 14:57:30 -0700 (MST) Cc: freebsd-hackers@freebsd.org, freebsd-fs@freebsd.org In-Reply-To: from "Heo Sung-Gwan" at Oct 2, 96 11:17:03 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-fs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > When a file is open serveral times simultaneously cluster read-ahead > buffer cache using vnode seem to have some problems. > > As a process A reads a file F *sequentially* the fields(v_maxra, v_ralen, etc) of the vnode of F increases. As a result read-ahead of next cluster happens. > But when a process B opens F and reads it the values of the fields are > changed. So the process A's read-ahead is disturbed whenever process B is > rescheduled. > > I think the fields for read-ahead must be in struct file rather than vnode. > There exists one vnode for a file but a file may be open serveral times. > > What's your opinion, hackers? Matt Day noted this problem some time ago. The problem increases when you have multiple threads in a single process with conflicting acess domains. One soloution would be to "trust cache locality to work". This is not very satisfying for read-ahead. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.