Date: Thu, 5 Sep 1996 17:02:16 -0700 (MST) From: Matt Day <mday@artisoft.com> To: freebsd-fs@FreeBSD.ORG Subject: Re: Questions about cluster read buffer cache Message-ID: <199609060002.RAA02552@sting.artisoft.com>
next in thread | raw e-mail | index | archive | help
Heo Sung-Gwan <heo@cslsun10.sogang.ac.kr> wrote: > I have some questions about cluster read-ahead buffer cache. > > When a file is read sequentially, one cluster is always prefetched > that is not requested yet. At least vp->v_ralen blocks are already in buffer. > If the difference between the most recently accessed block and > the most recently prefetched block is greater than vp->v_ralen, next cluster > is read ahead into buffer. During reading a file sequentially > the value of vp->v_ralen is 7. Why is it? I'm not sure if I understand your question fully. vp->v_ralen tends to increase (to an upper limit) when vnode reads are sequential; v_ralen tends to decrease when vnode reads are not sequential or when cluster_read() notices that previous read-aheads are not being effective. > And if the blocks in a cluster is requested before the completion of > asynchronous read-ahead of the cluster, how is this situation handled? > Which part of vfs_cluster.c does handle this? cluster_read() calls getblk() which will sleep if the requested block is busy. Matt Day <mday@artisoft.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609060002.RAA02552>
