- Jan 27, 2014
-
-
Nadav Har'El authored
Several source files include <drivers/clockevent.hh>, though this is a very low-level feature which they don't actually use. sched.cc does use <drivers/clockevent.hh>, but already gets it through sched.hh, so also doesn't need to include it explicitly. This patch removes the unnecessary includes. Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Jan 24, 2014
-
-
Glauber Costa authored
As we have recently discovered, some parallel GCs will move an object to two different locations at times, and later on decide on which one to use. This breaks our implementation if the final object is the second one to be copied, because by then the original region is already mapped - so we won't fault, and the unmapped region will not be the actual balloon, so we will have a bogus fault The core of this solution is to keep all the regions unmapped. Because they had only garbage before, we know Java shouldn't read anything from it before it writes something new. And when it does that, we declare that to be no longer a balloon. Movement is then split in two phases: the normal phase, and the finish phase. In the finish phase we will remove the old VMA and create the new VMA again, with heap characteristics. Special care needs to be taken when "conciliating" the array: because we use the difference between first faulting address and original array address to calculate how many bytes we are skipping, we need to store that information somewhere. We're using an unordered_map (hash) for that. We'll keep track of all in-flight ballooned regions and hold the original address of the array. When we detect movement *from* that region, we know it is the new location and update the balloon object with the new address. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Glauber Costa authored
To avoid using hard code values for the original anonymous vma that mapped the region before we ballooned, let's store the original flags in the JVM vma. This patch does not yet use it, but only lays down the infrastructure. User will come in the next patch. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Glauber Costa authored
Up until now the JVM balloon explicitly forbade writes to its range, because we didn't expect the JVM to ever write to it. But with the recently problem Gleb discovered of double-copying of objects inside the Heap, we will use writes to figure out when that object is no longer a balloon. But still, we need to be able to go back to the JVM specific fault handler for that. Therefore, we need write permissions in the VMA itself. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> [ penberg: use perm_rw as suggested by gleb ] Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Jan 23, 2014
-
-
Claudio Fontana authored
calling debug() and then abort() buffers a message that never has a chance to reach the console early on; pass the message to display directly to abort() instead. Signed-off-by:
Claudio Fontana <claudio.fontana@huawei.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Zhi Yong Wu authored
CC bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.o CXX core/mmu.o /home/zwu/osv/core/mmu.cc: In instantiation of ‘void mmu::map_level<PageOp, ParentLevel>::operator()(mmu::hw_ptep, uintptr_t, uintptr_t) [with PageOp = mmu::virt_to_phys_map; int ParentLevel = 4; uintptr_t = long unsigned int]’: /home/zwu/osv/core/mmu.cc:323:5: required from ‘void mmu::map_range(uintptr_t, size_t, PageOp&, size_t) [with PageOp = mmu::virt_to_phys_map; uintptr_t = long unsigned int; size_t = long unsigned int]’ /home/zwu/osv/core/mmu.cc:623:43: required from here /home/zwu/osv/core/mmu.cc:383:13: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] ... Signed-off-by:
Zhi Yong Wu <zwu.kernel@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Jan 22, 2014
-
-
Gleb Natapov authored
Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
Our loader's command line (what is given to the "-e" option of run.py) already allows running multiple commands (each a shared object with arguments) separated with a semicolon - e.g., run.py -e "program1.so; program2.so; program3.so" This patch allows, just like in Unix, to use a "&" instead of a ";", in which case the preceding program is run in the background, in our case this means in a new thread. For example, run.py -e "httpserver.so& java.so ..." As before a command line can constitute multiple commands, and whitespaces around the separators (; or &) are optional. Take care if you intend to run the *same* object multiple times concurrently, e.g., "something.so& something.so". For an object to support this use case, it should support its main() being called in parallel, and in particular avoid using global variables. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
Issue #178, and recent netperf 3 experiments by Vlad, suggests we have a bug in our timer code which very rarely causes crashes on timer_list::fired(). It appears we somehow corrupt our per-cpu timer list, or some armed timer object - but I still haven't been able to figure out where. This patch adds an assertion that the timer we find on the list is actually armed. Unfortunately, it consistantly fails (I can see the same assertion failure once every 100-200 runs of tst-queue-mpsc.so), and this failure seems to replace the page-fault crash of issue #178. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Move definitions from <debug.h> to <osv/debug.h> and update includes to use the latter. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Jan 21, 2014
-
-
Dmitry Fleytman authored
It is a bad practice to have DHCP discovery without timeout and retries. In case discovery packet gets lost boot stucks. Beside this there is an interesting phenomena on some systems. A few first DHCP discovery packets sent on boot get lost in some cases. This started to happen from time to time on my KVM system and almost every time on my Xen system after installing recent Fedora Core updates. Packet leaves VM's interface but never arrives to bridge interface. The packet itself built properly and arrives to DHCP server just fine after a few retransmissions. Most probably this phenomena is a bug (or limitation) in the current Linux bridge version so this patch is actually a work-around, but since in general case it is a good idea to have DHCP timeouts/retries it worth to have it anyway. Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Jan 20, 2014
-
-
Avi Kivity authored
A waitqueue is an object on which multiple threads can wait; other threads can wake up either one or all waiting threads. A waitqueue is associated with an external mutex which the user must supply for both wait and wake operations. Waitqueues differ from condition variables in three respects: - waitqueues do not contain an internal mutex. This makes them smaller, and reduces lock acquisitions. On the other hand the waker must hold the associated mutex, whereas this is not required with condition variables. - waitqueues support sched::thread::wait_for() waitqueues support wait morphing and do not cause excess lock contention, even with wake_all(). Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
This adds a facility to wake a thread, but with the intention that it will acquire a certain lock after waking, and while the waker holds the lock. This is implemented using the regular wait morphing code (send_lock() and receive_lock()), but with additional mutual exclusion to allow regular wake()s in parallel. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Vlad Zolotarov authored
Remove the extra check on size just like the remark above implies. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Vlad Zolotarov <vladz@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Jan 19, 2014
-
-
Takuya ASADA authored
Fix object::lookup_addr to lookup correct symbol. It should returns the nearest symbol which is s_addr < addr, but it compares opposite way. Signed-off-by:
Takuya ASADA <syuu@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Jan 17, 2014
-
-
Dmitry Fleytman authored
This patch introduces support for MTU option as described in RFC2132, chapter 5.1. Interface MTU Option Amazon EC2 networking uses this option in some cases and it gives throughput improvement of about 250% on big instances with 10G networking. Netperf results for hi1.4xlarge instances, TCP_MAERTS test, OSv runs netserver: Send buffer size Throughput w/ patch (Mbps) Throughput w/o patch (Mbps) Improvement (%) 32 4912.29 1386.28 254 64 4832.01 1385.99 249 128 4835.09 1401.46 245 256 4746.41 1382.28 243 512 4849.04 1375.23 253 1024 4631.8 1356.69 241 2048 4859.59 1371.92 254 4096 4864.99 1383.67 252 8192 4627.07 1364.05 239 16384 4868.73 1366.48 256 32768 4822.69 1366.63 253 65536 4837.67 1353.87 257 Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Add procfs_maps() function to core/mmu.cc that returns all the VMAs formatted for Linux compatible "/proc/<pid>/maps" file. This will be called by the procfs filesystem. Limitations: * Shared mappings are not identified as such. * File-backed mmap offset, device, inode, and pathname are not reported. * Special region names such as [heap] and [stack] are not reported. Reviewed-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Jan 16, 2014
-
-
Glauber Costa authored
This code should not be here. I am 100 % positive that I removed it in my testings, but I must have forgotten to git add the remove before I sent out the patch and it ended up in tree. This is simply a test leftover, it will have the effect of having threads to loop forever and never waiting because the initial value won't be 0. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Jan 15, 2014
-
-
Eduardo Piva authored
Create a circular buffer that stored all debug messages accordingly. If the debug buffer is full, reuse it. A method called flush_debug_buffer is added to enable printing all messages to console if verbose mode is configured. The global variable debug_buffer_full is used to track if, when flushing debug buffer to console, we need to flush both buffer sides. If verbose boolean variable is set, all messages are printed to the console after beeing stored in the buffer. The size of the buffer is 50Kb, defined in debug.hh. A function debugf that received a variable list of arguments is defined so we can change some printf from boot sequence to debugf call. A different name is used to prevent C overload. Signed-off-by:
Eduardo Piva <efpiva@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Jan 13, 2014
-
-
Glauber Costa authored
ZFS will perform some checks to determine if the current calling "process" is the reclaimer. Export the address of the reclaimer thread so that test can work. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Dmitry Fleytman authored
Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Amnon Heiman authored
The uname() function returns a fake Linux version number for application compatibility. Add a new osv::version() API that returns OSv version that can be used by the management code. Signed-off-by:
Amnon Heiman <amnon@cloudius-systems.com> [ penberg: cleanups ] Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Useful for calculating time during which thread was scheduled out because of wait(). Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-