ad
4079c2dd69
Use pool_cache+atomics for sigacts.
2008-04-25 11:24:11 +00:00
ad
607f7941b7
Remove unneeded playing about with kernel_lock.
2008-04-25 11:23:42 +00:00
ad
1ae2046c17
semexit: do nothing if the process has not used semaphores.
2008-04-25 11:21:18 +00:00
ad
8c71a574b0
Remove unneeded kernel_lock/splvm stuff.
2008-04-25 00:07:24 +00:00
alc
8c99fcbe3b
fix typo in comment
2008-04-24 23:26:00 +00:00
ad
3cef738139
lwp_userret: don't drop p_lock while holding a scheduler lock.
2008-04-24 21:47:11 +00:00
ad
284c2b9aef
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
...
we no longer need to guard against access from hardware interrupt handlers.
Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
2008-04-24 18:39:20 +00:00
ad
6d70f903e6
Network protocol interrupts can now block on locks, so merge the globals
...
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:
- Inspecting process state requires thread context, so signals can no longer
be sent from a hardware interrupt handler. Signal activity must be
deferred to a soft interrupt or kthread.
- As the proc state locking is simplified, it's now safe to take exit()
and wait() out from under kernel_lock.
- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
ad
c2deaa264e
xc_broadcast: don't try to run cross calls on CPUs that are not yet running.
2008-04-24 13:56:30 +00:00
ad
026542bb25
Regen.
2008-04-24 11:51:47 +00:00
ad
30abe39468
- Retire SYCALL_MPSAFE. With the exceptions of darwin and irix emulations,
...
all system calls are now MPSAFE.
- Remove unneeded acquire/release of kernel_lock.
2008-04-24 11:51:18 +00:00
ad
15e29e981b
Merge the socket locking patch:
...
- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.
With much feedback from matt@ and plunky@.
2008-04-24 11:38:36 +00:00
sborrill
cbfd0202cd
It's only a typo in a comment, but it reduces the number of diffs in my local
...
tree :-)
2008-04-24 08:51:06 +00:00
ad
c8ff5c0c50
kmutex_t * -> void *, to avoid MD header fallout.
2008-04-23 13:19:44 +00:00
ad
ebca8ee832
mutex_owned, rw_read_held, rw_write_held, rw_lock_held: check for a NULL
...
pointer.
2008-04-22 14:46:35 +00:00
njoly
8668268571
Fix semaphore permissions returned by semctl+IPC_STAT, by masking
...
anything else that the expected lower 9 bits.
2008-04-22 12:14:12 +00:00
ad
43d8bae932
Give callout_halt() an additional 'kmutex_t *interlock' argument. If there
...
is a need to block and wait for the callout to complete, and there is an
interlock, it will be dropped while waiting and reacquired before return.
2008-04-22 12:04:22 +00:00
ad
ecebc8b473
Implement MP callouts as discussed on tech-kern. The CPU binding code is
...
disabled for the moment until we figure out what we want to do with CPUs
being offlined.
2008-04-22 11:45:28 +00:00
ad
3fbed79bb8
Mark the callout MPSAFE and use callout_halt().
2008-04-22 11:44:24 +00:00
reinoud
0971ac9234
When using nested buffers, allow one erroring-out nested buffer to
...
error-out the master buffer.
The old setup was undeterministic since a later sheduled nested buffer
could clear the error again since there is no B_ERROR flag anymore. It also
would discard the error the nested buffer returned.
2008-04-22 11:05:06 +00:00
ad
6bd54792e3
Regen.
2008-04-21 12:57:00 +00:00
ad
a2249ef75c
Make ntp, pmc, reboot, sysarch, time syscalls MPSAFE.
2008-04-21 12:56:30 +00:00
ad
4d9ff4744f
Fix TIOCSIG handling for SIGINFO.
2008-04-21 12:49:20 +00:00
yamt
a2c6efe92f
ttygetinfo: fix a locking error in rev.1.215.
2008-04-21 11:56:01 +00:00
ad
d9bace2a92
Acquire kernel_lock directly in LFS syscalls.
2008-04-21 11:45:34 +00:00
ad
e655812d5c
Regen.
2008-04-21 00:14:22 +00:00
ad
08b44dd8b9
timer fixes for PR 37093:
...
- Fix serious concurrency problems, making the code MT and MP safe in
the process.
- Don't allocate memory or inspect process state from hardclock().
2008-04-21 00:13:46 +00:00
ad
573e08da0c
ttys are allocated/freed infrequently enough that there is no point having
...
a seperate pool for them.
2008-04-20 19:30:13 +00:00
ad
664f91e474
Improve ^T / SIGINFO handling:
...
- Restore code removed during LWPification.
- Don't touch proc state from a hardware interrupt handler.
- Fix the locking.
2008-04-20 19:22:44 +00:00
mlelstv
77f5b73003
When unp_internalize fails (due to the sanity check or an out-of-memory
...
condition), it leaves the control message with file descriptors. Calling
unp_dispose() will interpret the message as containing file pointers
and crash the system.
This change removes unp_dispose() from this failure path and avoids
using goto to jump into switch statements...
The previous workaround to ignore such messages in unp_scan() is removed.
2008-04-20 07:47:18 +00:00
mjf
ede732e020
If cm->cmsg_len is not valid for unp_internalize do not use it to work out
...
where the data is in unp_scan.
Fixes PR/38391
2008-04-19 22:26:52 +00:00
plunky
7c3f385475
correct cut and paste error in uuid_dec_be(); le16dec -> be16dec
2008-04-19 18:21:38 +00:00
yamt
d8d1533c48
pidtbl_dump: use queue.h macros. no functional change.
2008-04-17 14:16:22 +00:00
yamt
91c77f1c78
enterpgrp: update a comment.
2008-04-17 14:14:20 +00:00
yamt
69bbf68c6e
acquire proclist_lock for SESSHOLD/SESSRELE.
2008-04-17 14:07:31 +00:00
yamt
bc397338d9
sched_tick: don't expire timeslices for SCHED_FIFO lwps.
2008-04-17 14:03:42 +00:00
yamt
70f8f58cac
s/selwakeup/selnotify/ in a comment.
2008-04-17 14:02:24 +00:00
rmind
5c0e3318e2
Adjust comments: spc_mutex is now always a per-CPU lock, L_INMEM -> LW_INMEM,
...
L_WSUSPEND -> LW_WSUSPEND, and remove white-spaces, while here.
2008-04-15 18:54:30 +00:00
ad
db0173b9a6
SSP: block interrupts when enabling, and move the init to just before
...
starting secondary processors.
2008-04-14 18:07:51 +00:00
ad
acc82f8808
soreceive: dom_externalize/dom_dispose can block. If new messages are
...
appended while the receiver is blocked, the sockbuf will be corrupted.
Dequeue control messages from the sockbuf and sync its state in one
pass. Only then process the control messages. From FreeBSD.
2008-04-14 15:42:20 +00:00
yamt
7bf20daff6
remove unnecessary __MUTEX_PRIVATE.
2008-04-14 09:40:43 +00:00
yamt
e5c1081112
make decay_cpu static.
2008-04-14 09:39:31 +00:00
ad
fa71518fbc
Fix comments.
2008-04-14 00:18:43 +00:00
yamt
7ab55e0ff2
sched_print_runqueue: add __printf__ attribute to the 'pr' argument.
2008-04-13 22:54:19 +00:00
yamt
3cd40e9f41
sched_print_runqueue: fix printf formats.
2008-04-13 22:53:31 +00:00
dogcow
7bcb554c5f
Since nobody else has fixed it yet: fix case of GDB && !MULTIPROCESSOR.
2008-04-13 16:22:14 +00:00
rmind
8d700f664c
Fix shared memory code that it could handle > 4GB addresses correctly.
...
PR/38109, patch (a little bit modified) from Chris Brand.
2008-04-12 20:49:22 +00:00
ad
d87d01d660
Fix typo. Spotted by kardel@.
2008-04-12 18:22:03 +00:00
ad
a78ad62cfb
cache_enter: inline LIST_INSERT_HEAD so that the membar_producer() can be
...
put in the right spot. The 'next' link in the new entry must become globally
visible before the list head is updated. This could have affected systems
with weak memory ordering like the alpha.
2008-04-12 17:34:26 +00:00
ad
da60beabf5
softint_overlay: bind the stolen LWP to the current CPU while processing,
...
to prevent it blocking and migrating to another CPU.
2008-04-12 17:17:28 +00:00