Commit Graph

169335 Commits

Author SHA1 Message Date
degroote bb588cd930 Fix a stupid typo. In ipsec6_process_packet, reinject the packet in AF_INET6,
nor in AF_INET.
2008-04-28 17:40:11 +00:00
ad 836973f68b KASSERT(l->l_nopreempt == 0) 2008-04-28 17:18:41 +00:00
ad 3d504986e5 Stray kpreempt_disable with no matching kpreempt_enable. 2008-04-28 17:18:19 +00:00
ad 1f959cb4ab Use symbolic names for -C. 2008-04-28 16:52:17 +00:00
ad 7d4d52d5aa sbspace: return 'long', otherwise signed comparisons will be promoted
to unsigned.
2008-04-28 16:37:15 +00:00
ad 343816f86a defopt PREEMPTION 2008-04-28 15:46:48 +00:00
ad 499f0dfad6 Even if PREEMPTION is defined, disable it by default until any preemption
safety issues have been ironed out. Can be enabled at runtime with sysctl.
2008-04-28 15:38:03 +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 ccd06c9a6a key_usrreq: set in a lock on PRU_ATTACH. Spotted by yamt@. 2008-04-28 15:18:43 +00:00
yamt 89ee456bc7 as softint network processing is now safe to block,
make some mutexes adaptive.
2008-04-28 15:06:51 +00:00
yamt fb7535aecb udp6_init: fix a comment. 2008-04-28 15:01:39 +00:00
ad 1d11e457d5 Fix hang with atalkd. PR kern/38513. 2008-04-28 14:31:46 +00:00
ad b04b9c7a9b Set in a lock on new sockets. I don't know how this was missed before. 2008-04-28 13:24:38 +00:00
ad 5668836100 MUTEX_SPIN_SPLRAISE: add another __insn_barrier() for safety. 2008-04-28 13:18:50 +00:00
ad a52d138523 cpu_idle: assert ilevel == IPL_NONE. 2008-04-28 13:10:22 +00:00
ad 7c334139cd - mutex_spin_enter: avoid SPL NOT LOWERED... errors when running with
preemption. This could also fix similar errors seen with softints.
- Adjust code slightly to try and avoid mispredicted branches. The branch
  hint prefixes are apparently of little use.
2008-04-28 13:09:00 +00:00
christos 29c39f7ad5 Add -lc when -shared so that all shared libraries built by the compiler
have a dependency to -lc. To avoid adding that dependency in -lc and -lgcc*
we add -nostdlib to the compile rules.
2008-04-27 23:49:27 +00:00
christos a9587bb896 now that gcc adds -lc, reverse the logic and explain. 2008-04-27 23:48:10 +00:00
ad 5be927ae20 Make preemption safe. 2008-04-27 22:43:08 +00:00
ad c76bdbff23 Sprinkle more assertions / preemption paranoia. 2008-04-27 22:41:15 +00:00
ad a93682b7c8 - Make some entry/exit points preemption safe.
- Avoid mispredicted branches in Xsyscall.
2008-04-27 22:40:09 +00:00
ad 2993a9569e Wrap kpreempt stuff in _KERNEL, since bool is only exposed in userspace
via stdbool.h.
2008-04-27 22:38:12 +00:00
ad 992544b3e9 Fix build error. 2008-04-27 22:34:49 +00:00
christos 17a5e23949 Make sure the current message (dot) is set correctly when changing the
display state, i.e., hidden/exposed tags or threads.  This fixes at
least two problems:

- If the current message is a duplicate that is deleted by the "deldups"
  command, then the dot was invalid making all messages appear to have
  been deleted.  It is now set to the surviving duplicate message.

- If the current message is tagged, the "hidetags" command would leave
  the dot invalid and the dislay would reset it at the top of the
  current screen.  It is now set the the first untagged (and
  not deleted) message after the previous (tagged) dot message.

From Anon Ymous
2008-04-27 22:26:50 +00:00
bouyer 0fef0ddf92 xengnt_more_entries(): fix memory leak, noticed by Jean-Yves Migeon 2008-04-27 19:28:45 +00:00
matt 41434daffd Note merge of matt-armv6 2008-04-27 19:01:19 +00:00
matt 825088eda6 Merge kernel changes in matt-armv6 to HEAD. 2008-04-27 18:58:43 +00:00
skd 8b7bbc0009 Fix pic locking to mirror simple_lock primitives. 2008-04-27 17:47:11 +00:00
tsutsui 02d0296505 Make compile with debug options. 2008-04-27 15:56:37 +00:00
tsutsui bdc08026eb Fix a botch in rev 1.21. 2008-04-27 15:18:00 +00:00
tsutsui 285b0f56d9 Fix warnings #ifdef DEBUG case. 2008-04-27 14:44:25 +00:00
tsutsui c070e2d90e - use mutex(9) for uvm_kernel_object
- fix warnings in #ifdef DEBUG
2008-04-27 14:44:04 +00:00
ad 02691198b8 Minor fix for preemption safety. 2008-04-27 14:29:09 +00:00
ad 12e587a1a3 Fix a use-after-free in soabort(). It would be better to kill SS_NOFDREF
and maintain a per-socket reference count, but SS_NOFDREF is slightly
more than a simple reference count and I don't want to break anything.
2008-04-27 14:26:58 +00:00
ad 92cbb1b2af Extend spl protection to keep all kernel_lock state in sync. There could
have been problems before. This might help with the assertion failures
seen on sparc64.
2008-04-27 14:13:05 +00:00
degroote e7dc156f58 Fix some fallout from socket locking patch :
- {ah6,esp6}_ctlinput must return void*
 - use correct wrapper for rip_usrreq
2008-04-27 12:58:48 +00:00
yamt 4cc41517c3 mention yamt-nfs-mp branch. 2008-04-27 12:53:25 +00:00
tsutsui 7fbd55774a Use mutex(9) for uvm_kernel_object. From Greg Oster. 2008-04-27 12:34:54 +00:00
ad 7d6bc631b9 Disable preemption while swapping pmap. 2008-04-27 11:39:46 +00:00
ad 1f8aca087d Disable preemption during the final stages of LWP exit. 2008-04-27 11:39:20 +00:00
ad 27168d9d58 - Rename crit_enter/crit_exit to kpreempt_disable/kpreempt_enable.
DragonflyBSD uses the crit names for something quite different.
- Add a kpreempt_disabled function for diagnostic assertions.
- Add inline versions of kpreempt_enable/kpreempt_disable for primitives.
- Make some more changes for preemption safety to the x86 pmap.
2008-04-27 11:37:48 +00:00
ad 2759896048 Add a comment. 2008-04-27 11:29:12 +00:00
ad 8f9c8f5ea5 lockdebug_barrier: disable preemption using the interrupt priority level,
not crit_enter/crit_exit. Since this is called from mi_switch(), crit_exit
could recurse and skew statistics.
2008-04-27 11:28:49 +00:00
ad e33af2987c +lcr2 2008-04-27 11:25:27 +00:00
ad 65af92c2d9 Adjust previous: orphang() shouldn't have been playing about with tty_lock.
It was a bit of code that I accidenally left in.
2008-04-27 10:56:28 +00:00
nakayama fbdd1b7ea8 Fix typo.
s/amrr_min_success_threshold/amrr_max_success_threshold/ in second line.
2008-04-27 09:32:08 +00:00
nakayama 66f1c31a47 grep "-H" option (print the filename for each match) always prints
filenames whether "-h" option (suppress filenames when multiple files
are searched) is speficied or not.

Make zgrep "-h" option actually works with using "-H" option only
when "-h" is not specified.
2008-04-27 09:27:55 +00:00
christos a8706a45b4 mention ldexp, frexp, modf. 2008-04-27 09:26:20 +00:00
nakayama c9f8548d80 Our gzip does not have "-o" option.
So replace -o with >, then znew can now work again.
2008-04-27 09:07:13 +00:00
tsutsui 377c9d4dfd Remove obsolete (commented out) options SHMMAXPGS. 2008-04-27 06:26:04 +00:00