Subject: bugs/features and using UVM for directory buffers
To: None <tech-kern@netbsd.org>
From: Reinoud Zandijk <reinoud@netbsd.org>
List: tech-kern
Date: 01/10/2006 14:43:49
--aVD9QWMuhilNxW9f
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Dear folks,
On Tue, Jan 10, 2006 at 12:53:12AM +0100, Reinoud Zandijk wrote:
> for a long time but then it gets ugly. For unknown reasons buf's containing
> directory information are then constantly recycled and buffers just touched
> a transaction before seem to be lost again and directories have to be
> reread and reread and reread over and over again.
now that was a silly bug of me. I brelse()'d directory buf's with B_AGE.
Who ever though of naming B_AGE the flag that would mean pushing the buffer
on the freelist.... *sigh* No wonder that when buffers got tight they got
recycled first. FFS offcource did push stuff on the LRU list and the
freelist gets eaten first :-/
Revisiting my UDF directory buffer reading code and figuring out how to
make it smarter by reading ahead directory contents and such i wondered if
UVM would do a better job in handling the buffers. A small patch to genfs
did the trick and i have to say it works like a charm complete with
directory read-ahead etc.
Since its doesn't change existing behaviour and was only added as a
`sanity' check for existing usage, i'd like to commit the genfs patch
preferably after Takashi posts his genfs patch. Its only a replacement of
(vp->v_type == VREG) by (vp->v_type == VREG || bp->b_type == VDIR).
Cheers,
Reinoud
--aVD9QWMuhilNxW9f
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
iQEVAwUBQ8O6DoKcNwBDyKpoAQJUugf+LBSnibosVhc47MIwU++SkIZNFNta12ug
7Gf9gfrd8tpe7NfLfwtqZGC+llzJlg1WygTXr0PZRqMl2hKLVkbr/Z2/dZoVtZAO
pY1gEN/JiF+CPpf8/HwKz5uMVxBES0ImaM8uPUaWOPUnr4HX1Zrb6G4kK7GufBQU
z2eXZ1RHPfUsF+9jMKwDyqRTuvKaez9TyWjwR0IEM077/dkUGeEpP/rmO0Wp9/xg
fR4ZJmuT76fDzdsqW3w1a73guU3FyNyDQLQ7EZIYUjoWvhMkQH5uiDVJ14y1obmC
lrxGv5W7kePhfFNhXJ1lC3MORb+HViH4yqfQrwH/0Y3Gk1KPkSRV9A==
=Az/x
-----END PGP SIGNATURE-----
--aVD9QWMuhilNxW9f--