- Jun 30, 2013
-
-
Guy Zana authored
-
Guy Zana authored
mainargs is a String[] set by Java (see RhinoCLI.java), some of the commands that access the elements of this array fail because the strings are Java strings and not Javascript strings. this patch perform a proper cast on init(), just before invoking the command. now it's also possible to start a test from the command line, like so: $ sudo ./scripts/run.py -n -e "java.so -jar /java/cli.jar test <test-name>" -c2 -m1G
-
Avi Kivity authored
Example: test foo &
-
Nadav Har'El authored
Implement getpwname(), setuid() and setgid() in the simplest way possible considering that we don't support any userid except 0: getpwname() returns user 0 for any username given to it. setuid() and setgid() does nothing for uid or gid 0, otherwise fails. Where would the caller get this !=0 id anyway? Memcached needs these calls, because it wants to be clever and warn the user against running it as root....
-
Nadav Har'El authored
Implement the signal() function. This is hardly a useful function in OSV, first because our signal support is pretty broken, and second because sigaction() is a much more portable API that should always be preferred. Nevertheless, memcached uses signal() (to catch SIGINT, which it will never get in OSV...), so let's implement it for the sake of completeness.
-
Nadav Har'El authored
Replace debug() messages in epoll with useful tracepoints.
-
Nadav Har'El authored
epoll and poll() use different event names (e.g., EPOLLIN vs. POLLIN), but in practice the bits are identical. Make this conversion more explicit, and add static_assert()s that the bits are indeed identical. We still have dynamic assert() that the bits we don't support - EPOLLET (for edge triggered behavior) and EPOLLONESHOT - aren't used. This patch only makes the code cleaner, but doesn't change anything in its behavior.`
-
- Jun 26, 2013
-
-
Glauber Costa authored
As the comment states itself, mp_ncpus should be the number of CPUs in the system, not the maximum number of CPUs. We can currently grab that from the smp_processors variable. I have audited the code for current users, though, and found two places in which it is used as the maximum number of cpus. Those are changed to MAXCPU
-
Nadav Har'El authored
Change lockfree::mutex to use "protected" instead of "private". This allows tst-mutex to extend it and mess with the internals (I want to modify count, to benchmark the rare "handoff" case). Sorry about the build error.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
The way lookups work in OSv are very different from Solaris and FreeBSD as we already get a preallocated vnode passed in. Thus the code also is very different and basically the vnode operation is an entirely different implementation. We thus don't even try to keep the code, and also leave out support for things like case insenstive lookups or extended attributes which might never be supported or at least will look very different.
-
Christoph Hellwig authored
-
Glauber Costa authored
Unlike KVM, we won't use percpu variables because Xen already lays down statically the shared info structure, that includes the vcpu info pointer for each cpu. We could in theory use percpu variables to store pointers to the current cpu vcpu info, but I ended up giving up this route. Since our pcpu implementation have the overhead of computing addresses anyway, we may as well pay the price and compute it directly from the xen shared info. One of the things that comes with it, is that we can compute precise timings using xenclock very early. Since we don't have *that* much to do early, it is unclear if KVM needs to be improved in this regard (probably not), so this becomes just a slight bonus.
-
Glauber Costa authored
The designer of kvmclock wrote it in a way so as to be ABI-compatible with xen's pvclock. We can reuse the same structures, then, so let's do it.
-
Glauber Costa authored
Because we are now pre-computing wall clock, we only need preemption disabled during system time calculation.
-
Nadav Har'El authored
The tracepoints in lfmutex.cc referred to the type "mutex" outside the "lockfree" namespace. When LOCKFREE_MUTEX is disabled in osv/mutex.h, "mutex" is not an alias of "lockfree::mutex" so this does not compile. Move the tracepoints inside the namespace, so they can use "mutex" and got the right one.
-
Nadav Har'El authored
A bunch of improvements to tst-mutex. Add another mutual-exclusion test case, some asserts, and a benchmark of the "handoff" corner case.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
This is a bit different from FreeBSD (which already differs from Solaris) because our VFS generally already has an allocated vnode around.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
- Jun 25, 2013
-
-
Glauber Costa authored
Xen defines a protocol for defining whether or not PV drivers are available in an HVM guest. Upon successful negotiation, the documentation states that: "The relevant emulated devices then disappear from the relevant buses. For most guest operating systems, you want to do this before device enumeration happens." This patch basically follows this protocol and stores the result for future usage. See more at: docs/misc/hvm-emulated-unplug.markdown
-
Glauber Costa authored
-
Glauber Costa authored
This reverts commit dae99589.
-
Glauber Costa authored
-
Glauber Costa authored
Xen's information can be in a variety of MSRs. We need to test for them all and figure out in which of them lays the informations we want. Once we determine that, xen initalization code is ready to be executed. This needs to run as early as possible, because all xen drivers will make use of it one way or another. The hypercall code is heavily inspired (aka mostly copied) from Avi's xen tentative patch, with the 5-argument hypercall removed (delayed until we need it) Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
-
Glauber Costa authored
I am pretty sure kvmclock only sets the wall time when we write to the MSR, so there is no point in keep calculating it every time we call system_time(). I am not changing it to a const function because we *may* have to call it more than once in the future, if we ever suspend, or the likes. But for now, using a pre-computed value is enough. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
-
Glauber Costa authored
This is not a very serious issue, but goes like this: The very simple read method we are attempting right now in the loader, will keep reading from the disk until we reach a pre-determined max size. However, the disk is usually smaller than this. If this is the case, XEN dmesg logs are filled with messages indicated that we are trying to read from invalid LBAs, to the point of making the log useless for me. So although the annoyance is minor, the patch itself is minor too. If nobody opposes, I can apply it. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
-
Nadav Har'El authored
The "events", not "revents", field of the poll structure needs to be set before calling poll().
-
Nadav Har'El authored
Add tst-epoll.cc for testing the epoll_*() functions. This test finds a bug, which will be fixed in a separate patch.
-
- Jun 24, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
Not wired up yet due to the problems of creating a zfs fs on the host.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-