From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 17 16:13:12 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 54EB416A4CE for ; Tue, 17 Feb 2004 16:13:12 -0800 (PST) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id B948B43D1F for ; Tue, 17 Feb 2004 16:13:11 -0800 (PST) (envelope-from arno@heho.snv.jussieu.fr) Received: from heho.snv.jussieu.fr (heho.snv.jussieu.fr [134.157.184.22]) i1I0DAG3081184 for ; Wed, 18 Feb 2004 01:13:10 +0100 (CET) X-Ids: 166 Received: from heho.snv.jussieu.fr (localhost [127.0.0.1]) i1I0DAV1045175 for ; Wed, 18 Feb 2004 01:13:10 +0100 (MET) Received: (from arno@localhost) by heho.snv.jussieu.fr (8.12.10/8.12.10/Submit) id i1I0DAca045172; Wed, 18 Feb 2004 01:13:10 +0100 (MET) (envelope-from arno) To: freebsd-hackers@freebsd.org From: Arno Date: 18 Feb 2004 01:13:10 +0100 Message-ID: Lines: 19 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Miltered: at shiva.jussieu.fr with ID 4032AE16.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Antivirus: scanned by sophie at shiva.jussieu.fr Subject: vmstat name lookups X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2004 00:13:12 -0000 --=-=-= Hello, is this a correct patch to get rid of the following problem : [vmstat -is : ] ... 4096 bytes per page -1946329673 total name lookups cache hits (-108% pos + -3% neg) system 0% per-directory deletions 0%, falsehits 0%, toolong 0% patch is against -current and output from -stable, but codebase seems to be the same. Thanx, arno --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=vmstat.patch Index: sys/sys/namei.h =================================================================== RCS file: /home/ncvs/src/sys/sys/namei.h,v retrieving revision 1.40 diff -r1.40 namei.h 187,194c187,194 < long ncs_goodhits; /* hits that we can really use */ < long ncs_neghits; /* negative hits that we can use */ < long ncs_badhits; /* hits we must drop */ < long ncs_falsehits; /* hits with id mismatch */ < long ncs_miss; /* misses */ < long ncs_long; /* long names that ignore cache */ < long ncs_pass2; /* names found with passes == 2 */ < long ncs_2passes; /* number of times we attempt it */ --- > u_long ncs_goodhits; /* hits that we can really use */ > u_long ncs_neghits; /* negative hits that we can use */ > u_long ncs_badhits; /* hits we must drop */ > u_long ncs_falsehits; /* hits with id mismatch */ > u_long ncs_miss; /* misses */ > u_long ncs_long; /* long names that ignore cache */ > u_long ncs_pass2; /* names found with passes == 2 */ > u_long ncs_2passes; /* number of times we attempt it */ Index: usr.bin/vmstat/vmstat.c =================================================================== RCS file: /home/ncvs/src/usr.bin/vmstat/vmstat.c,v retrieving revision 1.79 diff -r1.79 vmstat.c 160c160 < static long pct(long, long); --- > static u_long pct(u_long, u_long); 680,681c680,681 < static long < pct(long top, long bot) --- > static u_long > pct(u_long top, u_long bot) 683c683 < long ans; --- > u_long ans; 687c687 < ans = (quad_t)top * 100 / bot; --- > ans = (u_quad_t)top * 100 / bot; 697c697 < long nchtotal; --- > u_quad_t nchtotal; --=-=-=--