]>
xenbits.xensource.com Git - people/liuw/rumprun.git/log
Antti Kantee [Tue, 21 Apr 2015 15:34:54 +0000 (15:34 +0000)]
Use BMK_SCHED_BLOCK_INFTIME where appropriate
Antti Kantee [Tue, 21 Apr 2015 15:31:16 +0000 (15:31 +0000)]
Give "sleep indefinitely" a name: BMK_SCHED_BLOCK_INFTIME.
Antti Kantee [Tue, 21 Apr 2015 15:24:08 +0000 (15:24 +0000)]
fix -Wsign-compare
Antti Kantee [Tue, 21 Apr 2015 15:21:22 +0000 (15:21 +0000)]
remove unused variable
Antti Kantee [Tue, 21 Apr 2015 15:20:06 +0000 (15:20 +0000)]
Open-code signal stubs a bit.
Can later stuff some better emulation in there, if need be.
Antti Kantee [Tue, 21 Apr 2015 14:41:20 +0000 (14:41 +0000)]
use <bmk-core/null.h> and bmk_assert()
Antti Kantee [Tue, 21 Apr 2015 14:37:47 +0000 (14:37 +0000)]
Write a for ever loop the normal way instead of with do { } while (1)
Antti Kantee [Tue, 21 Apr 2015 14:34:39 +0000 (14:34 +0000)]
might as well say that mlockall() succeeds
Antti Kantee [Tue, 21 Apr 2015 13:39:44 +0000 (13:39 +0000)]
Allocate tls before adding thread onto thread list
Doesn't really matter with the current state of things, but it's
nevertheless quite common sense to first init and then publish.
Antti Kantee [Tue, 21 Apr 2015 13:00:18 +0000 (13:00 +0000)]
Rename bmk_clock_*() to bmk_platform_clock_*()
They are expected to be implemented by the underlying platform.
Antti Kantee [Tue, 21 Apr 2015 12:47:36 +0000 (12:47 +0000)]
remember to convert this curiously built bit too
Antti Kantee [Tue, 21 Apr 2015 12:36:25 +0000 (12:36 +0000)]
update README
Antti Kantee [Tue, 21 Apr 2015 12:34:59 +0000 (12:34 +0000)]
Rename librumprun_rumpuser to libbmk_rumpuser
Layeristically speaking, the common rumpuser bits run on top of bmk,
so the renamed name now also reflects reality (and matches the
header namespace).
Antti Kantee [Tue, 21 Apr 2015 12:31:14 +0000 (12:31 +0000)]
No need for a readme saying that we can change the directory name.
Antti Kantee [Tue, 21 Apr 2015 12:30:05 +0000 (12:30 +0000)]
Rename the <bmk-base> header namespace to <rumprun-base>
This change indicates that the headers are for "userspace" level
consumers, and it also makes the header namespace match the name of
the library.
Antti Kantee [Tue, 21 Apr 2015 12:23:42 +0000 (12:23 +0000)]
Rename librumprun_core to libbmk_core.
It doesn't have anything to do with rumprun, but is at a lower layer of
abstraction, so let's just match the header namespace here.
Antti Kantee [Tue, 21 Apr 2015 11:46:52 +0000 (11:46 +0000)]
remove now-empty <mini-os/sched.h>
Antti Kantee [Tue, 21 Apr 2015 11:41:55 +0000 (11:41 +0000)]
Push the now-equal sched.c's from platforms into rumprun_core.
Antti Kantee [Tue, 21 Apr 2015 11:39:17 +0000 (11:39 +0000)]
Make sched.c for baremetal & xen run purely on top of bmk-core
Incidentally, the sched.c implementations are now 100% the same.
Antti Kantee [Tue, 21 Apr 2015 11:35:34 +0000 (11:35 +0000)]
Common name for thread switch routine: bmk_platform_cpu_sched_switch().
Not sure if it can be unified, since it needs to handle the TLS context
switch, which is apparently slightly different in a virtualized env and
on bare metal, so keep the implementations separate for now.
Antti Kantee [Tue, 21 Apr 2015 11:26:56 +0000 (11:26 +0000)]
Bootstrap scheduler the same way between xen and baremetal.
Get rid of the idle thread in Xen, it's no longer used.
Antti Kantee [Tue, 21 Apr 2015 11:18:31 +0000 (11:18 +0000)]
allow bmk_sched_init() to pass an arg to the main function
Antti Kantee [Mon, 20 Apr 2015 22:34:43 +0000 (22:34 +0000)]
Revert "return correct value from -1/errno stub"
This reverts commit
fac52c22a17e07e5000283f5af81aa6347de31a7 .
Ironically fixing the stub breaks too much stuff for now.
Antti Kantee [Mon, 20 Apr 2015 20:53:57 +0000 (20:53 +0000)]
use bmk_cpu_sched_current() from core
Antti Kantee [Mon, 20 Apr 2015 20:50:29 +0000 (20:50 +0000)]
use core for cpu-specific bits of thread creation
Antti Kantee [Mon, 20 Apr 2015 20:49:17 +0000 (20:49 +0000)]
make cpu_sched.c common for both x86 cpus
Antti Kantee [Mon, 20 Apr 2015 20:45:25 +0000 (20:45 +0000)]
rename also amd64 cpu_sched.S to avoid .c naming collision
Antti Kantee [Mon, 20 Apr 2015 20:39:01 +0000 (20:39 +0000)]
Push cpu-specific thread creation into core.
Convert -baremetal.
Antti Kantee [Mon, 20 Apr 2015 20:33:45 +0000 (20:33 +0000)]
rename to avoid collision with cpu_sched.c
Antti Kantee [Mon, 20 Apr 2015 19:49:26 +0000 (19:49 +0000)]
Match baremetal "curlwp" with xen
i.e. store thread pointer at the end of the stack. This is done
merely to minimize diffs for now, and will be fixed with tls.
Antti Kantee [Mon, 20 Apr 2015 15:21:55 +0000 (15:21 +0000)]
Make bmk_sched_init() jump from bootstrap thread to main thread.
Convert baremetal.
Antti Kantee [Mon, 20 Apr 2015 14:37:08 +0000 (14:37 +0000)]
write to the console the standard way
Antti Kantee [Mon, 20 Apr 2015 14:15:34 +0000 (14:15 +0000)]
more sched.c diff reduction
Antti Kantee [Mon, 20 Apr 2015 14:06:32 +0000 (14:06 +0000)]
Provide bmk_sched_threadname() in both schedulers
Antti Kantee [Mon, 20 Apr 2015 13:33:48 +0000 (13:33 +0000)]
unify timed sleeps in the scheduler
Antti Kantee [Mon, 20 Apr 2015 13:26:52 +0000 (13:26 +0000)]
Unify domain blocking part in scheduler implementations
Antti Kantee [Mon, 20 Apr 2015 13:05:43 +0000 (13:05 +0000)]
add a platform interface for putting the entire system to sleep
Antti Kantee [Mon, 20 Apr 2015 12:33:12 +0000 (12:33 +0000)]
some trivial diff reduction
Antti Kantee [Mon, 20 Apr 2015 12:30:18 +0000 (12:30 +0000)]
allocate thread stacks the same way on baremetal/xen
Antti Kantee [Mon, 20 Apr 2015 12:28:06 +0000 (12:28 +0000)]
pass stack size to bmk-core as page shift instead of size
Antti Kantee [Mon, 20 Apr 2015 12:07:40 +0000 (12:07 +0000)]
sprinkle with bmk_platform_splfoo() to reduce diffs with /xen
Antti Kantee [Mon, 20 Apr 2015 12:02:54 +0000 (12:02 +0000)]
use bmk_platform_splfoo() instead of local ones
Antti Kantee [Mon, 20 Apr 2015 12:01:41 +0000 (12:01 +0000)]
add a platform interface for disabling/enabling interrupts
Antti Kantee [Mon, 20 Apr 2015 11:52:50 +0000 (11:52 +0000)]
make sched_switch() static
Antti Kantee [Mon, 20 Apr 2015 11:21:41 +0000 (11:21 +0000)]
use bmk_assert() instead of ASSERT()
Antti Kantee [Mon, 20 Apr 2015 10:54:50 +0000 (10:54 +0000)]
put new threads at the end of the thread queue
reduces diff with -xen
Antti Kantee [Mon, 20 Apr 2015 10:47:21 +0000 (10:47 +0000)]
Add a scheduler debug routine for dumping the thread queue.
Antti Kantee [Mon, 20 Apr 2015 10:24:25 +0000 (10:24 +0000)]
Fix sched_yield() to actually yield.
Antti Kantee [Mon, 20 Apr 2015 08:26:30 +0000 (08:26 +0000)]
stop the test only if we started it
Antti Kantee [Mon, 20 Apr 2015 08:20:39 +0000 (08:20 +0000)]
flag an internal error if it's not possible to run a test
Antti Kantee [Mon, 20 Apr 2015 08:20:12 +0000 (08:20 +0000)]
plain /bin/sh is enough
Antti Kantee [Mon, 20 Apr 2015 07:59:51 +0000 (07:59 +0000)]
Fix bug in condvar sleep.
It caused "sleep indefinitely" to be the same as "wakeup immediately".
Antti Kantee [Sun, 19 Apr 2015 16:51:44 +0000 (16:51 +0000)]
Ensure that bmk_dmesg stays null-terminated.
Antti Kantee [Sun, 19 Apr 2015 16:06:54 +0000 (16:06 +0000)]
Store printf output a "dmesg buffer"
Currently, the easiest way to print the contents is to attach gdb
and from the gdb command prompt run: printf "%x", bmk_dmesg
Antti Kantee [Sun, 19 Apr 2015 16:05:58 +0000 (16:05 +0000)]
implement rumpuser_putchar() in common code
Antti Kantee [Sun, 19 Apr 2015 13:49:28 +0000 (13:49 +0000)]
allocate thread stacks with bmk_platform_allocpg2()
Antti Kantee [Sat, 18 Apr 2015 17:34:12 +0000 (17:34 +0000)]
force rebuild
Antti Kantee [Sat, 18 Apr 2015 16:42:16 +0000 (16:42 +0000)]
Cache thread stack sized allocations.
Antti Kantee [Sat, 18 Apr 2015 16:27:36 +0000 (16:27 +0000)]
Define stack size in terms of 2^n multiple of page size.
Not that it makes much difference now, since a page is just a value.
But it gets us closer to what /xen is doing.
Antti Kantee [Fri, 17 Apr 2015 15:02:24 +0000 (15:02 +0000)]
no need to cd to "tests" for runtests.sh anymore
Antti Kantee [Fri, 17 Apr 2015 15:01:47 +0000 (15:01 +0000)]
support running runtests.sh from arbitrary dir
Antti Kantee [Thu, 16 Apr 2015 21:45:52 +0000 (21:45 +0000)]
return correct value from -1/errno stub
IIRC, this makes some functions accidentally work "more incorrectly",
but at least it appears to make times() not hang.
Antti Kantee [Thu, 16 Apr 2015 13:36:04 +0000 (13:36 +0000)]
adjust from wall clock to internal clock before sleeping
Antti Kantee [Thu, 16 Apr 2015 12:19:07 +0000 (12:19 +0000)]
Remove the old dogdb.sh script.
Use rumprun -D instead. One way of doing things(tm)
Antti Kantee [Thu, 16 Apr 2015 11:26:58 +0000 (11:26 +0000)]
flush stdout before we close the backing fd
Antti Kantee [Thu, 16 Apr 2015 11:26:21 +0000 (11:26 +0000)]
build test programs with -g
Antti Kantee [Wed, 15 Apr 2015 10:10:31 +0000 (10:10 +0000)]
separate stubs which should return error or -1
Antti Kantee [Wed, 15 Apr 2015 09:27:14 +0000 (09:27 +0000)]
print stub warnings to stderr
Antti Kantee [Wed, 15 Apr 2015 09:25:44 +0000 (09:25 +0000)]
push libc_stubs to librumprun_base
Antti Kantee [Wed, 15 Apr 2015 09:13:54 +0000 (09:13 +0000)]
use stdio where appropriate
oh the irony, stdio used where it shouldn't be and not used where
it should be ...
Antti Kantee [Wed, 15 Apr 2015 08:55:17 +0000 (08:55 +0000)]
use bmk-core instead of stdio
Antti Kantee [Wed, 15 Apr 2015 08:38:52 +0000 (08:38 +0000)]
stdio.h is no longer required here
Antti Kantee [Wed, 15 Apr 2015 08:32:23 +0000 (08:32 +0000)]
move dprintf to common librumprun_rumpuser
Antti Kantee [Wed, 15 Apr 2015 08:30:27 +0000 (08:30 +0000)]
initialize bmk-core printf for -xen
Antti Kantee [Wed, 15 Apr 2015 08:24:58 +0000 (08:24 +0000)]
reflect reality in comments
Antti Kantee [Wed, 15 Apr 2015 08:24:03 +0000 (08:24 +0000)]
remove arg name
Antti Kantee [Wed, 15 Apr 2015 08:23:30 +0000 (08:23 +0000)]
we also need a vprintf() variant, so add it
Antti Kantee [Wed, 15 Apr 2015 08:14:27 +0000 (08:14 +0000)]
Move rumpuser stub calls from core lib to rumpuser lib
That's where they should've been in the first place, except
that the rumpuser lib didn't exist back then.
Antti Kantee [Wed, 15 Apr 2015 08:10:36 +0000 (08:10 +0000)]
in -baremetal, use printf instead of bmk_cons_puts
Antti Kantee [Wed, 15 Apr 2015 08:08:10 +0000 (08:08 +0000)]
add a printf routine to bmk-core
Antti Kantee [Wed, 15 Apr 2015 07:43:44 +0000 (07:43 +0000)]
add memchr() to string operations
Antti Kantee [Tue, 14 Apr 2015 18:46:11 +0000 (18:46 +0000)]
Output initfini as a separate section.
Without this, rodata and initfini would overlap. I'll be the first
to admit I don't 100% understand why it happened, but it did, and
this change seems to address the problem. If it ever happens again,
we'll have to get to the bottom of things.
Also, collate all of .rodata* into a single section
Antti Kantee [Tue, 14 Apr 2015 12:30:29 +0000 (12:30 +0000)]
Remove bmk_printf hack
It's no longer used and it was quite the ultimate hack ...
Antti Kantee [Mon, 13 Apr 2015 13:10:48 +0000 (13:10 +0000)]
Nuke fcntl.h dependencies from blkfront.
Simply define our own rd/wr identifiers.
Antti Kantee [Mon, 13 Apr 2015 13:09:13 +0000 (13:09 +0000)]
nuke more libc dependencies from the rumpuser layer
Antti Kantee [Mon, 13 Apr 2015 11:50:04 +0000 (11:50 +0000)]
Replace bmk_ops function pointers with regular functions.
Prefix those function bmk_platform, e.g. bmk_platform_halt()
Antti Kantee [Mon, 13 Apr 2015 11:23:10 +0000 (11:23 +0000)]
g/c unused proto
Antti Kantee [Mon, 13 Apr 2015 10:53:26 +0000 (10:53 +0000)]
use bmk-core/queue.h
Antti Kantee [Mon, 13 Apr 2015 10:49:22 +0000 (10:49 +0000)]
use bmk-core/queue.h instead of sys/queue.h
Antti Kantee [Mon, 13 Apr 2015 10:19:34 +0000 (10:19 +0000)]
move bio hypercalls from rumphyper_base to rumphyper_bio
Antti Kantee [Mon, 13 Apr 2015 10:12:46 +0000 (10:12 +0000)]
remove pre-merge READMEs
Antti Kantee [Fri, 10 Apr 2015 18:35:28 +0000 (18:35 +0000)]
Add "none" as a valid platform to runtests.sh
Runs tests, surprise surprise, on no platform.
Works around travis yaml not being a shell (I think)
Antti Kantee [Fri, 10 Apr 2015 18:33:38 +0000 (18:33 +0000)]
fix quoting
Antti Kantee [Fri, 10 Apr 2015 18:29:09 +0000 (18:29 +0000)]
sleeping for 2s is long enough for testing purposes
Antti Kantee [Fri, 10 Apr 2015 18:26:00 +0000 (20:26 +0200)]
xen now supports the test framework
Antti Kantee [Fri, 10 Apr 2015 18:25:14 +0000 (20:25 +0200)]
Don't error out of mountpath isn't specified.
Just don't mount the device in that case.
Antti Kantee [Fri, 10 Apr 2015 18:24:29 +0000 (20:24 +0200)]
default to 64M for xen for now
... until the stack allocation is fixed with proper use of tls
makes the tests actually pass with the default configuration
Antti Kantee [Fri, 10 Apr 2015 18:09:10 +0000 (18:09 +0000)]
don't hardcode qemu (baremetal) for runtests.sh
Antti Kantee [Fri, 10 Apr 2015 17:59:20 +0000 (17:59 +0000)]
Don't hardcode virtio disk device name
Not that this hack is much better, but at least it allows tests
to proceed on Xen.
Antti Kantee [Fri, 10 Apr 2015 17:07:30 +0000 (17:07 +0000)]
don't fail to notice if mountpoint is not specified