- Jan 02, 2014
-
-
Tomasz Grabiec authored
Currently we just call poweroff() which does not umount file systems which leads to data loss on next boot. This happens for example if you start the CLI and type exit. On next boot you will get: TX_CREATE TX_CREATE Solaris: WARNING: ZFS replay transaction error 95, dataset osv/zfs, seq 0x1, txtype 2 Reported-by:
Pekka Enberg <penberg@cloudius-systems.com> Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
In order to reuse the logic it needs to be extracted. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
When compiling with -O3 gcc detects that 'th' may be uninitialized. This is true, it happens when prio_find_thread is given which == PRIO_USER or which == PRIO_PGRP. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Amnon Heiman authored
MultiJarLoader reads the command line parameters from a file and uses split to make a list of params out of them before calling parseArgs. Currently the regular expression is \\s which means that consecutive space will be split it to an empty string. It should be \\s+ so consecutive spaces will be ignored. Found by code inspection. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Amnon Heiman <amnon@cloudius-systems.com>
-
- Jan 01, 2014
-
-
Nadav Har'El authored
Instead of the old C-style file-operation function types and fo_*() functions, since recently we have methods of the "file" class. All our filesystem code is now C++, and can use these methods directly. So this patch drops the old types and functions, and uses the class methods instead. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
The code has bitrotted, and it doesn't support wait morphing. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Instead of free standing functions, use member functions, which are easier to work with. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Prevent memset() overwriting an initialized mutex. Instead initialize members individually. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
the _ prefix helps to distinguish between members and non-members; helps with the next patch. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Make the code more maintainable by removing the #ifdefs; it doesn't make sense to disable wait morphing. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Drop the socket uma zone and replace it with calls to new and delete. This allows the constructor and destructor to be called, so we can add C++ objects to the socket structure. Take care to use the default-initializing form of the constructor since the socket code requires zero initialization. We lose the ability to limit the socket count, so we'll have to re-add it in the future if we want it. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Nadav Har'El authored
Each implementation of "struct file" needs to implement 8 different file operations. Most special file implementations, such as pipe, socketpair, epoll and timerfd, don't support many of these operations. We had in unsupported.h functions that can be reused for the unsupported operation, but this resulted in a lot of ugly boiler-plate code. Instead, this patch switches to a cleaner, more C++-like, method: It defines a new "file" subclass, called "special_file", which implements all file operations except close(), with a default implementation identical to the old unsupported.h implementations. The files of pipe(), socketpair(), timerfd() and epoll_create() now inherit from special_file, and only override the file operations they really want to implement. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Dec 31, 2013
-
-
Gleb Natapov authored
Right now most of mmap related functions have the same bug related to vma locking: they validate mapping under vma lock then release the lock and do actual vma operation, but since between validation and operation the mapping can go away it is incorrect. This patch fixes this by doing validation and operation under the same lock. Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Gleb Natapov authored
Currently offset calculation is incorrect. Fix it by tracking base address of a region and calculating an offset by subtracting base address from current mapping address. Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Gleb Natapov authored
map_range() is a entry point into a page mapper, so make it impossible to instantiate map_level class directly by making all of its function and constructor private and declaring map_range() as a friend. Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Gleb Natapov authored
One for initial call, another for recursion. This gets rid of default parameters, the need for std::integral_constant and makes code much more readable. Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Pekka Enberg authored
Bring back haproxy.py that I deleted by accident in commit 3e48ad65 ("modules: support "include"ing a module list"). Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Instead of listing modules from the apps/ repository in OSv's config.json, this patch adds support for an "include" specification in config.json, which we use to include apps/modules.json. This allows adding modules to the apps/ repository without needing to patch also the main OSv repository. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Example output looks as follows: (gdb) osv zfs :: ZFS TUNABLES :: zil_replay_disable=0 zfs_nocacheflush=0 zfs_prefetch_disable=0 :: ARC SIZES :: Actual ARC Size: 16742872 Target size of ARC: 16777216 Min Target size of ARC: 16777216 Max Target size of ARC: 16777216 Most Recently Used (MRU) size: 1222656 (7.29%) Most Frequently Used (MFU) size: 15554560 (92.71%) :: ARC EFFICIENCY :: Total ARC accesses: 47477 ARC hits: 44668 (94.08%) ARC MRU hits: 18737 (41.95%) Ghost Hits: 183 ARC MFU hits: 25733 (57.61%) Ghost Hits: 1084 ARC misses: 2809 (5.92%) Total Hash elements: 341 Max Hash elements: 449 Hash collisions: 98 Hash chains: 13 Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Useful for tracing virtio queue utilization issues. To get plottable data: 1. Save traces to gdb.txt 2. grep virtio_add_buf gdb.txt | grep "queue=0" \ | awk '{print $3 " " $6}' | sed -r 's/avail=(.*)/\1/' Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Clean up virtio-vring.hh and move add_buf_wait() out of line. Benefits: - Plays well with tracepoints - Less recompilation when code is changed Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Most likely introduced in eb48b150 Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Asias He authored
See apps/haproxy/README for howto run haproxy. Signed-off-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 30, 2013
-
-
Tomasz Grabiec authored
This was the cause of poor ZFS performance in misc-fs-stress test. Before: Wrote 168.129 MB in 10.12 s = 16.610 Mb/s Wrote 194.688 MB in 10.00 s = 19.469 Mb/s Wrote 183.004 MB in 10.06 s = 18.186 Mb/s Wrote 167.754 MB in 10.28 s = 16.315 Mb/s After: Wrote 636.227 MB in 10.00 s = 63.623 Mb/s Wrote 666.979 MB in 10.00 s = 66.696 Mb/s Wrote 613.512 MB in 10.00 s = 61.350 Mb/s Wrote 573.502 MB in 10.00 s = 57.346 Mb/s Wrote 668.607 MB in 10.00 s = 66.857 Mb/s Wrote 630.920 MB in 10.00 s = 63.087 Mb/s It turned out that the limiting factor was the ARC cache. A check inside arc_tempreserve_space() was forcing txg to be synced too often (once every 400ms). The arc_c variable was only 16M (arc_c_min) which allowed to write only 8M per transaction. It turns out that arc_c depends on kmem_size() which is based on physmem which was never initialized. I would hold with commiting this yet because of several reasons, which I want to put under your consideration. While this improves write throughput it makes the boot time after make much longer, on my disk the boot time is increased from 1.5s to 10s. This is because zfs verifies the last 3 txgs upon mount. This patch increases txg size, which results in more data to check in the next boot. I'm working on solving this right now. Something worth noting is that while larger transactions sync less often incresing throughput they also sync longer increasing worst case latency. In my test the pauses get as high as 3 seconds with 1G of guest memory. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
The current initialization is to something like 5 bit words, which truncates everything to control characters on VMware. QEMU somehow ignores the word size. Fix to initialize the serial port to 8N1, yielding useful output. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Gleb Natapov authored
Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
mprotect(PROT_WRITE) on a file opened as read only should fail, but current mprotect() implementation is missing the check. The patch implements it. Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Gleb Natapov authored
If mmap size is greater than large page it's better to align it to a large page size since this will ensure optimal coverage of the region by large pages. Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Or Cohen authored
getgrgid_r(3) is needed when querying file attributes from Java (see java.nio.file.Files.readAttributes()). This is needed for long format (-l) flag of ls. getgrgid_r also requires sysconf(_SC_GETGR_R_SIZE_MAX) Signed-off-by:
Or Cohen <orc@fewbytes.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Fail build immediately if compiler does not support x86-64. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
OSv can only be built on a 64-bit Linux distribution - otherwise the compiler will not (by default, at least) generate 64-bit code, and we won't be able to run the 64-guest needed for building the ZFS filesystem. Make this requirement explicit in README.md. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
While (unfortunately) C++ doesn't support designated initializers, and the compiler rejects them, one instance has survived in xenbus. Strangely, gcc 4.8.2 generates correct code, while gcc 4.8.0 fails with an internal compiler error, instead of both of them rejecting the code. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Without this, only even megabytes are accessible, and accesses to odd megabytes hit the even megabytes. For example address 0x312345 is aliased to address 0x212345. Enable the A20 gate to prevent this. Fixes boot on VMware. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 27, 2013
-
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Now that total is long casting to float may cause precision loss. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
As pointed out by Tomek, the call to printStackTrace() will already print out the exception message. Drop the "uncaught exception" messages to simplify things. Acked-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Asias He authored
This is useful to notify us that something goes wrong. Reviewed-by:
Tomasz Grabiec <tgrabiec@gmail.com> Signed-off-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Asias He authored
bytes_written can overflow while testing on a fast device. Reviewed-by:
Tomasz Grabiec <tgrabiec@gmail.com> Signed-off-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Start using tprintf as in drivers/pci.cc, for example, and switch to 'error' severity to disable early boot ACPI messages. Eventually, core/debug.cc needs to be more dynamically configured but for now it's good enough to use a standardized API and make the output silent by default. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Amnon Heiman authored
The uncaught exception handler did not state what the exception is. Signed-off-by:
Amnon Heiman <amnon@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-