- Aug 07, 2013
-
-
Pekka Enberg authored
-
Pekka Enberg authored
-
Christoph Hellwig authored
Posix doesn't require a writeable file descriptor for fsync, and all common operating systems allow fsync on a non-writable fd, as this is required to synchronize directory operations. Also fix up the indentation in sys_fsync a bit.
-
- Aug 06, 2013
-
-
Pekka Enberg authored
-
Pekka Enberg authored
Suggested by hch.
-
Glauber Costa authored
-
Glauber Costa authored
-
Pekka Enberg authored
As pointed out by Nadav, posix_fadvise() doesn't set errno. Instead, it returns the error number: http://pubs.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
-
Avi Kivity authored
Prevent IPIs to a cpu that is idle for a short time.
-
Nadav Har'El authored
The option to undef LOCKFREE_MUTEX in osv/mutex.h, to enable the old spin-based mutex, got broken after the addition of the wait morphing feature. Wait morphing needs two features which were never added to the spin-based option, and probably never will (we should in the near future remove the old mutex implementation): 1. The mutex->send_lock() feature, on which the wait morphing feature is built, and 2. The ability to add another field, "user_mutex", to condvar, which means condvar cannot be constraint in size so libc/pthread.cc must use a pointer, which we only currently do for the larger LOCKFREE_MUTEX. So this patch re-adds the "WAIT_MORPHING" compile-time option, and disables WAIT_MORPHING if LOCKFREE_MUTEX is disabled. Now OSV can be compiled with #undef LOCKFREE_MUTEX.
-
Pekka Enberg authored
Make calloc() deal with malloc() returning NULL.
-
Pekka Enberg authored
-
Glauber Costa authored
For now, ignore permitted advice and reject invalid ones.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
Unlike Solaris the znode is a separate structure in OSv and we need a separate reference count for it. The implementzation isn't very optimized yet, and instead of optimizing it it would be better to unify the two structure lifetimes.
-
Christoph Hellwig authored
-
Nadav Har'El authored
The previous commit (fix symbol resolution order) caused a regression - tst-pipe.so stopped working, aborting on segfault while handling an expected exception (one of the only places in OSV where we use an exception to signal an error - running out of file descriptors). However, it turns that commit just exposed an already existing bug in our exception unwinding support. The following trivial test of exceptions, throwing an integer and catching it, crashes both with the previous commit, and without it.
-
- Aug 05, 2013
-
-
Nadav Har'El authored
Christoph discovered a bug in our dynamic linker, where symbols which exist in the kernel cannot be used in a shared object, which can cause nasty bugs when trying to run existing programs. This test demonstrates this bug, and verifies its fix (in the previous commit).
-
Nadav Har'El authored
This patch fixes the bug in tst-resolve.so, where an OSV symbol (such as debug()) hides a symbol in the application (a shared object we are running). We look up symbols in load order - if tst-resolve.so needs libstdc++.so, we search for symbols in this order - first in tst-resolve.so and then libstdc++.so. This order is mostly fine. There is one problem though - that OSV itself is loaded first, so always gets searched first, which is not really what users expect: Users expect OSV to behave like the glibc library (searched last), not like the main executable (search first). So this patch keeps the first-loaded object (OSV itself) last on the search list.
-
Nadav Har'El authored
Pass -X* (and of course also -XX*) options to the JVM. The -Xmx option is the most useful example.
-
Nadav Har'El authored
The JVM options end with the first "-jar" *or* classname, not *and*. Fix the typo.
-
Pekka Enberg authored
Now that vn_stat() supports VOP_GETATTR, wire up the ZFS implementation.
-
Pekka Enberg authored
-
Glauber Costa authored
-
Avi Kivity authored
Increasing the poll time increases the chances that we can avoid the IPI. Idle host load increase is negligible.
-
Avi Kivity authored
The scheduler polls the wakeup queue when idle for a short time before HLTing in order to avoid the expensive HLT instruction if a wakeup arrives early. This patch extends this to also disable remote wakeups during the polling period, reducing the waking cpu's need to issue an IPI, whicj requires an exit. This helps synchronous multithreaded workloads, where threads block and wake each other. Together with the following patch, netperf throughtput increases from ~17Gbps to ~19Gbps, and the context switch benchmark improves from $ run tests/tst-ctxsw.so 345 colocated 5761 apart 633 nopin to $ run tests/tst-ctxsw.so 347 colocated 598 apart 467 nopin
-
Christoph Hellwig authored
Without this we somehow get a non-zero value in it while running under OSv. This needs to be investigated as it would have a bad effect on user workloads.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
The off_t cast are just superflous, the int cast causes actual truncatation bugs.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
This currently causes an abort with out implementation, which looks ugly. Just let the return 0 from main do its work.
-
Christoph Hellwig authored
We don't support writing through shared mmaps yet.
-
Christoph Hellwig authored
Add fsx from xfstests to our test cases. Currently fails on the first OP due to our lacking truncate implemenation.
-
- Aug 04, 2013
-
-
Avi Kivity authored
gcc generates some functions in their own section. Have a wildcard that catches all of these sections so they can all be merged into the global .text section; this makes 'perf kvm top' format its output better. The catch-all wildcard is placed last since ld uses the first match.
-
Avi Kivity authored
Not all machines have Enhanced REP MOVSB/STOSB (ERMS); provide optimized fallbacks.
-
Avi Kivity authored
Cache uma initialized objects to avoid re-initializing them on each allocation.
-
Nadav Har'El authored
Convert poll.c to poll.cc, and add a few tracepoints.
-
Nadav Har'El authored
Before this patch, we ran init.js for every new shell. But init.js runs things that only need to be done once - like setting the IP address or runnig a DHCP or Telnet server - and we don't need to do this again when somebody telnets in. So this patch adds an "init" flag, which tells the shell if it should read init.js. This flag is true for the CLI's main(), but when run from TelnetCLI, the flag is false.
-
Nadav Har'El authored
Our CLI changes the console's tty mode to raw when doing its line editing, and back to the original (cooked) mode when running a command. Obviously, when we're running on a telnet connection we shouldn't touch the console's mode like the existing code did. OSV doesn't (at least for now) have ptys, so we can't handle the telnet connection exactly like we handled the console, and the kernel can't implement a "cooked" line discipline for us like it implemented on the console. But we can do a very similar thing in Java instead: This patch adds a new Java class, "TTY", which has an input and output stream and an "stty" interface. We have one implementation for the console (using System.in, System.out and the console's Stty), and a different implementation, TelnetTTY, for a telnet connection. This patch does not currently implement a line discipline ("cooked mode") for this TelnetTTY, so it will always stay in raw mode. This is fine for all our current uses of the CLI, but if in the future we have commands that read user input and expect cooked mode (echo, line editing), we'll need to implement this line discipline.
-
- Aug 01, 2013
-
-
Glauber Costa authored
There is no harm in leaving it mappend, and there is a potential harm in unmapping, since our mapping code does not keep reference counters. So if we map an already mapped area, the unmap code will just unmap it for good. Avi spotted this.
-