Commit Graph

1704 Commits

Author SHA1 Message Date
dholland
a2770d1fb4 Final regen for tonight. 2011-01-02 05:12:56 +00:00
dholland
201ce42cd0 Regen yet again. 2011-01-02 05:09:50 +00:00
dholland
bf71879ee8 Regen again. 2011-01-02 05:05:42 +00:00
dholland
ef568a47eb Regen. 2011-01-02 05:02:04 +00:00
pooka
d015d3f957 Report correct file size + deal with ftruncate() and O_APPEND. 2011-01-01 19:47:22 +00:00
pooka
5cf9cd8f68 regen for comments 2010-12-30 20:11:07 +00:00
pooka
7b44389237 regen: SYCALL_NOSYS in rump_sysent[] 2010-12-30 16:51:28 +00:00
pooka
9b98cb6805 Requery syscall handlers during rump kernel init. This fixes
syscalls provided by a rump faction such as rumpvfs when the library
is not linked into the binary, but is dlopen()'d before calling
rump_init().
(it is illegal to dlopen() a faction after rump_init(), but syscalls
maybe be added the usual way with modules)

rump_server(1) -lstuff works now.
2010-12-30 16:46:32 +00:00
pooka
4513e431d6 Refetch netisr function pointers with dlsym(). This gives the
desired values in case the components containing the netisr handlers
were not linked in but dlopen()'d before calling rump_init().

(could simplify a little in case static linking is declared dead)
2010-12-30 16:19:39 +00:00
pooka
2aa9fbc0b2 Allow rump kernel to call dlsym(RTLD_DEFAULT). 2010-12-30 15:47:30 +00:00
pooka
6234f7657c regen: whitespace polish police 2010-12-30 13:38:56 +00:00
skrll
1892263359 Pull in sys/atomic.h so that hp700 can build - needed for membar_exit. 2010-12-18 14:01:43 +00:00
pooka
5e6a6543ba Don't loop eternally if uiomove() fails eternally (e.g. because
the connection to the client has been severed).
2010-12-18 11:45:09 +00:00
pooka
a290b96152 Use correct spec_islocked method. 2010-12-18 08:20:12 +00:00
rmind
11a35aed4d - Fix a few possible locking issues in execve1() and exit1(). Add a note
that scheduler locks are special in this regard - adaptive locks cannot
  be in the path due to turnstiles.  Randomly spotted/reported by uebayasi@.
- Remove unused lwp_relock() and replace lwp_lock_retry() by simplifying
  lwp_lock() and sleepq_enter() a little.
- Give alllwp its own cache-line and mark lwp_cache pointer as read-mostly.

OK ad@
2010-12-18 01:36:19 +00:00
joerg
dc09d3bc32 Support MKREPRO 2010-12-17 00:53:16 +00:00
pooka
3c4a27f7cd Print a banner a connecting client. The banner contains rump sp
protocol version, os name, os revision and machine.
2010-12-16 12:38:20 +00:00
pooka
92050ae959 stubs to make life easier 2010-12-13 14:03:59 +00:00
pooka
cee48cd5d1 Call rumpuser_sp_fini() from cpu_reboot() to make sure sys_reboot
with RB_HALT does not hang.
2010-12-12 17:11:33 +00:00
pooka
c59435eea2 add rumpuser_sp_fini, which surpringly is the opposite of rumpuser_sp_init 2010-12-12 17:10:36 +00:00
pooka
8a596af853 print a bit more diagnostics when halting 2010-12-12 13:18:07 +00:00
pooka
02357b48fb weak stubs for agr(4) 2010-12-08 20:20:52 +00:00
pooka
3589617ac9 agr(4) support 2010-12-08 20:20:16 +00:00
pooka
4dd3369fc2 add weak stubs for bridge (not the game) 2010-12-08 18:06:58 +00:00
pooka
7ed2407316 Actually, unlike e.g. carp, bridge can be its own component since
it doesn't want to join the protosw party.  We can deal with other
linkhappy stuff with weak symbols.

(where is our modular networking stack?)
2010-12-08 18:06:43 +00:00
joerg
db91f3e244 Don't alias the same symbol twice. 2010-12-08 01:22:55 +00:00
pooka
8d84854f4d add drvctl component 2010-12-07 21:38:07 +00:00
pooka
9b108f4af3 Support bridging. As usual, it would be nice if this could be a
separate component, but King Ifdef doesn't let us.
2010-12-07 20:39:07 +00:00
pooka
f03553f56f haad removed 64bit atomic ops from dm, so put it back on the MI all list 2010-12-07 17:25:40 +00:00
pooka
e7ec49d29a sockin cannot be loaded the same time as rumpnet_inet because both
provide a PF_INET domain.  Guess that real inet is more useful and
don't put sockin on the "all components" list.
2010-12-07 17:23:27 +00:00
pooka
53fd187690 Allow creation with NULL busname (to be later set with SIOCSLINKSTR). 2010-12-06 10:48:18 +00:00
pooka
6816648ce4 use -isystem where appropriate 2010-12-06 09:12:34 +00:00
pooka
99f70917f1 dm uses non-MI 64bit atomic ops, so don't include it in the default list. 2010-12-05 22:01:23 +00:00
pooka
76c4650a3f Leave usb-stuff out of alldevs until DELAY() is mi. 2010-12-05 20:39:10 +00:00
pooka
fee25d6c52 rumpcrypto should never have been its own faction, so finally make
it a component under kern, i.e. rumpcrypto -> rumpkern_crypto.
2010-12-05 20:11:21 +00:00
pooka
7e29270f53 claim ENOTTY for PRU_CONTROL for now 2010-12-05 18:01:46 +00:00
pooka
fdb9b6e9bf Revert previous: it introduces a dependency between sockin and the
netinet rump components and will have to be done another way.
2010-12-05 17:59:12 +00:00
pooka
6292852036 Rename Makefile.rump${x} to Makefile.rump${x}comp for consistency. 2010-12-05 16:53:46 +00:00
pooka
a0cc35fc67 include usb_verbose in the component (at least for the time being) 2010-12-05 16:51:00 +00:00
pooka
6c11d60910 whitespace polish 2010-12-05 16:50:09 +00:00
pooka
6dccdaa019 Make build similar to fs, net & dev. 2010-12-05 16:27:42 +00:00
pooka
520524fd92 Fix RUMPFSLIBS etc. As collateral, rename nullfs/umapfs to match
the vfsname, i.e. to "null" and "umap".
2010-12-05 16:11:16 +00:00
pooka
6ec300d935 get rid of this uninstalled "test", even i haven't compiled it for ages 2010-12-05 16:02:04 +00:00
pooka
2665f62b03 use in_control() for PRU_CONTROL 2010-12-05 15:54:50 +00:00
pooka
688fddb6c6 add ci_curlwp since we use it now 2010-12-02 21:20:39 +00:00
pooka
1de81dd955 If the pagedaemon cannot free any memory due to not being able to
lock any uvm objects, check if lockholders are currently on CPU
and yield to try very soon again instead of assuming deadlock.

This makes limited-memory kernels perform the same as memory-unlimited
kernels (provided there is a reasonable amount of memory available).
For example, for large file copy off of ffs where the image is
backed on host memory (i.e. no disk i/o, i.e. ideal conditions)
the figures are, per rump kernel memory limit:

3000kB: same
1000kB: 10% slower
500kB:  50% slower

(per pagedaemon code might still be able to use some tweak, though)
2010-12-01 20:29:56 +00:00
pooka
48ac8b3849 implement mutex_owner() 2010-12-01 17:22:51 +00:00
pooka
cac1c6e392 Don't bother asserting: if we create the thread without KTHREAD_MPSAFE,
it's not going to be MPSAFE.
2010-12-01 15:13:24 +00:00
pooka
5f9e9d2543 rumpuser interface changed 2010-12-01 15:02:04 +00:00
pooka
5e1b7bf36d Track lwp as the rumpuser mutex owner instead of pthread_t (this
is done in rumpuser for simplicity, since on the kernel side things
we assume we have only one pointer of space).  As a side-effect,
we can no longer know if the current thread is holding on to a
mutex locked without curlwp context (basically all mutexes inited
outside of mutex_init()).  The only thing that called rumpuser_mutex_held()
for a non-kmutex was the giant lock.  So, instead implement recursive
locking for the giant lock in the rump kernel and get rid of the
now-unused recursive pthread mutex in the hypercall interface.
2010-12-01 14:59:37 +00:00
pooka
f73729b6b4 Make uvm_pagealloc_tele() fail if the request can't be immediately
satisfied.  This allows the caller to unlock the object and the
pagedaemon to avoid deadlock even if ~all memory is consumed by
one vm object.  This in turn makes is possible to copy a large file
into a rump kernel with a 10MB memory limit (where large >> 10MB).
A little more tuning will be required to avoid the pagedaemon
hitting the sleep-and-retry path, though.

+ fix some outdated unrelated comments
2010-12-01 11:19:18 +00:00
pooka
074a7d7688 simplify 2010-11-30 18:20:41 +00:00
pooka
205a3e1371 regen: checksavecn is gone 2010-11-30 16:27:30 +00:00
pooka
2c4a6d5bab remove unnecessary interface 2010-11-30 15:41:35 +00:00
pooka
88c803e16f fix broken rototill 2010-11-30 15:39:27 +00:00
pooka
7332ad1515 Require server to be explicitly initialized with rump_init_server(url).
Also, add rump_daemonize_begin() / rump_daemonize_end() to help
with the "can't daemon() after pthread_create()" problem.  Applications
could accomplish the same, but since it's such a common operation,
provide a little help.
2010-11-30 14:23:24 +00:00
dholland
fbc55b334e SAVENAME and HASBUF namei flags have been removed; update rumpvfs accordingly. 2010-11-30 10:48:27 +00:00
dholland
cf7974120a RUMPCN_FORCEFREE is no longer needed. 2010-11-30 10:46:59 +00:00
dholland
3538a43f3a Regen for both preceding commits of namei.src together. I suppose I should
technically have regen'd separately for each but it didn't seem worthwhile.
2010-11-30 10:44:44 +00:00
dholland
0c1edef512 Fix etfs pathname handling to not (mis)use namei's scratch space.
etfs objects must now be registered as absolute paths; however, it is now
possible to access them via relative paths and through symlinks, which
previously worked some times and not others depending on exactly what
namei was doing.

discussed on tech-kern and ok'd by pooka.
2010-11-30 01:22:50 +00:00
pooka
571bbfbcca Duh, it's x86_64, not amd64. This should make the races which
require SMP trigger in the amd64/qemu runs again.
2010-11-26 09:25:39 +00:00
pooka
6b71288c49 *facepalm*, adjust remote copyinstr to work in cases where the end
of the max copyin extends to an unmapped page.

Noticed, as usual, by tests.
2010-11-25 17:59:02 +00:00
pooka
e425e897be Add aliases for _atomic_cas_foo, as they are used often. A snafu
in "./build.sh rumptest" prevented me from noticing this yesterday,
so thanks to Nick Hudson for re-pinging.
(I'll fix build.sh shortly)
2010-11-23 12:51:10 +00:00
pooka
03969dba0e the usual wuninit stuff 2010-11-22 21:46:04 +00:00
pooka
cd28ebebac Add rump component for md(4).
Now, let's say you start a rump server and configure a memory disk
on it.  Remote (as in TCP remote) clients may now access that
memory.

cloudy, my apps are scattered and they're cloudy
they have no borders, no boundaries
2010-11-22 21:20:32 +00:00
pooka
9be034428c Support physio for remote processes.
==> add support for remote vmspace vmapbuf/vunmapbuf
  ==> add proper support for copyin/out_vmspace
    ==> add support for remote vmspace uvm_io
      ==> add support for non-curproc rumpuser_sp_copyin/out
        ==> store remote context in vm_map->pmap instead of
            pthread_specificdata

In short, makes read/write of most (all?) block devices work from
a remote rump client via rump syscalls.
2010-11-22 20:42:19 +00:00
pooka
c816a62b18 "regen": /dev/md* 2010-11-22 20:29:15 +00:00
pooka
639422bd4e Support VOP_SETATTR, otherwise e.g. open(O_TRUNC) fails. 2010-11-22 15:15:35 +00:00
pooka
9734188353 rename atomic_cas_up to rump_atomic_cas_up to avoid collisions 2010-11-22 10:50:50 +00:00
pooka
a742ba8060 Encode smp-capability into the makefile so that it can be used to
avoid potential screwups.
2010-11-21 22:17:24 +00:00
pooka
a78ea8c07c Fix situation where we try to configure >MAXCPUS cpus. 2010-11-21 22:01:15 +00:00
pooka
566f7922d9 Add a lockless uniprocessor version of atomic_cas_generic.c, which
is currently used by all the archs that previously used cas_generic.
2010-11-21 21:46:43 +00:00
pooka
bcc1160c88 regen: rump_reboot is gone 2010-11-21 17:35:19 +00:00
pooka
15e3ba0cc7 Realize the >1yo comment above rump_reboot and retire them to make
room for sys_reboot.
2010-11-21 17:34:11 +00:00
pooka
237c2727e8 I can't think of any reason why a rump kernel has to allow vfsusermount
by default, nor do I remember why i originally added it in 2008
==> remove.
2010-11-21 16:19:19 +00:00
pooka
a555936f2e remove no longer necessary code 2010-11-19 17:11:20 +00:00
pooka
1f5c4aaeac Pass routines necessary for multithreaded operation down to rumpuser_sp. 2010-11-19 17:06:56 +00:00
dholland
479d02e2f7 Regen. 2010-11-19 06:45:29 +00:00
dholland
8f6ed30d57 Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.
2010-11-19 06:44:33 +00:00
pooka
e425b7c737 Remove unused rump_set_vmspace. An equivalent needs to come back
later, though, but in its current form it's just unusable garbage.
2010-11-17 21:57:33 +00:00
pooka
5eb7a3a4cc Provide a special rump_proxy_syscall for handling received proxy
syscalls and retire unused rump_syscall.
2010-11-17 21:52:29 +00:00
pooka
dc4938b8f8 regen: -rump_pub_syscall 2010-11-17 21:50:34 +00:00
pooka
56c4db38a8 remove rump_pub_syscall -- unused/unusable 2010-11-17 21:49:52 +00:00
pooka
5e4322985a regen: optimize local syscall path a bit 2010-11-17 21:48:07 +00:00
pooka
3e9c0c4fe1 cleanup some old garbage 2010-11-17 19:54:09 +00:00
pooka
d9aab6f8fc Support destroy in shmif. 2010-11-17 17:51:22 +00:00
pooka
b4e3a3178b Use vmem for keeping track of unit numbers so that wildcard allocation
works correctly.
2010-11-16 20:08:24 +00:00
uebayasi
0905fbeb72 Define uvmexp_pagemask and friends used by sparc to set PAGE_SIZE,
PAGE_MASK, PAGE_SHIFT dynamically.
2010-11-16 01:12:57 +00:00
pooka
891314e269 "fix" completely crackheaded code w/ uninitialized use,
missed as usual by the wonderful -g -O0
2010-11-15 23:59:06 +00:00
pooka
d6787585af remember to commit this file too 2010-11-15 23:51:06 +00:00
pooka
32b08b37e0 un-\240 2010-11-15 22:49:33 +00:00
pooka
9f725ef6cb * make interface a cloner
* use SIOCSLINKSTR for supplying bus filename in case of cloned if

TODO: downing interface, unclone, and some tweaks for robustness
2010-11-15 22:48:06 +00:00
pooka
4a79b4abf7 add -h which prints only the bus header info 2010-11-15 22:45:23 +00:00
pooka
00ab7eeb45 Add a new signal model RUMP_SIGMODEL_RECORD which records all
signals which are posted to a process.
2010-11-15 20:37:21 +00:00
pooka
ab9955e060 apply const 2010-11-15 20:24:09 +00:00
pooka
1ff4490a1c Make interface support ifconfig {down,destroy} and generally make
it a little less eager to panic.
2010-11-15 20:23:11 +00:00
uebayasi
77d80f38cd Abstraction fix; move physical address -> per-page metadata (struct
vm_page *) "reverse" lookup code from uvm_page.h to uvm_page.c, to
help migration to not do that.

Likewise move per-page metadata (struct vm_page *) -> physical
address "forward" conversion code into *.c too.  This is called
only low-layer VM and MD code.
2010-11-12 05:23:41 +00:00
pooka
d109ed0795 help me if you can i'm gcc
and i do appreciate work'round-eee'e
help me, get my head out of the ground
won't you please, please help me?
2010-11-11 18:45:09 +00:00
pooka
52bdbe10cf +VOP_REMOVE 2010-11-11 17:33:22 +00:00
pooka
ffb60285ab support read/write & ubc 2010-11-11 17:26:01 +00:00
pooka
f637fc68d9 support vop_pathconf 2010-11-11 16:08:31 +00:00
pooka
30739dcdee support vfs_mount/unmount 2010-11-11 16:01:59 +00:00
pooka
d542ce3403 be friends with genfs 2010-11-11 15:05:54 +00:00
pooka
a51c1c8b1e +posix_fadvise 2010-11-11 14:48:13 +00:00
pooka
01849d1a4b Support non-hostbacked regular files, at least just a little bit. 2010-11-11 14:46:55 +00:00
pooka
b9b9911952 Fix off-by-one in the rpc path of copyinstr() 2010-11-09 20:55:14 +00:00
pooka
8fcead892c fix copystr/copyinstr/copyoutstr to return ENAMETOOLONG where appropriate 2010-11-09 15:22:47 +00:00
pooka
21893685ca print some dmesg blub for etfs files attaching as block devices 2010-11-08 11:01:45 +00:00
pooka
62d92a1913 support compat ioctl's (OOOOOlalaSIOC stuff) 2010-11-07 19:47:18 +00:00
pooka
d8d5e7b0b7 bump rumpuser version 2010-11-04 20:57:00 +00:00
pooka
13e503f148 Refactor the sysproxy code so that rumpuser contains only the server side. 2010-11-04 20:54:07 +00:00
pooka
a3aca72140 regen: standalone client support for rump syscalls 2010-11-04 20:51:18 +00:00
pooka
f8f090bd5e regen: whitespace blues 2010-11-01 16:22:37 +00:00
pooka
5629968a95 Missed a few symbols in previous ...
Also, reorganize rumpuser header inclusion to make sure problem is
caught already by the compiler.
2010-11-01 13:55:19 +00:00
pooka
8fc7f9077e Make librumpuser linkage once again free of librump.
problem pointed out by <he>
2010-11-01 13:49:10 +00:00
pooka
41a10084d4 Attach implicit threads to initproc instead of proc0. This way
applications which alter, by purpose or by accident, the uid in an
implicit thread are don't affect kernel threads.

from discussion with njoly
2010-10-29 15:32:23 +00:00
pooka
082af2faa5 minor knf 2010-10-29 15:27:50 +00:00
pooka
2ca5613a5c Count proc0 as uid 0's process. Besides being the right thing to
do, this effectively allows changing the uid of proc0 without
running into KASSERT problems in uidinfo code (although I'm not
quite so sure changing proc0's uid is the right thing to do ...).

problem reported by njoly
2010-10-28 11:30:07 +00:00
pooka
993e75b0b4 remove obsolete tests 2010-10-27 20:46:54 +00:00
pooka
b1842c2201 Start rework of system call proxying over socket ("sysproxy").
This incarnation is written in the user namespace as opposed to
the previous one which was done in kernel namespace.  Also, rump
does all the handshaking now instead of excepting an application
to come up with the user namespace socket.

There's still a lot to do, including making code "a bit" more
robust, actually running different clients in a different process
inside the kernel and splitting the client side library from librump.
I'm committing this now so that I don't lose it, plus it generally
works as long as you don't use it in unexcepted ways: i've tested
ifconfig(8), route(8), envstat(8) and sysctl(8).
2010-10-27 20:44:49 +00:00
pooka
0f423ad930 "i build dead files". ok, so let's not. 2010-10-27 20:37:11 +00:00
pooka
297882358c regen:
- rump_sysproxy
+ rump_syscall
2010-10-27 20:35:47 +00:00
pooka
b2380889f3 Retire the old sysproxy nonsense (as part of doing it slightly better).
Introduce rump_pub_syscall() as the generic interface for making
system calls with already marshalled arguments.  So it's kinda like
syscall(2), except it also remembered to breathe instead of having
to figure out how to deal with 64bit values.
2010-10-27 20:34:50 +00:00
pooka
d9a1fbfce1 Remove old crud which is no longer used (since kern_proc). 2010-10-27 15:50:03 +00:00
pooka
ac9dbb05ed make printed string more accurate 2010-10-25 17:49:36 +00:00
pooka
8660c50d36 Attach swsensor only once (it attaches automatically via MODULE
like everything else that is linked in as a module).
2010-10-20 18:48:13 +00:00
pooka
a500a55cf2 Make virtif a cloner so that it can be brough to life also with
"ifconfig create".  As previously, virt<n> interfaces with the
host's /dev/tap<n> (I guess it could be made explicit with
"ifconfig media", but leave it this way for now).
2010-10-19 19:19:41 +00:00
pooka
cb4b70f7d6 Attach PF_LINK domain. ifconfig wants to play with it, plus there's
no reason not to anyway.
2010-10-19 15:40:15 +00:00
pgoyette
adb48c7f00 Build the new swsensor(4) device and add to set lists 2010-10-19 11:58:00 +00:00
tsutsui
8e16588b0b Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
2010-10-15 15:55:52 +00:00
haad
e9533dda6f Add files needed to build npf as a RUMP library, original code bu rmind
some modifications done by me.

Oked by @rmind.
2010-10-14 22:39:30 +00:00
pooka
aeada54307 Don't reorder page on the age queue if the lookup is done by the
pagedaemon.  This mimics normal kernel behaviour where pmap_kentered
mappings are not tracked for references.  Without this change the
vnode pager's clustering could cause one page to be released by
the pagedaemon, and the rest of the pages in the pageout cluster
made unlikely candidates to be released soon.
2010-10-13 11:01:04 +00:00
pooka
04832f614a Don't attach as pseudo device here. This driver does attach in modcmd. 2010-10-12 09:14:43 +00:00
pgoyette
16da219b65 Update error message - no funcitonal change. 2010-10-04 15:57:27 +00:00
rmind
879d5dfb5e Fixes/improvements to RB-tree implementation:
1. Fix inverted node order, so that negative value from comparison operator
   would represent lower (left) node, and positive - higher (right) node.
2. Add an argument (i.e. "context"), passed to comparison operators.
3. Change rb_tree_insert_node() to return a node - either inserted one or
   already existing one.
4. Amend the interface to manipulate the actual object, instead of the
   rb_node (in a similar way as Patricia-tree interface does).
5. Update all RB-tree users accordingly.

XXX: Perhaps rename rb.h to rbtree.h, since cleaning-up..

1-3 address the PR/43488 by Jeremy Huddleston.

Passes RB-tree regression tests.
Reviewed by: matt@, christos@
2010-09-24 22:51:50 +00:00
pooka
41dca761e7 * unlock object in "error" branch
* fix typo (not in comment)
* improve indentation tailspin
2010-09-09 12:23:06 +00:00
pooka
9f2621e60c Release PG_PAGEOUT pages in aiodone. 2010-09-09 12:18:39 +00:00
pooka
2e7b2c4b52 Assert that object is locked in page unbusy. 2010-09-09 10:02:14 +00:00
pooka
0e59fd4080 hold object lock across page unbusy 2010-09-09 09:59:48 +00:00
pooka
3b79ed5da9 Use proper locking before unbusying pages.
Caught after yesterday's changes by the test suite (the ffs snapshot
test, to be precise).
2010-09-09 09:50:21 +00:00
pooka
69e5229866 Actually, we want to say "no aobjs" instead of "only vnodes" to
make component boundaries go right.
2010-09-08 21:14:32 +00:00
pooka
73ad216320 Improve pagedaemon performance:
* page out vnode objects
  * drain kmem/kernel_map

As long as there is a reasonable memory hardlimit (>600kB or so),
a rump kernel can now survive file system metadata access for an
arbitrary size file system (provided, of course, that the file
system does not use wired kernel memory for metadata ...).

Data handling still needs a little give&take finetuning.  The
general problem is that a single vm object can easily be the owner
of all vm pages in a rump kernel.  now, if a thread wants to allocate
memory while holding that object locked, there's very little the
pagedaemon can do to avoid deadlock.  but I think the problem can
be solved by making an object release a page when it wants to
allocate a page if a) the system is short on memory and b) too many
pages belong to the object.  that still doesn't take care of the
pathological situation where 1000 threads hold an object with 1
page of memory locked and try to allocate more.  but then again,
running 1000 threads with <1MB of memory is an unlikely scenario.
and ultimately, I call upon the fundamental interaction which is
the basis of why any operating works: luck.
2010-09-08 21:02:11 +00:00
pooka
8a2467ef8f Make the Diabolical (Page)Daemon Director drain vfs buffers when
we are short of memory.

There are still some funnies left to iron out.  For example, with
a certain file system / memory size configuration it's still not
possible to create enough files to make the file system run out of
inodes before the kernel runs out of memory.  Also, with some other
configurations disk access slows down gargantually (though i'm sure
there are >0 buffers available).  Anyway, it ~works for now and
it's by no means worse than what it was before.
2010-09-07 21:11:10 +00:00
pooka
8fff110d3d Allocate softint vectors for the final number of CPUs, not the
number currently attached.  Deals with a SNAFU in my commit earlier
today which would cause softints established early to lack a
softint context on non-bootstrap CPUs.
2010-09-07 18:25:38 +00:00
pooka
d00164124d update comments. no code change. 2010-09-07 17:49:23 +00:00
pooka
91ada95af8 regen: rcvp/cdir interfaces go byebye in favour of rump syscalls 2010-09-07 17:14:18 +00:00
pooka
18ec09b711 Retire the prehistoric chroot/cwd interfaces now that there is a
process model in rump.
2010-09-07 17:13:03 +00:00
pooka
a9f67b6a36 regen: getcwd 2010-09-07 17:10:48 +00:00
pooka
4aea95690f Attach only one CPU for the bootstrap phase. 2010-09-07 07:59:48 +00:00
pooka
5862500201 Improve page allocator performance by using pool_cache for the
structure itself and allocating the backing page directly from the
hypervisor.

* initial write to a large tmpfs file is almost 2x faster
* truncating the file to 0 length after write is over 50% faster
* rewrite of the file is just slightly faster (indicating that
  kmem does a good job with caching, as expected)
2010-09-07 07:47:36 +00:00