From owner-freebsd-current@FreeBSD.ORG Wed Jul 19 07:51:00 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72EDD16A4DD for ; Wed, 19 Jul 2006 07:51:00 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7D5C43D46 for ; Wed, 19 Jul 2006 07:50:58 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (xabufw@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k6J7oldY037264 for ; Wed, 19 Jul 2006 09:50:56 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k6J7olwv037263; Wed, 19 Jul 2006 09:50:47 +0200 (CEST) (envelope-from olli) Date: Wed, 19 Jul 2006 09:50:47 +0200 (CEST) Message-Id: <200607190750.k6J7olwv037263@lurza.secnetix.de> From: Oliver Fromme To: freebsd-current@FreeBSD.ORG In-Reply-To: <1153239030.1108.33.camel@genius.i.cz> X-Newsgroups: list.freebsd-current User-Agent: tin/1.8.0-20051224 ("Ronay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 19 Jul 2006 09:50:57 +0200 (CEST) X-Mailman-Approved-At: Wed, 19 Jul 2006 11:53:31 +0000 Cc: Subject: Re: vmstat's entries type X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-current@FreeBSD.ORG List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jul 2006 07:51:00 -0000 Michal Mertl 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