gmcgarry
8b957c9d45
ioctl commands are unsigned long. Changes ABI for fsetown() and fgetown() on 64-bit architectures.
2008-06-24 10:26:26 +00:00
gmcgarry
fb6bc48511
ioctl commands are unsigned long.
2008-06-24 10:24:21 +00:00
rmind
59a180ac8f
sysctl_proc_stop: fix a lock-leak when kauth returns an error.
...
From <kefren>.
2008-06-23 20:04:36 +00:00
ad
aed68d2d63
getvnode -> fd_getvnode
2008-06-23 11:30:41 +00:00
ad
29957bec2e
sys_fcntl: use l_fd, not p_fd.
2008-06-23 11:26:53 +00:00
ad
7756789d3a
PR kern/38990: Unmounting a disk fails the first time
...
vflush: process vrele_list at least once before looking at the mount.
2008-06-23 11:23:39 +00:00
ad
bce675d015
When offlining a CPU, ensure that at least one other CPU within the same
...
processor set remains online, otherwise the system can deadlock.
2008-06-22 13:59:06 +00:00
ad
53db9954a3
- Ensure that at least one cpu stays in the default pset, otherwise the
...
system will lock up.
- Use cpu_lock, there's no need for a seperate psets_lock.
- Add a sysctl to return the list of psets as a string.
2008-06-22 12:59:18 +00:00
christos
1d875fc75f
Adjust to separate kcpuset_t and cpuset_t.
2008-06-22 00:06:36 +00:00
christos
5e865a2f1b
Also enforce that cm->cmsg_len >= CMSG_ALIGN(sizeof cmsghdr), from
...
Michael van Elst
2008-06-20 15:27:50 +00:00
christos
db982eb35b
Don't require cm->cmsg_len == control->m_len, just that the cm->cmsg_len
...
<= control->m_len, like FreeBSD does. Idea from Taylor R Campbell.
2008-06-20 15:18:38 +00:00
mlelstv
8b80c3645f
reassignbuf() is called by bdirty() from within biodone processing.
...
It can have waiters.
2008-06-18 18:11:25 +00:00
yamt
fff57c5525
merge yamt-pf42 branch.
...
(import newer pf from OpenBSD 4.2)
ok'ed by peter@. requested by core@
2008-06-18 09:06:25 +00:00
christos
ffabbaf7c6
set mtime/atime properly, not backwards.
2008-06-17 21:02:08 +00:00
mlelstv
76a664c61a
Drop !cv_has_waiters assertion.
...
bdirty() is called from within biodone() processing before
waiters have been woken up and removed.
N.B. it is also used by smbfs.
2008-06-17 19:14:14 +00:00
christos
f5be32608a
PR/38942: Pedro F. Giffuni: no support for birthtime in utimes(2).
2008-06-17 16:18:01 +00:00
tsutsui
d7d2a525b1
Include <sys/sched.h> before <sys/syscallargs.h> for cpuset_t.
2008-06-17 16:17:21 +00:00
tsutsui
2bc3b0c694
Regen from syscalls.master rev 1.204:
...
> Include <sys/sched.h> before <sys/syscallargs.h> for cpuset_t.
2008-06-17 16:07:57 +00:00
tsutsui
33dfc34006
Include <sys/sched.h> before <sys/syscallargs.h> for cpuset_t.
2008-06-17 16:05:23 +00:00
reinoud
f6a70673ba
Mark a buffer busy
in getnewbuf() when it came from the pool_cache since
...
its not on a free list.
Also change buf_init() to not automatically mark buffers `busy' since this
only makes sense for bufcache buffers.
Mark all buf_init'd buffers 'busy' on the places where they ought to be
flagged as such to not confuse the buffer cache.
Fixes PR 38923.
2008-06-17 14:53:10 +00:00
ad
4810cbe2bf
sleepq_block: add a comment.
2008-06-17 09:11:25 +00:00
ad
cad3a145a3
PR kern/38761: new (?) race in buffer cache code
...
Back out the workaround from cv_has_waiters(), which is not longer needed.
Removal was missed earlier.
2008-06-16 12:03:01 +00:00
ad
a9c4cefebd
PR kern/38927: processes getting stuck in uvm_map (cv_timedwait), hanging
...
machine
Assume that a vnode (and associated data structures) costs 2kB in the
worst imaginable case. Don't allow sysctl to set desiredvnodes to a
value that would use more than 75% of KVA or 75% of physical memory.
2008-06-16 11:26:28 +00:00
ad
45850c3df9
PPWAIT need only be locked by proc_lock, so move it to proc::p_lflag.
2008-06-16 10:15:57 +00:00
ad
672f91757e
PR kern/38761: new (?) race in buffer cache code
...
- Back out the previous workaround now that the sleep queue code has
been changed to never let the queue become empty if there are valid
waiters.
- Use sleepq_hashlock() to improve clarity.
- Sprinkle some assertions.
2008-06-16 10:03:47 +00:00
ad
461a5fb24b
PR kern/38761: new (?) race in buffer cache code
...
sleepq_changepri, sleepq_lendpri: don't let an active sleep queue head become
empty. The condvar code inspects the queue head without holding the sleep
queue lock and needs to see a non-empty queue if there are waiters.
2008-06-16 10:02:15 +00:00
ad
5adf7333fd
- PPWAIT is need only be locked by proc_lock, so move it to proc::p_lflag.
...
- Remove a few needless lock acquires from exec/fork/exit.
- Sprinkle branch hints.
No functional change.
2008-06-16 09:51:14 +00:00
ad
b0ac1133c6
Sprinkle some assertions.
2008-06-16 09:48:13 +00:00
ad
5bfa865311
Sprinkle more assertions.
2008-06-16 09:47:55 +00:00
ad
b7f5063255
lwp_lock_retry: return a pointer to the lock acquired. No functional change.
2008-06-16 09:45:20 +00:00
rmind
481ae1556f
- Add general cpuset macros.
...
- Use kcpuset name for kernel-only functions.
- Use cpuid_t to specify CPU ID.
- Unify all cpuset users.
API is expected to be stable now.
2008-06-16 01:41:20 +00:00
christos
09e715922e
regen
2008-06-16 01:00:21 +00:00
uebayasi
9d4479f7e9
Typo.
2008-06-16 00:54:53 +00:00
christos
20d8fbfbe4
typo
2008-06-16 00:54:10 +00:00
christos
88c08e3b98
regen
2008-06-16 00:32:23 +00:00
christos
5c45905c42
adjust prototypes for the affinity calls.
2008-06-16 00:31:17 +00:00
rmind
a6092d3c4a
gencpuset: avoid returning of unitialized error.
...
sched_setaffinity: instead of E2BIG, return EINVAL in a case of invalid
CPU, which is more consistent.
2008-06-15 23:29:09 +00:00
christos
f30b5785d5
Don't expose struct cpuset, share the l_affinity flag and only allocate it
...
if we need to. This is not a compatible change, but the syscalls are new
enough and they don't need to be versioned. Approved by rmind.
2008-06-15 20:32:57 +00:00
chris
44d939d150
Fix for biowait hangs, and possibly other condvar hangs. Also should fix
...
PR kern/38761.
The condvar must access the sleepq with the sleepq lock held, doing so
is causing inconsistent sleepq state to be read.
This is because some accesses to the sleepq don't come via the cv code,
but are call directly into sleepq_changepri and sleepq_lendpri, which take
the sleepq lock, and removes then re-inserts lwps into the sleepq.
Running a build.sh with -j8 now completes on my quad-core, also tested by
Simon@ on a 8-core server and matt@ on a quad-core.
I believe there is room to be more efficient with this, as we now take the
sleepq lock for all cv_broadcast and cv_signal calls. I'll look into this
and post a diff to tech-kern.
2008-06-15 09:56:18 +00:00
drochner
a748803de9
tighten type checking: use device_t instead of void* at some places
2008-06-11 15:56:11 +00:00
ad
62c877a460
Don't call uvm_pageidlezero() if the CPU is marked offline.
2008-06-11 13:42:02 +00:00
drochner
520a61068b
remove the hacks around fakemdrootdev[] which should be unnecessary now
...
that "md" devices show up in the "alldevs" list
2008-06-11 10:40:21 +00:00
dyoung
1e479b72f8
In device_pmf_driver_deregister, postpone deleting a device_t's
...
reference to the PMF private data until the private data has no
more waiters. This protects against a NULL dereference.
In device_pmf_lock1(), test a device_t for PMF registration before
dereferencing its PMF private data.
2008-06-11 06:26:32 +00:00
simonb
a0f8ee25d3
In mount_domount() there is no need to initialise "mp" if the first time
...
we use it we set it.
2008-06-10 14:14:01 +00:00
ad
06da5288fa
There can be existing waiters on a socket's condition variables when we
...
change socket::so_lock, and they rely on the old lock to synchronize.
Wake them up whenever we change so_lock so they can restart their waits.
2008-06-10 11:49:11 +00:00
ad
f77c704577
Fix error in previous.
2008-06-09 11:49:40 +00:00
ad
c862aeca6f
ras_purgeall: avoid taking p_auxlock.
2008-06-09 11:46:34 +00:00
ad
5ab3329550
Correct previous.
2008-06-08 12:23:18 +00:00
ad
7304342b50
cdev_tty: don't acquire kernel lock, as we may need to call this with
...
tty_lock already held (and it would reverse the usual lock order).
2008-06-08 12:22:39 +00:00
ad
d78b3bf8f2
PR kern/38881 execve(2) panic: lock error, with path argument > PATH_MAX
2008-06-06 22:21:11 +00:00