Date: 18 Feb 2004 01:13:10 +0100 From: Arno <arno@heho.snv.jussieu.fr> To: freebsd-hackers@freebsd.org Subject: vmstat name lookups Message-ID: <wpfzd9jld5.fsf@heho.snv.jussieu.fr>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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
[-- Attachment #2 --]
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?wpfzd9jld5.fsf>
