- Sep 30, 2013
-
-
Avi Kivity authored
Speeds up mgmt null build considerably
-
- Sep 29, 2013
-
-
Nadav Har'El authored
Add a comment to condvar explaining that it makes a guarantee that POSIX Threads' condition variables do not - that there are no spurious wakeups. The comment goes on to explain that at least in one place (semaphore.cc) we make use of this added guarantee, so if the condition variable implementation is ever rewritten, we'll need to keep this guarantee. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
Add "-version" option to RunJava, and therefore to java.so and the "java" CLI command. java -version now shows: java version "1.7.0_25" OpenJDK Runtime Environment (1.7.0_25-mockbuild_2013_07_27_13_36-b00) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) I can't explain why the version on the second line is different than what "java -version" on Fedora 18 shows for the same libjvm.so: java version "1.7.0_25" OpenJDK Runtime Environment (fedora-2.3.10.4.fc18-x86_64) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Dmitry Fleytman authored
1. MSI-X printous fixed 2. Duplicate EOLs removed Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com>
-
Nadav Har'El authored
Change the name of the argument of wake_with from "Pred" to "Action". This argument is a function to run, *not* a predicate (it's not supposed to return a boolean value), so it doesn't make sense to call it Pred. The implementation of wake_with already used the name "Action" - this patch fixes the prototype too. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Dmitry Fleytman authored
1. Netperf patch removed from repository 2. Documentation updated Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
This patch adds support for Linux's alarm(2) system call. alarm() is needed in some ancient Unix software, like netperf :( This implementation is fully compatible with Linux's alarm(), but please note that what alarm() does when the alarm times out is a kill(SIGALRM) - so all the caveats mentioned in the previous patch regarding kill(), will also apply here. Alarm() is implemented by running one "alarm thread", started on the first alarm() call. This alarm-thread waits for the alarm to expire, or for instructions to change the alarm. When an alarm expires the alarm thread does a kill(0,SIGALRM). tst-kill.cc (from the previous patch) includes a test to see that alarm() really sends a SIGALRM signal on time, and also that we can cancel a pending alarm and not receive a signal. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Avi Kivity authored
Some fixups to --trace-backtrace, plus symbol resolution in the log output. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Nadav Har'El authored
This patch adds support for the Linux kill(2) function. The next patch will add alarm(2) support, which uses kill(2). To be honest, we sort-of implement kill(). This implementation is compatible with the API, but the semantics are somewhat different: While in Linux kill() causes the signal handler to run on one of the existing threads, in this implementation, the signal handler is run in a *new* thread. Implementing the exact Linux semantics in OSv would require tracking when OSv runs kernel code (i.e., code in the main executable, not a shared object) so we can delay running the signal handler until returning to the user code. Moreover, we'll need to be able to interrupt sleeping kernel code. This is complicated and adds overhead even if signals aren't used (and they aren't used in most modern code). I expect that this code will be "good enough" in many use cases. This code will *not* be good in enough in programs that expect one of the following: 1. A program that by using Posix Thread's "signal masks" tried to ensure that the signal is delivered to one specific thread, and not to an arbitrary thread. 2. A program that used kill() or alarm() not intending to run a signal handler, but rather intending to interrupt a sleeping system call like sleep() or read(). Our kill() does not interrupt sleeping OSv function calls, which will continue to sleep on the thread they run on. The support in this patch (and see next patch, for alarm()) is good enough for netperf's use of alarm(). P.S. kill() can be used only to send a signal to the current process, the only process we have in OSv (you can also use pid=0 and pid=-1 to achieve the same results). This patch also adds a test for kill() and alarm(). The alarm() test will fail until the next patch :-) Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Looking up symbols is expensive, store them in a cache. Speeds up dumping the trace log when a backtrace is taken. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Also fix other review comments related to 1f161695. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Sep 28, 2013
-
-
Raphael S.Carvalho authored
The correct range is elf_start:(elf_start + elf_size - 1) Signed-off-by:
Raphael S.Carvalho <raphael.scarv@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Sep 27, 2013
-
-
Or Cohen authored
task_conv was wrongly converting "/.." and produced a path with unexpected characters after / Consequently, repeated calls (Java) to 'new File("/..").exists()' returned ambigous results, not to mention other properties like isDirectory. This confused the shell's completion mechanism (and me). In more detail, in this (/..) situation 'len' was more than 2 (in line 105) which caused 'tgt' to be pointing before the begining of 'full', from that point whatever stopped the backward search for '/' (lines 109-112) was unexpected. I guess this might occur with other combinations. This sets 'len' to be 1 when starting an absolute path conversion, to match the behavior where relative path conversion sets 'len = strlen(cwd)'. Signed-off-by:
Or Cohen <orc@fewbytes.com>
-
- Sep 26, 2013
-
-
Nadav Har'El authored
Explain in README that Gcc 4.7 is required, gcc 4.8 is recommended. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Pekka Enberg authored
Check that link returns EEXIST if destination exists. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Check that link returns ENOENT if source does not exist. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Make the link source and target paths configurable so the test can be run on Linux: $ g++ -std=c++11 tst-fs-link.cc && ./a.out foo foo2 Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
We can safely use the same function exit points for both successful and error cases. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Call the dentry that refers to the newpath parent directory "newdirdp" to make the code more explicit. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Filesystems are expected to wire up ->vop_link so it can never be NULL. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Add a new test to see if the content from one link would be the same in another. Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Add a basic test case for filesystem hard link support. You can run it as follows: ./scripts/run.py -e "tests/tst-fs-link.so" Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Make vn_stat() return inode number and link count in st_ino and st_nlink, respectively. Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
This patch adds the link() system call. The system call uses the filesystem specific VOP_LINK vnode operation to do the actual work. ZFS is currently the only available file system that supports hard links and the other filesystems return EPERM. Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Update ->va_nlink() in zfs_getattr() in preparation for sys_link(). Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Wire up the VOP_LINK vnode operation for ZFS in preparation for sys_link(). Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> [ penberg: drop FIGNORE, cleanup, split ] Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Wire up the VOP_LINK vnode operation for ramfs in preparation for sys_link(). Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> [ penberg: split to separate commit ] Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Wire up the VOP_LINK vnode operation for devfs in preparation for sys_link(). Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> [ penberg: split to separate commit ] Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Add VOP_LINK to the VFS interface in preparation for sys_link(). Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> [ penberg: split to separate commit ] Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Use ->rn_namelen as the destination buffer size for strlcpy(). Spotted by Coverity. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
The ramfs_remove_node() will free vp->v_data so we cannot look it up in ramfs_remove(). Spotted by Coverity. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Sep 25, 2013
-
-
Nadav Har'El authored
signal() verified that its argument is not >nsigs, but it should be >=nsigs because nsigs itself is already illegal (0...nsigs-1 are valid signals). Discovered by Coverity. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
GCC implements static destructors in shared-objects (DSO) by registering a single finalization function, __cxa_finalize(), to run when the DSO is unloaded, and each constructor calls __cxa_atexit() to register a destructor which __cxa_finalize() should call. This patch implements the missing __cxa_finalize() and __cxa_atexit() functions. The do-nothing stubs we had never registered, and never ran, destructors. The implementation in this patch is amazingly simple to write in C++11 :-) Before this fix, we had a crash when running tst-tracepoint.so twice: The first run ran the tracepoints' constructors, which added to the global linked list of tracepoints pointers into the mapped DSO. When the DSO was later unmapped but destructors not run, the linked list of tracepoints was left with pointers to unmapped memory. When we ran the test again, and it wanted to construct more tracepoints, it accessed the broken linked list and crashed. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
ELF allows specifying initializers - functions to be run after loading a a shared object, in DT_INIT_ARRAY, and also finalizers - functions to be run before unloading a shared objects, in DT_FINI_ARRAY. The existing code ran the initializers, but forgot to run the finalizers, and this patch fixes this oversight. This fix is necessary for destructors of static objects defined in the shared object. But this fix is not sufficient for C++ destructors - see also the next patch. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
Add to libc/user.cc stub setresgid(), setresgid(), which as usual in OSv only allow user and group 0. These functions are used by Rogue ;-) Also move getuid() and friends from runtime.cc to libc/user.cc, where they feel more at home. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
The "cscope" make target piped a list of files into "cscope -bq", but this command doesn't read its input. The command should be "cscope -bq -i-" which reads the list of files from stdin. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Dmitry Fleytman authored
Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com>
-
- Sep 24, 2013
-
-
Nadav Har'El authored
Coverity thinks we have a use-before-assigned of r2 here, despite the join(), so let's just move the test inside the thread to make this warning go away. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-