Commit Graph

640 Commits

Author SHA1 Message Date
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
pooka
d8327efb56 Create receive thread only in if_start() to make sure it happens
after the we have been attached to the ethernet framework.
XXX: if_stop is still unimplemented
2009-03-01 20:50:04 +00:00
martin
bcd8301033 add missing atomic.h include 2009-03-01 07:10:41 +00:00
pooka
e4b2f37a4b don't require the ifnum return pointer. 2009-02-28 16:15:19 +00:00
pooka
0d6fd70c22 Remember to commit the rumpuser bits necessary for if_shm: mmaping
a file and waiting for writes to it.
2009-02-28 15:49:12 +00:00
pooka
a4aff0cbb8 Add a virtual ethernet interface which uses shared memory as the
bus instead of relying on the host kernel's tap and bridge.  This
is much lighterweight approach which does not consume non-pageable
kernel resources.
2009-02-28 15:28:45 +00:00
pooka
cc8bfe6c12 Fix a silly mistake: indubitably the struct ifnet pointer given to
ether_ifattach() should point to a struct ethercom.
2009-02-28 12:29:27 +00:00
pooka
9c5ad216e7 decouple rumpuser gettime from struct timeval 2009-02-27 15:15:19 +00:00
pooka
89890e45af g/c debug printf 2009-02-26 15:25:52 +00:00
pooka
197a83bc73 When using an array as a ringbuffer, need to perform modulo arithmetic
with arraysize instead of arraysize-1.  Previously there was one
inconsistency in the code.  This might fix a crash reported by apb.

Also, g/c outdated comment.
2009-02-26 15:25:11 +00:00
pooka
51e345d0a5 decouple from host struct iovec 2009-02-26 00:59:31 +00:00
pooka
8c19023a4f Make rumpuser stat and nanosleep independent of the host system
stat and timespec definitions.
2009-02-26 00:32:49 +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
pooka
69c19242f6 need sys/syscall.h 2009-02-20 18:08:12 +00:00
pooka
21edd4422b missed one prototype 2009-02-20 18:02:19 +00:00
pooka
700c2e19b8 typedef rump_sysproxy_t 2009-02-20 17:59:58 +00:00
pooka
bbcc1462b6 Add local syscall proxy as the default. 2009-02-20 17:58:22 +00:00
pooka
7d67be65d2 regen: make syscalls through a table 2009-02-20 17:57:46 +00:00
pooka
0497bce990 Default to using threads. This doesn't affect the normal release build. 2009-02-17 16:01:15 +00:00
pooka
143addadfb Use p_nlwpid to store the next lwpid location. 2009-02-12 14:46:58 +00:00
lukem
342bcd3c5c Drop to WARNS?=3 as src/sys doesn't compile with -Wsign-compare yet 2009-02-12 13:23:17 +00:00
enami
c2af4c75ef Regen. 2009-02-11 00:20:18 +00:00
pooka
d600a654c8 Explain in comment why the RNG is private (no, not the Random Nethack God) 2009-02-10 20:44:57 +00:00
pooka
fa73a97f70 Introduce simple random fault injection. It is currently controlled
by setting RUMP_BLKFAIL to control the frequency and optionally
RUMP_BLKFAIL_SEED, which seeds the "random" number generator.  Feel
free to extend the code if you want something "a little more" for
your purposes.
2009-02-10 20:43:01 +00:00
pooka
3f8c1c0f17 Add a PF_LOCAL rump kernel component. 2009-02-08 16:28:35 +00:00
pooka
38b67104c9 catchup 2009-02-08 16:18:09 +00:00
pooka
9188159bb1 Make the clock interrupt tick based on absolute time instead of
relative time.  This prevents drifting.  Also, keep track of time
within userspace, so we do not have to make a syscall to get the
clock value.  This is approximately 7 times cheaper, but on the
negative side is limited to the clock interrupt frequency.
2009-02-07 01:50:29 +00:00
pooka
d90ea96094 wipe out last vestiges of rumpspl 2009-02-06 23:35:27 +00:00
pooka
b90ea1cecf Rip out the rwlock spl emulation code. It never did anything useful
except keep my feet warm by consuming an insane amount of cpu
cycles -- in rump our current "cpu" context is never interrupted
& we have MULTIPROCESSOR.

(itch i'm scratching: it made the networking stack 10-20% slower.
this is one of the places where fast code actually matters)
2009-02-06 20:01:41 +00:00
pooka
38ebe719b0 Add weak alias stubs for a few vfs routines used by the module code -
this allows us to link programs with only rumpkern and rumpnet again.
2009-02-06 19:49:13 +00:00
pooka
248ba1c364 Call uvm_page_unbusy() instead of manually yanking PG_BUSY out. 2009-02-06 18:29:19 +00:00
pooka
a1b463523d * fix a bug where we would try to lock a PG_FAKE page twice
* do not panic if VOP_STRATEGY fails.  it's someone else's problem
* return the actual number of pages we provided, not just the ones
  which contain data
* sprinkle some debug prints
2009-02-05 19:59:35 +00:00
pooka
b511f1cdcf Create the clock interrupt and soft interrupt workers as MPSAFE 2009-02-04 19:40:21 +00:00
pooka
ead3fc22d6 Better define GATEWAY in opt_gateway.h instead of the Makefile so
UPDATE builds don't go all coocoo.
2009-02-03 00:33:48 +00:00
pooka
7e7d6e9069 -fno-strict-aliasing is now set globally for rump 2009-02-03 00:33:26 +00:00
pooka
0b60e66a6d enable GATEWAY 2009-02-01 17:05:26 +00:00
pooka
cd37e181af flags|=PG_WANTED instead of flags=PG_WANTED 2009-01-31 15:13:18 +00:00
pooka
bcf80a6fa3 .. but we still need to check if nam is passed to PRU_SEND for
non-connected sockets.
2009-01-30 22:06:04 +00:00
pooka
17e9ee6db1 Call soisconnected() in PRU_CONNECT for udp sockets too. 2009-01-30 21:13:20 +00:00
pooka
b6ffbc26cf Turn of real allocators and fall back to malloc(3) for the time
being.  Since we have many threads but pretend to have only one
cpu, the pool code runs into concurrency trouble for cpu-private
data.
2009-01-30 02:30:03 +00:00
pooka
8b70996e1b * read TCP sockets in cluster-sized chunks instead of IP_MAXPACKET.
(it might be a better to chain a few clusters into the iov
   instead of just one since we are making the syscall anyway)
* don't overwrite the useful error value
2009-01-27 13:40:16 +00:00
pooka
afe25e2049 Hold softnet_lock only when we need it. 2009-01-27 11:37:42 +00:00
pooka
ac23346377 set error if anonmmap fails 2009-01-27 10:05:08 +00:00
pooka
bd401b81df Instead of dynamically allocating and freeing the rumpuser async
io descriptors, just allocate an array statically and be happy.

Fixes a problem found by Arnaud Ysmal where a descriptor would be
allocated using kmem_alloc(9) and free'd using free(3).
2009-01-27 09:14:01 +00:00
pooka
8871312c01 Init rumpspl rwlock spinlock. Otherwise pthread_spin routines just
return EINVAL and result in not protecting what they are supposed
to protect.  This results in the counter value getting corrupted
and asserts firing.

Problem reported by Arnaud Ysmal.

While debugging this, take the opportunity to remove explicit
pthread_t comparisons and put everything under pthread_equal().
2009-01-26 19:34:12 +00:00
pooka
6aa12aa856 allocate proc_lock 2009-01-26 14:41:28 +00:00
pooka
5885120155 Init pool subsystem iff RUMP_USE_REAL_ALLOCATORS is defined. 2009-01-26 14:35:50 +00:00
pooka
d1543896fb * support PRU_SOCK/PEERADDR
* soisdisconnected() TCP sockets if read returns a non-transient error or 0
2009-01-26 13:44:51 +00:00
pooka
786ad5478f regen for new syscalls 2009-01-26 12:21:24 +00:00
pooka
29d873b4c6 Support getsockname() and getpeername() in rumpuser.
XXX: all these rumpuser_net routines passing sockaddr should use proplib.
2009-01-26 12:08:38 +00:00