Commit Graph

370 Commits

Author SHA1 Message Date
pooka
963a1891c7 fix brainfart: kthread_create() sets curlwp 2008-10-10 20:13:58 +00:00
pooka
b33ee0fb5c Support callouts and call callout_hardclock() from the timer
interrupt thread.

The sleepq implementation required for callouts is horrible, kludged
only for callouts, and generally unacceptable.  It needs revisiting,
but I'm not sure yet should rump or kern_timeout be improved.  It's
almost untested as of now, but committing this will give me some
maneuvering space while letting application compile.
2008-10-10 13:14:41 +00:00
pooka
a868d2c97b add kern_rate, subr_iostat and subr_once 2008-10-09 21:30:06 +00:00
pooka
f3efa1ae96 Reorganize SRCS+= into smaller chunks to make adding new files
easier.  No functional change.
2008-10-09 21:25:50 +00:00
pooka
f88be1435b Rewrite interrupts to provide better softintr support, i.e. not
execute them simply in the context of the scheduling code, as this
does not work for all applications (e.g. networking soft interrupts).
Rather, schedule them and execute them from a separate context.

Also provide a timer which for now executes just hardclock_callout()
(well, at least after callouts are included in librump, which is
soon).
2008-10-09 19:40:52 +00:00
pooka
d22cdb027a No point in having our private atomic ops, just use the ones now
available in libc.
2008-10-09 17:58:33 +00:00
pooka
c453d67e49 Compile all rump kernel portions with -DMULTIPROCESSOR. 2008-10-09 13:40:38 +00:00
pooka
25a1a46f4b Unsupport ltsleep() called with an interlock. Not that it was
really supported before either, since without MULTIPROCESSOR it's
just a nop.
2008-10-09 13:39:59 +00:00
pooka
287270f554 Bump virtual page shift from 10 to 12. Otherwise the mbuf generating
macros fail to operate properly due to M_EXT_MAXPAGES being too
large and hence struct _m_ext being over MSIZE already by itself.
2008-10-09 12:34:36 +00:00
pooka
8ffd7b368a document libraries in rump/net/lib 2008-10-09 11:50:08 +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
01f8a524d4 Rewrite kernel lockus maximus handling to be correct. 2008-10-09 01:17:48 +00:00
pooka
ea7f1c6709 check return value of rump_init() 2008-10-08 11:01:28 +00:00
pooka
f4ce96e86b check rump_init() return value 2008-10-07 23:22:05 +00:00
pooka
5877c6dc5e Embed library build version into the init call and refuse to init
if they don't match.  In other words, this is a lightweight library
major number.
2008-10-07 23:16:59 +00:00
pooka
e15435197f Make libnfs compile. 2008-10-06 01:00:57 +00:00
pooka
f4c6b13e6b Locally descend into new directories (build does not descend here yet). 2008-10-06 00:32:02 +00:00
pooka
61e869be3c Implement a virtual userspace networking interface. This is required
for any sensible operation when running the entire TCP/IP stack in
userspace (as opposed to libsockin which uses host kernel networking
to provide PF_INET).

While this basically works (although it is quite barebones), it
depends on some bit of cleanup in librump and is not built by
default yet.
2008-10-06 00:30:32 +00:00
pooka
86cf71862e Provide the TCP/IP as a rump library. 2008-10-06 00:27:48 +00:00
pooka
8fb9f99bba Provide essentially sys/net as a rump library. 2008-10-06 00:27:06 +00:00
pooka
ad9bbd7b26 Add a very simplistic PF_INET/SOCK_DGRAM domain/proto implementation,
which delegates the work to host kernel sockets.  This does not
run the entire kernel TCP/IP stack in userspace and therefore does
not require the ability to send or receive raw packets.  This
implies that root priviledges are not required.  As already said
above, only supports UDPv4 for now.  Extending should be easy.
2008-10-02 21:59:19 +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
43242e6cbe Make spec_fsync() a do-nothing instead of a do-panic. Some file
systems have it directly in the specfs op vector.
2008-09-30 21:47:33 +00:00
pooka
85ca5618f1 Check that we apply the previous kludge only to the root vnode. 2008-09-30 21:00:39 +00:00
pooka
24fd6139c3 When paging in data, do not try to read past "disk" EOF. This
fixes reads for file systems which are not bound by such mundane
limitations as block size (example: nfs).
2008-09-30 20:08:23 +00:00
pooka
4fb0fb162c Make sure proc0.p_vmspace qualifies as VMSPACE_IS_KERNEL_P(). 2008-09-30 19:50:16 +00:00
pooka
44e0ae2322 Switch to std kern_auth. 2008-09-30 19:25:56 +00:00
pooka
8bf6577840 Always set HASBUF when creating a componentname. 2008-09-30 16:51:26 +00:00
pooka
eb50fe2242 Add an unspeakable kludge for nfs, which keeps an explicit reference
to the root vnode.  Properly fixing this would require fixing p2k,
which would require fixing puffs, which has some optimizations,
which are incompatible with kernel file systems...  guess my Eyes
of the Overworld were misplaced at that time.
2008-09-30 15:26:54 +00:00
reinoud
19eb6cb8aa Remove the not anymore used UDF_READWRITE flag. 2008-09-28 09:02:45 +00:00
pooka
2208b2d0df add WARNS=4 2008-09-27 20:49:55 +00:00
pooka
9db630e082 Help out reinoud a bit with the challenge of adding vfs_dirhash.c here 2008-09-27 16:03:30 +00:00
pooka
dd1721fa8d Move global malloc types from kern_malloc into a separate module. 2008-09-25 16:23:45 +00:00
pooka
e90eb67076 * fsync after !B_ASYNC write
* replace some b_flags magic with BUF_ISREAD/WRITE()
2008-09-11 13:42:35 +00:00
tron
b8771f491d Fix build problem with puffs enabled caused by the fix for PR kern/39493.
Problem noted by Thomas Klausner, patch provided by Juan RP.
2008-09-09 19:22:00 +00:00
pooka
e63b31a974 Give lwp0 an fd table and cwd. Allows easier direct use of rump. 2008-09-07 20:17:03 +00:00
pooka
429abb75bf regen: return -1 for error 2008-09-07 19:28:29 +00:00
pooka
aa224b94d6 fix broken break (oh the irony) 2008-09-05 10:42:09 +00:00
pooka
795cda8d6a Add rump support for sysvbfs. 2008-09-04 12:21:25 +00:00
pooka
827e91dd6f Make syspuffs mount code supply mount_syspuffs_parseargs() like
the other mount binaries do.  Now syspuffs can be used to run all
puffs file systems as utilities.  This includes fuse file systems
and becomes interesting with the fs-utils project.  We can now do
e.g. this:

  ReFUSE ntfs-3g:
golem> echo hello | fsu_write/fsu_write ntfs-3g puffs ~/img/ntfs.img dafile
golem> fsu_cat/fsu_cat ntfs-3g puffs ~/img/ntfs.img dafile
hello
golem>

  puffs sysctlfs:
golem> fsu_ls/fsu_ls mount_sysctlfs puffs sysctl -l ddb
total 0
-r-xr-xr-x  1 pooka  users  1 Sep  2 22:11 commandonenter
-r-xr-xr-x  1 pooka  users  2 Sep  2 22:11 fromconsole
-r-xr-xr-x  1 pooka  users  3 Sep  2 22:11 lines
-r-xr-xr-x  1 pooka  users  8 Sep  2 22:11 maxoff
-r-xr-xr-x  1 pooka  users  3 Sep  2 22:11 maxwidth
-r-xr-xr-x  1 pooka  users  2 Sep  2 22:11 onpanic
-r-xr-xr-x  1 pooka  users  3 Sep  2 22:11 radix
-r-xr-xr-x  1 pooka  users  2 Sep  2 22:11 tabstops
-r-xr-xr-x  1 pooka  users  2 Sep  2 22:11 tee_msgbuf

Same works for psshfs etcetc.

In other words, this provides total integration for "normal"
in-kernel file systems and puffs/fuse file systems on the ukfs
library level.

Note: implementation is still "first stab" and the fs-utils usage
will no doubt change.
2008-09-02 19:38:25 +00:00
pooka
38b7d91d61 Add IPL_SOFTCLOCK, something required it (although I can't quite
recall what, this has been floating in my tree for a while)
2008-09-02 19:27:35 +00:00
pooka
4b9a5d92cf Since putter wants complete frames, make sure we can hand them to it. 2008-08-15 15:02:28 +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
96a0d293a7 Don't create a new proc structure for kthreads (pid == 0).
XXX: this routine should probably do better accounting and consistency
checks as well.
2008-08-08 14:40:07 +00:00
pooka
0fca7fa92c minor nit: fix header #ifndef namespacing 2008-08-08 13:57:59 +00:00
pooka
a1e2d21c3e pg->flags &= PG_CLEAN --> &= ~PG_CLEAN;
Fixes at least writing to the fs for msdosfs.
2008-08-07 21:02:29 +00:00
pooka
3d8b145f98 some more todo points 2008-08-07 11:15:20 +00:00
pooka
7b679f625d Maintain consistency of naming between the rumpfs library name and
the MOUNT_FOOFS name.  Don't bother polluting the obsolete lists
with the original names since they were in only for a few days.
2008-08-05 14:42:03 +00:00
simonb
159018ab5b Enable "options APPLE_UFS". OK pooka@. 2008-08-05 13:16:27 +00:00