Commit Graph

30 Commits

Author SHA1 Message Date
andvar 2fa7e14158 fix various typos, mainly in comments, but also log messages, docs, game text. 2022-04-08 10:17:52 +00:00
riastradh e468962b6a lockstat(4): KNF. No functional change intended. 2022-02-27 14:16:32 +00:00
riastradh d3ab1269bf lockstat(4): Membar audit.
- Serialize updates to lockstat_enabled, lockstat_dev_enabled, and
  lockstat_dtrace_enabled with a new __cpu_simple_lock.

- Use xc_barrier to obviate any need for additional membars in
  lockstat_event.

- Use atomic_load/store_* for access that might not be serialized by
  lockstat_lock or lockstat_enabled_lock.
2022-02-27 14:16:12 +00:00
ad 0eaaa024ea Move proc_lock into the data segment. It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.
2020-05-23 23:42:41 +00:00
ad f2bb4c20d1 - Increase the default number of buffers, and scale it by ncpu.
- Stop tracing when the device is closed.
2019-11-23 17:32:10 +00:00
chs fd34ea77eb remove checks for failure after memory allocation calls that cannot fail:
kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
2017-06-01 02:45:05 +00:00
christos e7ae23fd9e include "ioconf.h" to get the 'void <driver>attach(int count);' prototype. 2015-08-20 14:40:16 +00:00
matt df674b3309 This uses CPU_INFO_FOREACH so it really should include <sys/cpu.h> 2015-06-07 06:08:37 +00:00
christos a961aba856 add coverity annotations (variable is volatile so it might have side effects) 2015-03-11 16:00:54 +00:00
christos aa44322b8b Introduce a new flag LB_DTRACE for dtrace lockstat events.
Split lockstat_enabled into two parts, one controlled by dtrace called
"lockstat_dtrace_enabled" and one by the lockstat device called
"lockstat_dev_enabled". Create a macro that needs to be called when either
of them changes LOCKSTAT_ENABLED_UPDATE().
2015-03-09 01:41:41 +00:00
christos f341fbf934 dtrace bits from riastradh 2015-03-08 22:45:16 +00:00
dholland f9228f4225 Add d_discard to all struct cdevsw instances I could find.
All have been set to "nodiscard"; some should get a real implementation.
2014-07-25 08:10:31 +00:00
chs a4dc54b971 increase LOCKSTAT_MAXBUFS, systems with lots of CPUs need more. 2014-04-21 16:33:21 +00:00
dholland a68f9396b6 Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
2014-03-16 05:20:22 +00:00
msaitoh 465bde02e7 Fix off by one. 2012-12-10 06:07:34 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad 4c7ba24481 Add MI code to support in-kernel preemption. Preemption is deferred by
one of the following:

- Holding kernel_lock (indicating that the code is not MT safe).
- Bracketing critical sections with kpreempt_disable/kpreempt_enable.
- Holding the interrupt priority level above IPL_NONE.

Statistics on kernel preemption are reported via event counters, and
where preemption is deferred for some reason, it's also reported via
lockstat. The LWP priority at which preemption is triggered is tuneable
via sysctl.
2008-04-28 15:36:01 +00:00
ad 0664a0459b Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
2008-01-04 21:17:40 +00:00
ad 8134491688 Use new style memory barriers. 2007-12-20 21:09:00 +00:00
ad 3b271ff768 Merge from vmlocking. 2007-11-06 18:02:43 +00:00
ad 5c2240bb95 - Increase default number of trace buffers to 10000.
- New options:
     -f         Trace only by calling functions.
     -m         Merge call sites within unique functions.
     -M         Merge lock addresses within unique objects.
2007-07-14 13:30:43 +00:00
ad 029f4f9cd7 splstatclock, spllock -> splhigh 2007-06-15 20:17:07 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
ad 087fdb9080 Count the number of CPUs at boot and stash in 'ncpu'. Eventually should
have each CPU register at attach, so we can figure out the topology for
the scheduler.
2007-02-15 20:32:47 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
ad 9f07c24ec6 lockstat: improve reporting slightly, and fix a bug where the command
could spin while resorting lists.
2006-12-25 11:57:40 +00:00
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
xtraeme 4a09170d84 Use __unused in function arguments where appropiate. (hi christos) 2006-10-12 06:56:47 +00:00
ad 5c5838e690 - Add a couple of XXX comments.
- lb->lb_cpu doesn't need to be filled in lockstat_event().
2006-09-07 01:03:02 +00:00
ad beafae096b Add the 'lockstat' driver, which collects basic information about lock events. 2006-09-07 00:20:28 +00:00