Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Oct 1996 14:57:30 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        heo@cslsun10.sogang.ac.kr (Heo Sung-Gwan)
Cc:        freebsd-hackers@freebsd.org, freebsd-fs@freebsd.org
Subject:   Re: vnode and cluster read-ahead
Message-ID:  <199610022157.OAA04844@phaeton.artisoft.com>
In-Reply-To: <Pine.SUN.3.93.961002231449.5132A-100000@cslsun10> from "Heo Sung-Gwan" at Oct 2, 96 11:17:03 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.



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