Commit Graph

267 Commits

Author SHA1 Message Date
pooka 77fa4c0e46 Use -3 for wizardmode credentials instead of -1. Technically we
shouldn't have to do this, but some pieces of kernel code still
make direct comparisons like cred == NOCRED (which, incidentally,
is defined as -1).
2008-06-06 10:46:35 +00:00
ad 1f3c2824c9 Make it build again. 2008-06-05 21:27:50 +00:00
ad f8e053bde9 Make it build again. 2008-06-05 12:43:52 +00:00
ad 75e0baf4da Make it build. 2008-06-04 13:10:06 +00:00
ad 1b23b70818 vfs_cache:
- Don't use goto in critical paths, it can confuse the compiler.
- Sprinkle some branch hints.
- Make namecache stats per-CPU and collate once per second.
- Use vtryget().
2008-06-03 15:50:22 +00:00
ad fdce452b03 Turn off DIAGNOSTIC so it builds. 2008-05-31 19:28:36 +00:00
pooka 11e4a43ad9 Specify RUMP_WITHOUT_THREADS only in one place. 2008-05-29 13:12:29 +00:00
pooka 3bca2d2000 Also fake the namecache g/c thread in kthread_create() so that file
systems can again be run without threads (and hence gdb can be used
on them).
2008-05-29 12:25:12 +00:00
pooka 0e278b287d Use rump_sys_pread/write instead of rump_sys_read/write to make I/O
from offset != 0 work again.

from Arnaud Ysmal
2008-05-29 12:03:52 +00:00
pooka df177ce90b regen 2008-05-29 12:02:31 +00:00
ad e32f4b0a8d Fix rump build. 2008-05-20 19:02:36 +00:00
reinoud 5d5fb047a1 Make rump compile UDF correctly. Note that it won't work though since rump
needs to be compiled with thread support.
2008-05-14 20:13:05 +00:00
ad 42d0626726 PR kern/38141 lookup/vfs_busy acquire rwlock recursively
Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.

Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:

- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
  sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
  and is only ever write locked in dounmount(). A write hold can't be taken
  on this lock if the current LWP could hold a vnode lock.

- kmutex_t mnt_updating. This is taken by threads updating the mount, for
  example when going r/o -> r/w, and is only present to serialize updates.
  In order to take this lock, a read hold must first be taken on
  mnt_unmounting, and the two need to be held across the operation.

One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.
2008-05-06 18:43:44 +00:00
ad 0f457ea616 Pull in the kernel module stuff so that rump can set up built-in modules. 2008-05-04 12:52:58 +00:00
lukem 66176dfdff Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)
2008-05-03 14:48:30 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
pooka 2d66ed28b9 Unbreak recent breakage. 2008-04-28 19:31:45 +00:00
ad caba38b804 Catch up with process locking changes. 2008-04-24 17:02:18 +00:00
ad 026542bb25 Regen. 2008-04-24 11:51:47 +00:00
ad 6bd54792e3 Regen. 2008-04-21 12:57:00 +00:00
ad 1c3c41f771 +evcnt_attach_dynamic 2008-04-11 15:24:48 +00:00
ad 481e4d16cb More stubs. 2008-04-11 15:23:45 +00:00
pooka 01c429027f Workaround gcc -Wunitialized bug for -Osomething compilations.
PR lib/38385, Matthew Mondor
2008-04-08 08:25:49 +00:00
matt 6c93bdee60 Add a device_xname() stub. 2008-04-06 05:17:54 +00:00
drochner 76ad1614e9 remove useless passing of the lwp from the KERNEL_LOCK() ABI
(not the API; this would be easy as well)
agreed (a while ago) by ad
2008-04-01 19:49:31 +00:00
ad 2ffc44f47b Regen. 2008-03-27 17:14:21 +00:00
yamt 91ae756395 - for some ports, especially for ones without pmap_growkernel,
buf_memcalc is used by bootstrap as well.  fix NULL dereference for them.
- limit kva usage for each cache to 20% of vm_map.  XXX a bit arbitrary.
- add a comment.
2008-03-25 23:21:42 +00:00
yamt ef630703b1 regen. 2008-03-24 23:47:06 +00:00
martin 99c43f077e Adapt to sel* changes 2008-03-24 19:40:18 +00:00
yamt 2acbe71698 regen. 2008-03-24 12:25:42 +00:00
rmind 42c415f8f1 pool_cache_init: Remove the alignment of pc according to the CACHE_LINE_SIZE,
which is not useful for rump.  This fixes the pool_cache_destroy() which was
freeing the modified pointer, instead of the original one.

OK by <pooka>.
2008-03-23 14:39:17 +00:00
yamt c3c197ba35 when calculating some cache sizes, consider the amount of available kva.
PR/33185.
2008-03-23 14:12:39 +00:00
ad 53d9c2f69b Update for select/poll changes. 2008-03-22 19:27:23 +00:00
ad 141056103a Er, regen... 2008-03-21 22:12:13 +00:00
ad a9ca7a3734 Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
2008-03-21 21:54:58 +00:00
bjs 718a9a20d9 Add lwp_unsleep from kern/kern_lwp.c so that this builds. ok ad@ 2008-03-19 00:40:34 +00:00
pooka 0b82eddb8b Reorder a few init bits into a better order to make syspuffs work again. 2008-03-18 15:16:22 +00:00
pooka 546bf50253 Cache referenced rootvp in struct ukfs. Makes it possible to run
pre/postcall wrapper around the exported namei, since postcall no
longer needs to execute VFS_ROOT (which is a bad thing to do while
potentially holding on to a locked vnode, mmkay).
2008-03-13 14:24:30 +00:00
pooka e8401439ac Implement all ukfs interfaces (except getdents, that's a bit more
tricky) with the help of rump system calls instead of calling namei
by themselves.  Trust me when I say it was non-trivial to get the
namei calls right.
2008-03-12 21:37:15 +00:00
pooka b590aae6d8 Support chdir. This is useful for example when testing and not
wanting to stress namei() so much as test individual ops.
XXX: it should be implemented per calling thread, not per fs.
2008-03-12 14:49:19 +00:00
pooka 8ca4306537 Support multiple file systems within one process with ukfs by using
a "chroot" for each file system.
2008-03-12 11:17:33 +00:00
lukem 471f389be3 Add -I${LIBRUMPDIR} to fix objdir builds. 2008-03-12 05:11:51 +00:00
pooka 3f429ae81b Compile rump_syscalls, use them in a few places. 2008-03-11 22:57:26 +00:00
pooka 5a2a7c7039 gen 2008-03-11 22:53:54 +00:00
pooka a7ece3ec53 Backup some fixes for recent breakage from local tree. Also some
other improvements such as exporting the real kernel namei and
using that in ukfs instead of the homegrown heap'o hacks namei.
"etcetc".
2008-03-11 10:50:16 +00:00
ad 6ae89ed2af +cpu_lookup_byindex 2008-02-27 17:02:56 +00:00
ad 5485a8d6a0 Remove call to sched_yield() to fix compiler warnings. 2008-02-19 20:37:09 +00:00
ad 99f27439b5 Implement yield(). 2008-02-15 23:36:26 +00:00
ad 74d14c2433 Add dummy hardclock_ticks. 2008-02-15 13:07:02 +00:00
ad aeeed1e5b6 Make it compile. 2008-01-30 14:57:24 +00:00