Commit Graph

6818 Commits

Author SHA1 Message Date
kenh
dc5d469510 If sys/param.h is not included, the kernel compile fails on some platforms
with SOFTINT_COUNT undefined (I noticed it on some evbarm kernels)
2009-02-26 05:50:54 +00:00
ad
b2dec392e0 Fix some comments. 2009-02-23 20:33:30 +00:00
ad
59fcf21389 PR kern/26878 FFSv2 + softdep = livelock (no free ram)
PR kern/16942 panic with softdep and quotas
PR kern/19565 panic: softdep_write_inodeblock: indirect pointer #1 mismatch
PR kern/26274 softdep panic: allocdirect_merge: ...
PR kern/26374 Long delay before non-root users can write to softdep partitions
PR kern/28621 1.6.x "vp != NULL" panic in ffs_softdep.c:4653 while unmounting a softdep (+quota) filesystem
PR kern/29513 FFS+Softdep panic with unfsck-able file-corruption
PR kern/31544 The ffs softdep code appears to fail to write dirty bits to disk
PR kern/31981 stopping scsi disk can cause panic (softdep)
PR kern/32116 kernel panic in softdep (assertion failure)
PR kern/32532 softdep_trackbufs deadlock
PR kern/37191 softdep: locking against myself
PR kern/40474 Kernel panic after remounting raid root with softdep

Retire softdep, pass 2. As discussed and later formally announced on the
mailing lists.
2009-02-22 20:28:05 +00:00
ad
430f67aa17 PR kern/39564 wapbl performance issues with disk cache flushing
PR kern/40361 WAPBL locking panic in -current
PR kern/40361 WAPBL locking panic in -current
PR kern/40470 WAPBL corrupts ext2fs
PR kern/40562 busy loop in ffs_sync when unmounting a file system
PR kern/40525 panic: ffs_valloc: dup alloc

- A fix for an issue that can lead to "ffs_valloc: dup" due to dirty cg
  buffers being invalidated. Problem discovered and patch by dholland@.

- If the syncer fails to lazily sync a vnode due to lock contention,
  retry 1 second later instead of 30 seconds later.

- Flush inode atime updates every ~10 seconds (this makes most sense with
  logging). Presently they didn't hit the disk for read-only files or
  devices until the file system was unmounted. It would be better to trickle
  the updates out but that would require more extensive changes.

- Fix issues with file system corruption, busy looping and other nasty
  problems when logging and non-logging file systems are intermixed,
  with one being the root file system.

- For logging, do not flush metadata on an inode-at-a-time basis if the sync
  has been requested by ioflush. Previously, we could try hundreds of log
  sync operations a second due to inode update activity, causing the syncer
  to fall behind and metadata updates to be serialized across the entire
  file system. Instead, burst out metadata and log flushes at a minimum
  interval of every 10 seconds on an active file system (happens more often
  if the log becomes full). Note this does not change the operation of
  fsync() etc.

- With the flush issue fixed, re-enable concurrent metadata updates in
  vfs_wapbl.c.
2009-02-22 20:10:25 +00:00
pooka
b50bd8632e Instead of linking rump system call entry points directly to the
backend, perform all calls through a syscall table.  This makes it
possible to make system calls to non-local rump kernels.
(requires a bit support code.  it's written but quite messy currently)
2009-02-20 17:56:36 +00:00
yamt
777ded00ac cache_lookup_entry: add an assertion. 2009-02-18 13:36:11 +00:00
yamt
c69852d701 vmem_rehash_all: remove a debug printf slipped in with the previous changes. 2009-02-18 13:33:46 +00:00
yamt
f68e4571e5 - fix vmem unittest. rename VMEM_DEBUG so that it won't be abused again.
- reimplement vmem sanity checks with less code duplication.
- reimplement ddb vmem-related commands in a more consistent ways.
  remove automatic whatis.
2009-02-18 13:31:59 +00:00
yamt
947efbeab9 cache_purge1: consistently unlock ncp a little earlier. 2009-02-18 13:24:18 +00:00
yamt
4c5a0bb384 redo rev.1.19 correctly. 2009-02-18 13:22:10 +00:00
yamt
a13bb3bef4 whitespace 2009-02-18 13:12:00 +00:00
yamt
feff5384df use %zu for size_t 2009-02-18 13:04:59 +00:00
rmind
3de401ae19 Make sched_getrq() inline (gcc does not optimize it), avoids call. 2009-02-17 22:00:14 +00:00
ad
81525af92d Fix min/max confusion that causes a problem with DEBUG on some
architectures. Independently spotted by yamt@. /brick ad
2009-02-17 21:54:30 +00:00
enami
fb8633d4a9 Simplify the code; we already have a hint to decide which string to copy.
(And at least gcc generates better code.)
2009-02-15 03:52:49 +00:00
enami
60ebbc4e81 The knote objects attached by peer will still be linked in our list
if we are closed before the peer.  So, remove them.  It didn't matter
when pipe objects are directly returned to pool, but nowadays they
are cached.
2009-02-15 00:07:54 +00:00
christos
24587463c9 remove 2038 comment 2009-02-14 20:45:29 +00:00
christos
bd1260c5ff from enami: Only apply rootdir changes if the chroot dir != / 2009-02-14 17:06:35 +00:00
christos
78a45c73e9 PR/40634: Christoph Badura: "chroot / /sbin/mount" shows only / as mounted 2009-02-14 16:55:25 +00:00
pooka
3e656734b8 cosmetic: don't print empty line at end of init_sysent.c 2009-02-14 16:21:23 +00:00
apb
0cc72e51ac Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
2009-02-13 22:41:00 +00:00
christos
160a37667a Unbreak ssp kernels. The issue here that when the ssp_init() call was deferred,
it caused the return from the enclosing function to break, as well as the
ssp return on i386. To fix both issues, split configure in two pieces
the one before calling ssp_init and the one after, and move the ssp_init()
call back in main. Put ssp_init() in its own file, and compile this new file
with -fno-stack-protector. Tested on amd64.
XXX: If we want to have ssp kernels working on 5.0, this change needs to
be pulled up.
2009-02-12 18:24:18 +00:00
enami
d5b0f6df4c s/NOFOLLOW/FOLLOW/ in NDINIT so that it matches actual behavior
which is controlled by NO_FOLLOW bit passed in 2nd arg of vn_open().
2009-02-11 00:32:45 +00:00
enami
7efd6dbe73 Make module (auto)loading under chroot envrionment actually work:
- NOCHROOT flag must be assigned to different bit from TRYEMULROOT
  since the code expected to be executed is in the else clase of
  if (flags & TRYEMULROOT).
- Necessary variables aren't set.
2009-02-11 00:19:11 +00:00
rmind
db4ca04011 dosetrlimit: remove the checks which are no longer needed since rlim_t
is unsigned again.  Hi <christos>!
2009-02-09 11:13:20 +00:00
pooka
8e52b87ec3 Don't try to fd_putfile() descriptors we didn't manage to fd_getfile().
Fixes local DoS panic described in kern/40570.
2009-02-08 16:38:12 +00:00
enami
e3b99073fb Previous code ususally works since compiler won't put gap between
those struct members but there is no reason to rely on that.
While here, I rewrite the loop using an usual idiom.  It shaves
both source and object code.
2009-02-06 23:56:26 +00:00
enami
e1be06d405 Instead of missing NULL check in pipe_create, let the pipe_ctor to wait
on buffer allocation.  The other allocation is simply an optimization,
so leave it as is.
2009-02-06 23:04:57 +00:00
enami
60b229d2eb Use same expression to decide to use pool cache or not in both
kmem_alloc/free.
2009-02-06 22:58:49 +00:00
dyoung
b4f3367acd Extract a subroutine pmf_device_resume_descendants() from
pmf_device_resume_subtree(), for re-use later.
2009-02-06 01:19:33 +00:00
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