Subject: Re: ktr from freebsd
To: enami tsugutomo <enami@but-b.or.jp>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 04/28/2004 14:33:28
--SUOF0GtieIMvvwua
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Wed, Apr 28, 2004 at 08:00:16AM +0900, enami tsugutomo wrote:
> > 2) In uvmhist, half of the string lengths are of the format strings. gc=
c=3D20
> > will turn strlen("Foo") into a constant (3 in this case) at compile tim=
e.=3D
> > =3D20
> > So by storing lengths, our compiler is removing half the calls to=3D20
> > strlen().
>=20
> Though it is easily fixable, that is not true with current
> implementation.
Huh? I was saying that we have two lengths we store in the uvmhist=20
entries, and that one of them is strlen()'s will be turned into a constant=
=20
at compile time by our compiler. How is that not true?
> > The uvm history system is designed to handle logging a very busy kernel=
=3D20
> > subsystem to disk very efficiently.
>=20
> What do you mean? I don't think there is such feature (log to disk),
> except vmstat > file (and this is not always useful; with the first
> item below, it was useful to dump 30000 entries. it was pain dumping
> those on serial console).
True. My first read of vmstat was wrong - I thought it would keep dumping.
> ...BTW, things I actually needed for uvmhist in the past are:
>=20
> - knob to stop logging. this is to prevent the necessary log won't be
> overwritten by others.
That would be a cool feature.
> - control how timestamp is calcurated; microtime is heavy for some
> situation.
Sounds like a good compile option.
> - version of UVMHIST_CALLED() which doesn't call UVMHIST_LOG().
> sometimes it was neccesary to log only on certian condition
> (otherwise the log buffer is filled with `xxx called!').
Agreed. Sounds like another good compile option.
Take care,
Bill
--SUOF0GtieIMvvwua
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQFAkCMoWz+3JHUci9cRAlNOAJ0SPgei5qQlpfONkjxmBQEilAgA0ACfVE6p
eblGJi5n0eoNrP4+Ce3u6iA=
=2iNu
-----END PGP SIGNATURE-----
--SUOF0GtieIMvvwua--