Commit Graph

9 Commits

Author SHA1 Message Date
simonb 87d37bb3df Don't call strncmp() where the length arg is the size of a pointer
instead of the max string length.  Switch to strcmp() - both strings
are known nul-terminated.

Thanks tnn@ (and clang!).
2021-04-05 05:47:31 +00:00
simonb 9190190822 Add support for kernel hash statistics generation for vmstat -h/-H. As
well as not needing any kmem grovelling, also much faster as it doesn't
need a kmem read for hash bucket and for each item in the hash bucket
chains.
2021-04-01 06:22:09 +00:00
ozaki-r 058d974b09 Add HASH_PSLIST (pslist(9)) type for hashinit() 2016-07-06 05:20:48 +00:00
rmind 83eb28cbe4 hashinit: replace loop with a formula. 2014-05-29 21:15:55 +00:00
rmind 533522e2c8 Add hash_list_size() and simplify slightly. 2012-06-05 20:51:36 +00:00
christos 8e9c1fd326 PR/45736: Michael van Elst: setting kern.maxvnodes may lock up
Clamp the number of elements to the max possible if exceeded
2011-12-25 02:23:09 +00:00
ad e071d39c84 - Convert hashinit() to use kmem_alloc(). The hash tables can be large
and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.
2008-05-05 17:11:16 +00:00
rmind 33928e0f83 - Replace uihashtbl_lock and struct uidinfo::ui_lock with atomic operations.
This make uid_find(), chgproccnt(), chgsbsize() and lf_alloc(), lf_free()
  functions lock-less.
- Increase the size of uihashtbl in case of MP system, as suggested by <ad>.
- Add HASH_SLIST type for hashinit().

Reviewed by <ad>.
2008-03-17 21:16:03 +00:00
pooka 0a0815b77e Move hashinit() & hashdone() from kern_subr.c to subr_hash.c to
permit standalone compilation.  No functional change.
2007-07-28 12:53:52 +00:00