Commit Graph

242 Commits

Author SHA1 Message Date
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
ad 508b2997d7 Fix pasto. Spotted by pooka@ 2008-01-30 10:22:02 +00:00
ad 3490efcc63 Replace struct lock on vnodes with a simpler lock object built on
krwlock_t. This is a step towards removing lockmgr and simplifying
vnode locking. Discussed on tech-kern.
2008-01-30 09:50:19 +00:00
pooka bc13687cf3 default owner to getuid() 2008-01-29 18:17:21 +00:00
pooka 4f8496ecf6 compile genfs_vfsops.c (hi dh2 ;) 2008-01-28 15:48:18 +00:00
pooka cc7f05eb50 Do puffs_fakecc instead of puffs_usethreads for now. 2008-01-28 11:52:38 +00:00
pooka eb6074e41f Replace vrelel() 010101-mania with a flags parameter. However,
leave flags unimplemented for a while (no change in functionality).
2008-01-27 22:47:31 +00:00
pooka 2ff7c33801 honor pager locking protocol in uao_detach() 2008-01-27 20:10:53 +00:00
pooka 18e91c156a Don't fool around when recycling vnodes, simply override refcount
to 1, hold on tight to your hat, and call recycle.  The reason is
that we might pick up extra references such as from lookup and we
don't really care about tracking those.  For example with p2k,
puffs in the kernel already does all the refcounting we could ever
dream of, and therefore it's left to the client and unnecessary.
2008-01-27 20:01:29 +00:00
pooka 67b0c1ab9c unlock vp in error branch 2008-01-27 19:19:42 +00:00
pooka fb3107360b Use vfs_subr.c from sys/kern. This brings differences in the vnode
life cycle between rump and a real kernel to a minimum.
2008-01-27 19:07:20 +00:00
pooka 052fd49d29 Fix locking botches: take vm object lock before calling pager,
not inside the pager.
2008-01-27 00:16:22 +00:00
pooka b7b052548e Nuke local copy of getcwd_common(), we compile in the real thing now. 2008-01-25 06:43:30 +00:00
pooka 22b1964406 Include vfs_getcwd.c too. It isn't used currently, but it's linked. 2008-01-25 06:42:29 +00:00
pooka 2b1b5d29b8 Use namei() etc. from kernel sources instead of a reimplementation.
To accommodate, give the rootvnode its own vnode op vector with a
simple lookup operation.  This is used for looking up the file
system's device vnode instead of doing that directly in a homesmoked
namei().
2008-01-24 22:41:07 +00:00
pooka daadf5acef Make work again by repairing spec_node_init() and not being afraid
to use it.
2008-01-24 20:06:46 +00:00
ad 703069c0e9 specfs changes for PR kern/37717 (raidclose() is no longer called on
shutdown). There are still problems with device access and a PR will be
filed.

- Kill checkalias(). Allow multiple vnodes to reference a single device.

- Don't play dangerous tricks with block vnodes to ensure that only one
  vnode can describe a block device. Instead, prohibit concurrent opens of
  block devices. As a bonus remove the unreliable code that prevents
  multiple file system mounts on the same device. It's no longer needed.

- Track opens by vnode and by device. Issue cdev_close() when the last open
  goes away, instead of abusing vnode::v_usecount to tell if the device is
  open.
2008-01-24 17:32:52 +00:00
pooka d25a6ab97f Don't use PAGE_SIZE when faking physmem, as it's not always available
at compile-time.  We could init it runtime, but it's just a random
number anyway.
2008-01-24 15:02:16 +00:00
pooka 9af1c338e2 Default physmem was too tight, increase to 256megs from 0 bytes. 2008-01-24 08:34:49 +00:00
pooka 2310c71b91 Until debugging threaded programs in NetBSD is fixed, supply the
cpp option RUMP_WITHOUT_THREADS as a workaround.  If defined, it
makes rump itself operate single-threaded and prevents kthread_create()
from working.
2008-01-22 09:23:39 +00:00
pooka 65a36d9ef8 In case cv_timedwait() gets ticks == 0, make sure we sleep eternally
(or at least until wakeup) instead of immediately waking up.

In other words, fix this after it broke when another piece of the
code was fixed.  Ain't programming fun?
2008-01-21 17:56:48 +00:00
pooka fdedd21efc Implement dummy bmap which just does 1:1 translation. 2008-01-21 03:40:59 +00:00
joerg 3615cf7715 Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
2008-01-20 18:09:03 +00:00
reinoud ef25457ba7 pthread_cond_timedwait() needs an absolute time to wait for instead of the
relative time in ticks.
2008-01-18 14:12:19 +00:00
pooka fd1f386de1 fix incorrect tick -> timespec calculation. noticed by reinoud 2008-01-17 21:05:36 +00:00
ad cd7be76fdb Add a dummy vrevoke(). 2008-01-17 17:31:48 +00:00