From owner-freebsd-hackers Wed Oct 2 07:40:35 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA12113 for hackers-outgoing; Wed, 2 Oct 1996 07:40:35 -0700 (PDT) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id HAA12082; Wed, 2 Oct 1996 07:40:26 -0700 (PDT) Received: (from root@localhost) by dyson.iquest.net (8.7.5/8.6.9) id JAA00980; Wed, 2 Oct 1996 09:39:43 -0500 (EST) From: John Dyson Message-Id: <199610021439.JAA00980@dyson.iquest.net> Subject: Re: vnode and cluster read-ahead To: heo@cslsun10.sogang.ac.kr (Heo Sung-Gwan) Date: Wed, 2 Oct 1996 09:39:42 -0500 (EST) Cc: freebsd-hackers@freebsd.org, freebsd-fs@freebsd.org In-Reply-To: from "Heo Sung-Gwan" at Oct 2, 96 11:17:03 pm Reply-To: dyson@freebsd.org X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@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. > You are right. > 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. > That is closer to correct. I am not sure that the struct file is correct either, but I think that you are on the right track. John