Commit Graph

57 Commits

Author SHA1 Message Date
pooka 8e9ecb1ac9 It seems profiling really really doesn't like pthreads on my system
for some reason.  Because I don't have time to descends into the
depths to figure out why, give an alternative rumpuser_pth module,
which allows to link rump completely without pthreads.  Naturally,
this means that no threads can be used, but it's enough to get
profiling done in some cases.
2009-01-20 21:43:13 +00:00
pooka a25e3b17bc Track mutex/rwlock/condvar status. This allows us to get rid of
the pthread_np calls which will not likely exist on other platforms.
2009-01-10 22:28:42 +00:00
pooka 15509962b4 Explicitly pass a pointer to the kernel lock/unlock routines in
rumpuser init instead of magically relying on the linker giving us
the symbols.
2009-01-07 22:50:08 +00:00
pooka 913883b2cd more namespacing: rua -> rumpuser_aio 2009-01-07 20:34:32 +00:00
pooka 0150192ebb Remove linux compat no longer necessary now that libkern is included
in librump.  Previously we relied on the symbols being magically
satisfied by libc.
2009-01-07 20:24:12 +00:00
pooka 4465a9263d Rename _rumpuser_malloc to rumpuser__malloc so that all exported
rumpuser symbols start with "rumpuser".
(no major bumps or compat will be provided)
2009-01-07 19:49:48 +00:00
pooka 80508c50c5 Rename malloc() to kern_malloc() to avoid name conflict with libc.
Now it is possible to use the kernel linker with rump.
2009-01-05 21:42:37 +00:00
pooka 2f633898ae g/c unused rumpuser bswap routines 2009-01-05 01:51:31 +00:00
pooka 167269d42c Include kernel printf routines in rump instead of relying on the
magic libc symbol.  This also allows to bid farewell to subr_prf2.c
and merge the contents back to subr_prf.c.  The host kernel bridging
is now done via rumpuser_putchar().
2009-01-02 02:54:13 +00:00
pooka 08c8c2d4d4 __RCSID 2008-12-18 00:21:52 +00:00
pooka c60be09da1 If available (__NetBSD__), use pthread_setname_np() to set the
thread name for kthread_create().
2008-12-17 20:16:28 +00:00
pooka eebcd28057 Support PRU_BIND / PRU_LISTEN / PRU_ACCEPT in sockin. 2008-11-25 20:39:57 +00:00
pooka 72b66cb31e Pass biodone() to rumpuser as a callback instead of hardcoding it.
Also, explicitly init rumpuser async io thread.
2008-11-18 12:39:35 +00:00
pooka 20a993658a Move rump public headers to include/rump 2008-11-17 08:53:12 +00:00
christos d296aa9163 fix compilation and lint warnings. 2008-10-30 01:54:24 +00:00
pooka f7c6dc5e73 provide rumpuser_net_connect() 2008-10-15 13:02:29 +00:00
pooka 02100cd42d Wrap potentially blocking operations to drop and retake the kernel
giant lock.
2008-10-09 01:19:06 +00:00
pooka 982852e71e Add some routines related to networking. 2008-10-02 21:37:59 +00:00
pooka fc745dffe8 Remove rumpuser_yield(). Not only doesn't it really make sense
here, some kind soul made it completely empty.
2008-10-02 19:37:23 +00:00
pooka 2208b2d0df add WARNS=4 2008-09-27 20:49:55 +00:00
pooka 4b5f80486c Make it possible to control starting of threads per env variable
instead of only at compile-time.
2008-08-12 10:04:57 +00:00
pooka 0fca7fa92c minor nit: fix header #ifndef namespacing 2008-08-08 13:57:59 +00:00
pooka eef3b7a974 * remove unnecessary .PATH
* wrap malloc
2008-07-29 14:01:25 +00:00
pooka bdf6e0b034 Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
  * install relevant headers into /usr/include/rump
  * build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
    from src/lib and install as librumpuser and librump, respectively
    + this retains the ability to test a librump build with just the
      kernel sources at hand
  * move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
    for general consumption, they are not kernel-space dwellers anyway
  * build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
  * add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
  * build and install userspace kernel file system daemons if MKPUFFS=yes
    is spexified
  * retire fsconsole for now, it will make a comeback with an actually
    implemented version shortly
2008-07-29 13:17:40 +00:00
pooka b6138e3eb7 Backup some manual page sketches lest I delete the wrong source tree. 2008-07-28 18:34:31 +00:00
pooka 655d81c21a Make the user-namespaced rumpuser_cv_has_waiters() of type int
instead of bool to avoid unnecessary problems in trying to provide
the bool type.
2008-07-20 19:03:04 +00:00
pooka 28fdf2df68 support cv_has_waiters() 2008-07-18 16:19:12 +00:00
pooka d2e855d5a6 Fixes to build rump utilities as host binaries on Linux by removing
sys namespace pollution which has crept in.

Submitted in private mail by takemura, domain ca2.so-net.ne.jp
2008-07-01 12:33:32 +00:00
pooka 281bc3d490 retire rumpuser_usleep() in favor of rumpuser_nanosleep() 2008-06-24 14:14:57 +00:00
pooka 441a8c67a3 Make kpause() use nanosleep() instead of usleep(). Fixes >=1s sleeps
to actually sleep a bit too.

from Arnaud Ysmal
2008-06-24 14:11:44 +00:00
pooka 11e4a43ad9 Specify RUMP_WITHOUT_THREADS only in one place. 2008-05-29 13:12:29 +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 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 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 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 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
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
pooka daaf5e53c9 initialize error value 2008-01-03 02:38:23 +00:00
pooka 4f69d01d2f Add the ability to run puffs in userspace. This means that puffs
can now be developed in userspace using puffs for development
(I hate emulators, they are annoyingly clumsy).

To e.g. mount psshfs using puffs-on-puffs, run fs/bin/syspuffs/syspuffs
with the regular mount_psshfs command line as an argument:

    golem> ./syspuffs /usr/sbin/mount_psshfs ftp.netbsd.org:/pub /puffs

This will make the mount appear as usual, with the exception that the
requests will be passed through puffs both in the kernel and userspace:

    ftp.netbsd.org:/pub on /puffs type puffs|p2k|puffs|psshfs
2008-01-02 18:15:12 +00:00
pooka 5251a48396 support cv_broadcast() 2007-11-19 14:17:22 +00:00
pooka 2632ba6df4 Implement cv_timedwait(), requested by Reinoud. 2007-11-17 20:50:18 +00:00
pooka f94895de17 Cast void * to intptr_t before casting to int and vice versa.
Fixes 64bit compilation warnings.  reported by moof & wiz
2007-11-08 10:57:19 +00:00
pooka 7e0d71a369 Execute I/O in a separate thread for async I/O where previously
everything was written/read in caller context.

Also, make the "kernel" lock recursive.  It works better that way ...
2007-11-07 18:59:18 +00:00
pooka eabd71f058 Emulate spls by using pthread rwlocks: splfoo() takes a read lock
and when doing processing in an interrupt (effectively when calling
biodone()), we take the write lock.
2007-11-07 15:41:18 +00:00
pooka 18ae49a27c Make the strategy routine get the results through biowait() and
the "disk driver" (rumpuser) call biodone() to indicate the completion
of I/O.  Support for B_ASYNC is coming at some point, but I need
more locking support in the emulated vm for that.
2007-11-04 18:43:55 +00:00
pooka 87f9ee4c42 Make it possible to run rumps multithreaded. This brings real
locking and makes it possible to run file systems which create
threads.  It also makes rump file system behaviour better match
file system behaviour in the kernel.
2007-10-31 15:57:19 +00:00
pooka b795ecbe79 fsync() device fd if doing a non-B_ASYNC write. This makes the
file system safe, but less performant as the kernel, as it syncs
*all* outstanding dirty buffers.  However, we don't have much choice
in userspace currently.
2007-09-20 23:43:44 +00:00
pooka ccd777c8fa Provide errno from rumpuser_{gettimeofday,close}() to be consistent. 2007-09-10 19:11:44 +00:00