Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jul 2006 09:50:47 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-current@FreeBSD.ORG
Subject:   Re: vmstat's entries type
Message-ID:  <200607190750.k6J7olwv037263@lurza.secnetix.de>
In-Reply-To: <1153239030.1108.33.camel@genius.i.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
Michal Mertl <mime@traveller.cz> wrote:
 > Recent thread "2Gb SYSVSHM limitation" reminded me of my recent finding
 > - fields in struct vmmeter (src/sys/sys/vmmeter.h) are int and not long.

I'm not authoritative, but I think they should be neither
int nor long, but uint64_t.

 > On an AMD64 machine which can easily make milion syscalls/second the
 > counters seem unnecessarily restricted by being 32bit (u_int).

You don't need an AMD64 machine for that.  I've seen the
counters in the "vmstat -s" output overflow even on slow
(by today's measures) intel machines after a certain amount
of uptime.

 > P.S.: If a commiter expresses some interest in the subject I can work
 > out a patch as I just love stats with huge numbers :-).

Should be fairly easy, I think.  The stats are recorded in
sysctl variables (e.g. vm.stats.sys.v_swtch), so you have
to change the data type of the sysctl, then grep the code
for all occurences that access it (kernel as well as user-
land).

However, there's one small problem:  On 32bit architectures
like i386, a 64bit value can't be changed with a single
instruction.  That might be an efficiency problem, and you
also might have to make sure that proper locking is used
each time the value is accessed.

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

I suggested holding a "Python Object Oriented Programming Seminar",
but the acronym was unpopular.
        -- Joseph Strout



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