Commit Graph

6788 Commits

Author SHA1 Message Date
enami
e6aec5115a Make revoke(2) works as before:
- vfs_syscalls.c rev. 1.342 fails to invert condition correcly when
  then-clause and else-clause is swapped.  Since then, revoke(2) fails
  if it is issued by file owner.
- Probably since rev. 1.160 of genfs_vnops.c, revoke(2) fails if it is
  applied to non-device file and drops kernel into ddb.
2009-02-05 13:37:24 +00:00
ad
2015b56df5 Warn once and no more about backwards monotonic clock. 2009-02-04 21:29:54 +00:00
ad
3c32363107 PR kern/36183 problem with ptrace and multithreaded processes
Fix the crashy test case that Thor provided.
2009-02-04 21:17:39 +00:00
haad
07b62696b9 Add support for loading pseudo-device drivers. Try to autoload modules from
specs_open routine. If devsw_open fail, get driver name with devsw_getname
routine and autoload module.

For now only dm drivervcan be loaded, other pseudo drivers needs more work.

Ok by ad@.
2009-02-02 14:00:27 +00:00
enami
ad526ef003 - An errno is missed in rev. 1.11 while converting return statement to
goto statement.
- A local variable still in use is intercepted in rev. 1.6.  Define and
  use variable of its own.
2009-02-02 11:19:29 +00:00
yamt
5e978bf3b6 remove a non-ascii comment. 2009-02-02 00:10:18 +00:00
yamt
e1146d7ee9 back to malloc for now as wapbl_biodone is called by softint. 2009-02-02 00:07:06 +00:00
ad
c26577a1b0 Apply kmem patch posted to tech-kern.
- Add another level of caches, for max quantum cache size -> PAGE_SIZE.
- Add debug code to verify that kmem_free() is given the correct size.
2009-02-01 18:51:07 +00:00
ad
58fb9db514 Apply pipe patch posted to tech-kern, slightly updated:
- Cache kva.
- Convert to use mutex_obj_alloc().
- Make better use of pool_cache.

Also:

Disable direct transfers for the moment. I believe there may be a bug that
can cause transfers to stall when switching between direct/buffered access.
I think this has most recently been run into on 'denver' but I have seen it
as far back as 3.1.

(As an aside, direct is a not a clear win on modern systems with large cache
and high TLB invalidation overhead. Particularly so on MP systems, although
micro benchmarks may report otherwise because they typically do not tax the
system. Anyone want to write a decent benchmark?)
2009-02-01 18:23:04 +00:00
yamt
fc774e4e61 settime1: fix a bug i introduced when i made l_stime use monotonic time.
from Matthias Drochner on tech-kern@.  PR/40511 from Martin Husemann.
2009-01-31 15:53:36 +00:00
yamt
740c75e25d - malloc -> kmem_alloc
- kill WAPBL_UVM_ALLOC.
- kill wapbl_blk_pool to reduce #ifdef.
2009-01-31 09:33:36 +00:00
ad
697e4adf70 timer_intr: hold proc_lock across the loop, otherwise the process we are
about to signal could disappear.
2009-01-30 23:11:27 +00:00
pooka
42356a10b5 Quote PR number in XXX comment. No functional change. 2009-01-30 21:16:51 +00:00
agc
276ab299a6 Fix a tyop in the previous commit 2009-01-30 04:09:35 +00:00
drochner
338f42d97e put back a range check in setrlimit() for now
(thanks to Andrew Doran for remembering)
rlim_t _should_ be unsigned, but this needs more work
2009-01-29 22:27:23 +00:00
ad
a9743c2461 - Allow creating timeshard kthreads. To be used to fix the RAIDframe
parity rewrite issue.
- Create kthreads in the SCHED_RR class by default, not SCHED_FIFO.
2009-01-29 22:00:26 +00:00
rmind
a487ff992f sched_pstats: add few checks to catch the problem. OK by <ad>. 2009-01-28 22:59:46 +00:00
reinoud
69f4b23bdc Don't claim its an ISO partitioning scheme too early in the label. An MBR
might me there instead.
2009-01-28 15:26:28 +00:00
njoly
f024404c50 Do not call put_type() but use copyout() when returning the message
segments to the user.

ok by rmind.
2009-01-28 00:59:03 +00:00
njoly
122f627e90 Make msgsnd(2)/msgrcv(2) fail with EINVAL for messages larger than
SSIZE_MAX. Adjust man pages accordingly.

ok by christos.
2009-01-26 13:08:48 +00:00
pooka
89fa47c428 Tag a few more socket syscalls with RUMP:
recvmsg, sendmsg, recvfrom, getpeername, getsockname, sendto,
shutdown, socketpair
2009-01-26 12:20:05 +00:00
yamt
f4fa6bbef9 bump VMEM_HASHSIZE_MAX from 8192 to 65536. 2009-01-25 13:08:56 +00:00
rmind
5a84a46b8c mutex_vector_enter: few predictions. 2009-01-25 04:45:14 +00:00
rmind
66063c53a6 Set l_psid to PS_NONE for lwp0 (consistency change). 2009-01-24 22:42:32 +00:00
rmind
6d73ddd355 Revert path of modules back to "/stand". 2009-01-24 22:14:44 +00:00
rmind
f0e51651e4 Change path to kernel modules from "/stand" to "/kernel".
Needs to go in before 5.0.  Proposed on <tech-kern>.
2009-01-24 00:29:12 +00:00
pooka
06abc8c3f9 Remove debug print -- this is what happens when there's several
hours between implementation and commit.
2009-01-23 19:29:38 +00:00
pooka
c7e5a8be4e Remove the "int *error" parameter from rump syscalls. Instead use
rumpuser_seterrno() to set the errno for the caller.  This makes
the difference between real and rump syscalls way less intrusive
in calling code.
2009-01-23 19:27:18 +00:00
pooka
f6724ea74f solock() in compat code error branch to avoid panic 2009-01-23 15:40:19 +00:00
rmind
9e43fad609 sys__pset_bind: obviously, sched_takecpu() should take "t" LWP, not "l". 2009-01-23 13:58:08 +00:00
pooka
8b32829eeb Change VMEM_HASHSIZE_INIT from 1 to 128. This mainly benefits
quick-running or non-threaded rump jobs, where the rehash algorithm
does not have a chance to run.  For other cases it doesn't make
much difference, since the size will grow or decrease when the
rehash algorithm runs for the first time (t=10*hz currently).
2009-01-23 13:45:06 +00:00
jmmv
f084134ae9 Initialize SYMTAB_SPACE ksyms during ksyms_init. Per PR port-evbarm/40311. 2009-01-23 09:22:25 +00:00
drochner
cf45120117 Avoid deadlock in tty code if a terminal emulation responds to
type/status/etc inquiries. (PR kern/37915)
This is clearly a design problem in tty, but we need a cheap fix now.
The problem is that ttyinput() tries to pull a spinlock which
is already held on calls to t_oproc.
The workaround is based on the fact that within wscons code, the
wsdisplay_emulinput() function is only called directly from
wsdisplaystart(). So we can be sure that the tty lock is held,
and use an inofficial entry point in ttc.c which avoids the locking.
These ate certainly more assumptions than needed by the fix
proposed in the PR, but it doesn't affect (and slow down) other
tty drivers.
2009-01-22 20:40:20 +00:00
yamt
cb1e92d5d5 malloc -> kmem_alloc 2009-01-22 14:38:34 +00:00
yamt
812bb0d164 restore the pre socket locking patch signal behaviour.
this fixes a busy-loop in nfs_connect.
2009-01-21 06:59:29 +00:00
enami
3d21969dbd Fix a bug introduced by rev. 1.311. Make the kern.vnode sysctl to expose
correct address of each vnode to userland again.
2009-01-21 00:54:05 +00:00
drochner
dc83650fb8 add __gcc__ __format__ __string__ __attributes__ to catch mistakes early 2009-01-20 20:12:41 +00:00
drochner
d767912be3 Change major()/minor() to return 32-bit types again, called
devmajor_t/devminor_t, as proposed on tech-kern.
This avoids 64-bit arithmetics and 64-bit printf formats in parts
of the kernel where it is not really useful, and helps clarity.
2009-01-20 18:20:47 +00:00
yamt
e80f4e9ccb fix inverted POLL_ directions. 2009-01-20 14:51:43 +00:00
yamt
62bd2e85ef pipeselwakeup: now POLL_HUP != POLL_ERR. remove unnecessary #if. 2009-01-20 14:50:22 +00:00
rmind
909e7f4259 - Make thread-affinity and processor-set interfaces mutually exlusive.
- pset_assign: when CPU is assigned, migrate out all LWPs from it.
2009-01-20 01:57:35 +00:00
njoly
97781244ee Clear error value on exit for IOC_CPU_OGETSTATE ioctl command. 2009-01-19 23:04:26 +00:00
christos
143e6033a9 Provide compatibility for pre-christos-time_t sysv sysctls. 2009-01-19 19:39:41 +00:00
christos
d610baec20 provide compat_50 2009-01-19 17:39:02 +00:00
yamt
3e196b68ff malloc -> kmem_alloc 2009-01-19 14:54:28 +00:00
christos
14ba6c67a5 Provide compatibility to the old timeval SCM_TIMESTAMP messages. 2009-01-19 02:27:57 +00:00
rmind
d1efa8f729 - Avoid calling sched_catchlwp() if CPUs have different processor-sets.
- sched_takecpu: check for psid earlier (be more strict).

PR/40419.
2009-01-18 05:07:51 +00:00
cegger
cc23319cdd whitespace nit 2009-01-17 09:00:24 +00:00
yamt
cea19a4d14 malloc -> kmem_alloc. 2009-01-17 07:02:35 +00:00
yamt
ae07703384 cache_prune: use (a - b > 0) rather than (a > b) to compare ticks. 2009-01-16 06:59:21 +00:00