Commit Graph

208 Commits

Author SHA1 Message Date
christos
bb762fe5ee No point in using float here; makes evbmips64 need __truncdfsf2, and that
causes static linking issues because of softfloat.
2016-10-04 17:36:21 +00:00
sevan
39bbc68a3b Drop main() prototype. 2016-09-05 00:40:28 +00:00
dennis
7ad3371ebc Update stats-keeping in sys/kern/vfs_cache.c to remove (most)
races while allowing consistent lockless sampling of the per-cpu
statistics without atomic operations.  Update comment describing
the locking protocol to include this.

These files were fumble-fingered out of the last commit.
2014-12-24 20:01:21 +00:00
skrll
f6dcbec3a9 Trailing whitespace. 2014-09-12 16:25:55 +00:00
skrll
e52f4ab9a5 Print the cpu in the kernhist record. 2014-09-12 16:25:29 +00:00
nakayama
653203959c Use u_long to avoid negative value outputs. 2014-07-12 20:04:31 +00:00
joerg
99d9473857 Init summary counters. 2014-06-14 04:06:54 +00:00
joerg
11e7f587a5 Fix format string for ILP32. 2014-06-14 01:26:59 +00:00
joerg
67c88a0d78 Use kern.pool for the live system. 2014-06-13 19:10:01 +00:00
joerg
6cf722d5a8 GC left-over kread. 2014-06-03 21:56:30 +00:00
joerg
472ed4a521 Use CPU statistics from uvmexp when possible. 2014-06-03 21:56:03 +00:00
joerg
201b45ebb5 Use kern.clockrate if possible. 2014-06-03 21:45:41 +00:00
joerg
100b00cbbc Convert the remaining uvmexp users to the sysctl as default source. 2014-06-03 21:41:56 +00:00
joerg
5b23be7ac8 Use vm.uvmexp data as much as possible for vmstat -s.
Temporarily disable shadowing warning until the other users are cleaned
up.
2014-06-03 21:31:54 +00:00
joerg
94adc2671a Provide sysctl for namecache statistics. 2014-06-03 21:16:15 +00:00
joerg
8670ce0cf0 Make missing kern.evcnt an error, don't try to fallback to kmem use. 2014-06-02 19:16:10 +00:00
hannken
42c8d67c49 Add a global vnode cache:
- vcache_get() retrieves a referenced and initialised vnode / fs node pair.
- vcache_remove() removes a vnode / fs node pair from the cache.

On cache miss vcache_get() calls new vfs operation vfs_loadvnode() to
initialise a vnode / fs node pair.  This call is guaranteed exclusive,
no other thread will try to load this vnode / fs node pair.

Convert ufs/ext2fs, ufs/ffs and ufs/mfs to use this interface.

Remove now unused ufs/ufs_ihash

Discussed on tech-kern.

Welcome to 6.99.41
2014-05-08 08:21:53 +00:00
dsl
dc210c7fbd Remove some pointless inclusions os sys/user.h 2014-02-19 20:42:14 +00:00
rmind
df64447ca6 Remove cpu_queue (and thus eleminate another use of CIRCLEQ) by replacing
its uses with cpu_infos array.  Extra testing by christos@.
2013-11-24 21:58:38 +00:00
mrg
5517e5441c add a row with totals for some pool statistics. 2013-11-10 05:16:10 +00:00
para
308636e770 remove malloc(9) output function from vmstat
it is not required and working any more
2012-04-29 16:23:56 +00:00
matt
d34c2845b8 Use C89 function definitions 2012-03-20 20:34:57 +00:00
christos
81aad1d7e8 use warn instead of perror. 2011-10-15 21:59:48 +00:00
christos
76f57a76c2 unbreak -f -H -h, etc, part 1
- get nlist once in the beginning and fix the flags. Not each time! It is
not like the kernel will change it symbols in the middle of the run.
2011-10-15 21:06:05 +00:00
jym
37232010ea Use __arraycount(), as done above. 2011-09-21 12:08:02 +00:00
joerg
a12e209ee8 Mark usage as static and __dead. 2011-09-06 18:44:46 +00:00
yamt
b0bc17c5a1 dopoolcache: don't print unused caches unless verbose 2011-07-26 13:24:38 +00:00
mrg
8169e46991 move and rename the uvm history code out of uvm_stat to "kernhist".
rename "UVMHIST" option to enable the uvm histories.

TODO:
- make UVMHIST properly depend upon KERNHIST
- enable dynamic registration of histories.  this is mostly just
  allocating something in a bitmap, and is only for viewing multiple
  histories in a merged form.


tested on amd64 and sparc64.
2011-05-17 04:18:05 +00:00
nakayama
54b4b1358f Fix header, format and total count of system interrupt counters. 2011-02-16 12:58:38 +00:00
mlelstv
1d04f1ffaf dosum also needs getnlist 2011-02-05 13:12:07 +00:00
christos
50e452f9f7 deal with detecting the first and last cpu differently. 2011-01-31 19:41:19 +00:00
matt
c1edd37ce1 Make sure to getnlist in dovmstat 2011-01-31 18:56:04 +00:00
matt
45362e3914 Defer nlist processing until we know we need to it. If everything can be
obtained via sysctl, we can skip it entirely.  This means we can run even
if not setgid.

getuptime will now use sysctl/clock_gettime if memf is NULL.
doevcnt now sues sysctl(kern.evcnt) is memf is NULL.  It falls back to
groveling if sysctl returns an error of ENOENT.
dointr will call doevcnt to evcnt based intr stats.
2011-01-29 18:10:08 +00:00
christos
fdbe2a0785 can't play games with structure names since cpu_data refers to cpu_info, so
provide our own copy for everything.
2010-12-25 23:36:59 +00:00
christos
5ee7c6c8d5 use a local definition of cpu_info if we have __HAVE_CPU_DATA_FIRST 2010-12-25 20:50:36 +00:00
christos
8ac898131d Don't crash on old kernels that don't have the new per cpu counters. 2010-12-25 14:18:37 +00:00
enami
d5a41b7133 We still need to update ouvmexp to output the differene from
previous iteration.
2010-12-24 23:39:19 +00:00
christos
301830e51c make this work with the per-cpu counters. 2010-12-20 04:25:03 +00:00
christos
710d230a43 simplify and modernize:
- make sysctl mibs static
- use warn/warnx for warnings
makes binary 4K smaller.
2010-10-18 19:39:32 +00:00
pooka
062d6d1f8d Make "i" unsigned to mirror change to struct uvm_history 2010-07-07 11:42:18 +00:00
he
d399695a05 Follow christos' suggestions, and make ks_active a u_short, and
also only use 16 u_shorts instead of 32 ints.  Also add panic()
calls for under- and overflow of the ks_active members under
DIAGNOSTIC.  The MAXBUCKET constant ended up in sys/mallocvar.h
and not sys/param.h, as the latter caused build problems.

Ride the kernel revision bump of my previous change.
2010-04-05 08:03:41 +00:00
he
bb89b7208d Extend struct malloc_type to count the number of active allocations
per size, and make vmstat report this information under the "Memory
statistics by type" display, which is only printed when the kernel
has been compiled with KMEMSTATS defined, like this:

Memory statistics by type                                Type  Kern
           Type InUse  MemUse HighUse   Limit   Requests Limit Limit Size(s)
          wapbl    15   4192K   4192K  78644K     376426     0     0 32:0,256:3,512:6,131072:1,262144:2,524288:3

Since struct malloc_type is user-visible and is changed, bump kernel
revision to 5.99.26.

While it is true that malloc(9) is in general on the path of slowly
being replaced by kmem(9) (kmem_alloc/kmem_free), there remains a
lot of points of usage of malloc/free, and this could aid in finding
any leaks.  (It helped finding the leak fixed in PR#42661.)

This was discussed with and somewhat hestitantly OKed by rmind@
2010-04-05 07:16:12 +00:00
rmind
40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
lukem
c493aef500 fix -Wsign-compare issues 2009-01-18 07:11:45 +00:00
dholland
76eef63f94 Add missing fflush() in one of three places that print stuff repeatedly
every so often. PR 32836 from Takuro KUBOTA.
2008-11-28 05:58:22 +00:00
matt
5331076d97 NFS hash tables no longer exist. 2008-10-22 11:36:58 +00:00
he
cef17755f2 Restore the "pages actige" and "pages inactive" value printouts
in "vmstat -s" output when run on the active kernel.

The reason we can't easily provide these values out of a crash
dump, is that these fields are no longer proper members of
struct uvmexp, but rather are estimated by and dependent on
the currently active page replacement policy in the kernel.
2008-08-20 18:51:49 +00:00
lukem
98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
he
dfcadaa439 Fix alignment of fields for "vmstat -m" when KMEMSTATS are available:
o Make "prop dictionary" fit in the "Type" coloumn
 o Ensure that fields don't run into each other (adds a space between fields)
 o Ensure that a Limit of >100000K fits in the field width
2008-06-24 12:47:23 +00:00
ad
e7fbdbbaf0 vmstat -s: report cpu pagealloc hits/misses. 2008-06-04 12:47:47 +00:00