- May 30, 2014
-
-
Glauber Costa authored
We had an implementation of getmntent, but its signature was wrong to begin with. I doubt it was ever working, since it is not such a common function. But even then, we lacked other functions in this family, like setmntent. This patch implements them all. The main matching code comes from musl, but the end result is significantly different. In particular, I didn't really want to mess with creating new virtual proc files, symlinks and the such. Instead, trying to opening a dynamic file (like /proc/mounts) or any of its famous aliases will return a special value. Functions like getmntent will be able to parse that value and act accordingly. The code to show dynamic mounts comes from our old getmntent() implementation, but it is here modified to not use statics for the strings so we can implement getmntent_r() correctly. Fixes #326 Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> CC: Lyor Goldstein <lgoldstein@vmware.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Glauber Costa authored
Code comes from musl, but is moved to libc.cc to be together with the other functions already present there. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Vlad Zolotarov authored
Signed-off-by:
Vlad Zolotarov <vladz@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
1) zfs_fallocate is ported from ZFS on Linux along with convoff. zfs_fallocate being limited to FALLOC_FL_PUNCH_HOLE alone, though not useful as fallocate require FALLOC_FL_PUNCH_HOLE to be ORed with FALLOC_FL_KEEP_SIZE. 2) (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) semantics is implemented in zfs_fallocate. Relevant changes were introduced into zfs_space. 3) From my conversation with ZFS folks, I realized that FALLOC_FL_KEEP_SIZE alone could be implemented, but it will probably take a long time, and wouldn't give us the proportional value. Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
It turns out that vnode->vn_size will not be always synchronized with the file system underlying the vnode, and vn_stat will always provide its caller with the file size known by the vfs layer. The latter is changed to get from the fs instead. Found the bug while using stat on a file (in zfs) after its was either truncated or extended. We probably should change zfs later to update vnode->vn_size whenever the respective znode->z_size is updated. Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
This patch adds fallocate as a vnode operation, implements the fallocate function and the system call. Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Dmitry Fleytman authored
--modules-list parameter introduced Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Dmitry Fleytman authored
It turned out that set of availability zones in each region may be different for different accounts so one should not hard code availability zone name but choose it dynamically instead. Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
$ capstan run Created instance: memory-hog OSv v0.08 I'm a memory hog! Failed looking up symbol osv_register_shrinker Reported-by:
Don Marti <dmarti@cloudius-systems.com> Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Closes #324 Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- May 29, 2014
-
-
Tomasz Grabiec authored
Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Tomasz Grabiec authored
OpenJDK's SocketInputStream.read() is calling poll() to support timeout. The call site looks like this: pfd.fd = s; pfd.events = POLLIN | POLLERR; poll(&pfd, 1, timeout); Our current implementation of poll() is quite complex because it needs to handle polling on many files. It also allocates memory in several places: - in poll() due to std::vector - in poll_install() - in net_channel::add_poller - in net_channel::del_poller poll() on one socket can be greatly simplified and we can avoid memory allocation completely. This change adds special casing for that. It reduces allocation rate in half in tomcat benchmark with 256 connections. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Nadav Har'El authored
Before commit 202b2ccc, the scheduler was responsible for saving the FPU state, so we needed to know whether the scheduler itself uses it or not. Now that the FPU state is always saved at interrupt time, we no longer care whether or not the scheduler uses the FPU, so we can drop this flag. Also drop the optional "pseudo-float" (integer-based floating point operations) support from the scheduler. This never had any real advantage over the actual floating point, and now that we save the FPU state unconditionally, it makes even less sense to avoid floating point. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Nadav Har'El authored
Before commit 202b2ccc, cpu::reschedule_from_interrupt() needed to know whether we were called from an interrupt (preempt=true) or as an ordinary function (preempt=false), to know whether or not to save the FPU state. As we now save the FPU state at the interrupt code, reschedule_from_interrupt() no longer needs to deal with this, and so this patch removes the unneeded paramter "preempt" to that function. One thing we are losing in this patch is the "sched_preempt" tracepoint, which we previously had when an interrupt caused an actual context switch (not just a reschedule call, but actually switching to a different thread). We still have the "sched_switch" tracepoint which traces all the context switches, which is probably more interesting anyway. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Gleb Natapov authored
Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Li Yu authored
bsd/sys/net/if_ethersubr.cc has an assert to check if incoming frame is a VLAN frame, if so kernel will abort there, just dropping it may be a bettter choice. Signed-off-by:
Li Yu <raise.sail@gmail.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- May 28, 2014
-
-
Pekka Enberg authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
The "user.home" JVM system property, for example, uses getpwuid() so make sure it's returning proper values. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Move getpwuid() and getpwuid_r() to libc/user.cc where OSv user is defined. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Waitqueues fullfil the same role as condition variables, but are much lighter since they rely on an external mutex, which is already provided by rwlock. Replacing condvars by waitqueues significantly reduces the size of an rwlock, and in addition reduces the number of atomic operations in contended cases significantly. Reviewed-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Gleb Natapov authored
Fix madvice(MADV_DONTNEED) to use correct page ops for a VMA. Don't try to use what we have today on mmaped files. Signed-off-by:
Gleb Natapov <gleb@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
This separates Capstan and VM image building into two scripts. This is needed to be able to drop useless VM images like "osv-base" or "osv-openjdk" that only make sense as Capstan base images, not standalone VM images that people boot to. Cc: Tzach Livyatan <tzach@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pawel Dziepak authored
Signed-off-by:
Pawel Dziepak <pdziepak@quarnos.org> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pawel Dziepak authored
Reviewed-by:
Tomasz Grabiec <tgrabiec@gmail.com> Signed-off-by:
Pawel Dziepak <pdziepak@quarnos.org> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pawel Dziepak authored
Reviewed-by:
Tomasz Grabiec <tgrabiec@gmail.com> Signed-off-by:
Pawel Dziepak <pdziepak@quarnos.org> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pawel Dziepak authored
Reviewed-by:
Tomasz Grabiec <tgrabiec@gmail.com> Signed-off-by:
Pawel Dziepak <pdziepak@quarnos.org> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pawel Dziepak authored
Signed-off-by:
Pawel Dziepak <pdziepak@quarnos.org> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pawel Dziepak authored
Reviewed-by:
Tomasz Grabiec <tgrabiec@gmail.com> Signed-off-by:
Pawel Dziepak <pdziepak@quarnos.org> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Asias He authored
This is needed to run iperf3. https://github.com/cloudius-systems/osv/issues/305 Signed-off-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Dmitry Fleytman authored
Avoid using X.509 keypair because it became deprecated and not generally available to person doing release. Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
This reverts commit f9311884. The fpu vulnerabilities have been fixed (202b2ccc, d9addd0b), so fpu-based memcpy should work now. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Vlad Zolotarov authored
Signed-off-by:
Vlad Zolotarov <vladz@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Dmitry Fleytman authored
getpeername() is required by iperf in client mode without it iperf crashes as following: [/]% run /tools/iperf.so -c 10.0.0.144 Failed looking up symbol getpeername [backtrace] 0x00000000003326a2 <elf::object::resolve_pltgot(unsigned int)+82> 0x0000000000369b42 <__elf_resolve_pltgot+46> 0x0000100004207535 <Client::Client(thread_Settings*)+301> 0x0000100004208b44 <client_spawn+50> 0x000010000421323a <thread_stop+272> 0x0000000000412ca5 <sync+69> 0x00000000003b2eea <thread_main_c+26> 0x000000000036ae95 <thread_main+7> Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Vlad Zolotarov authored
try_xmit_one_locked(net_req*) doesn't return EINVAL anymore. The appropriate code has moved to xmit_prep(). Signed-off-by:
Vlad Zolotarov <vladz@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Implement facades for rwlock so it can be used with WITH_LOCK, specifying whether we want a read lock or a write lock: rwlock my_rwlock; WITH_LOCK(my_rwlock.for_read()) { read stuff } WITH_LOCK(my_rwlock.for_write()) { write stuff } Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
elf_resolve_pltgot() can be called from anywhere, including with dirty fpu state. Ensure the fpu is not clobbered during its execution. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Since we cannot guarantee that the fpu will not be used in interrupts and exceptions, we must save it earlier rather than later. This was discovered with an fpu-based memcpy, but can be triggered in other ways. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Tomasz Grabiec authored
The summary will only include samples within the specified range. Timed samples will be trimmed to the given time range. Requested-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-