- Jul 18, 2013
-
-
Dor Laor authored
-
Nadav Har'El authored
This patch adds to tst-condvar two benchmark for measuring condvar::wake_all() on a condvar that nobody is waiting on. The first benchmark does these wakes from a single thread, measuring 26ns before commit 3509b19b, and only 3ns after it. The second benchmark does wake_all() loops from two threads on two different CPUs. Before the aforementioned commit, this frequently involved a contented mutex and context switches, with as much as 30,000 ns delay. After that commit, this benchmark measures 3ns, the same as the single-threaded benchmark.
-
Nadav Har'El authored
Previously, condvar_wake_one()/all() took the condvar's internal lock before testing if anyone is waiting; A condvar_wake when nobody was waiting was mutex_lock()+mutex_unlock() time (on my machine, 26 ns) when there is no contention, but much much higher (involving a context switch) when several CPUs are trying condvar_wake concurrently. In this patch, we first test if the queue head is null before acquiring the lock, and only acquire the lock if it isn't. Now the condvar_wake-on-an-empty-queue micro-benchmark (see next patch) takes less than 3ns - regardless of how many CPUs are doing it concurrently. Note that the queue head we test is NOT atomic, and we do not use any memory fences. If we read the queue head and see there 0, it is safe to decide nobody is waiting and do nothing. But if we read the queue head and see != 0, we can't do anything with the value we read - it might be only half-set (if the pointer is not atomic on this architecture) or be set but the value it points to is not (we didn't use a memory fence to enforce any ordering). So if we see the head is != 0, we need to acquire the lock (which also imposes the required memory visibility and ordering) and try again.
-
- Jul 17, 2013
-
-
Dor Laor authored
No code change.
-
Dor Laor authored
Instead of cancelling block requests due to no space on the ring that lead to corruption of the upper layer, block until there is space.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
This operation is very different from FreeBSD and Solaris because our VFS uses create just for the actual entry creation and not for opening the file, similar to how Linux splits the operation. A lot of code that is already handled in vnop_open or the VFS thus can go away.
-
Christoph Hellwig authored
This is required for write operations. For now we don't actually replay it yet, as that requires a lot more hairy OS-specific code.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
This one will only show up in non-debug builds for some reason.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
- Jul 15, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
Mention all package that need to be installed on a bare bones Fedora system, make sure service zfs-fuse start is done using sudo.
-
- Jul 12, 2013
-
-
Christoph Hellwig authored
Now that we have a reliable number of CPUs indicator the implementation is trivial.
-
- Jul 11, 2013
-
-
Avi Kivity authored
Fix various issues with the debug allocator.
-
Avi Kivity authored
map_file() takes the vm lock, then calls read() to pre-fault the data. However read() may cause allocations, which then require the vm lock as well. Fix by faulting in the data after dropping the lock.
-
Avi Kivity authored
The standard allocator returns page-aligned addresses for large allocations. Some osv code incorrectly relies on this. While we should fix the incorrect code, for now, adjust the debug allocator to return aligned addresses. The debug allocator now uses the following layout: [header page][guard page][user data][pattern tail][guard page]
-
Avi Kivity authored
Required by the virtio spec.
-
Avi Kivity authored
Virtio and other hardware needs physically contiguous memory, beyond one page. It also requires page-aligned memory. Add an explicit API for contiguous and aligned memory allocation. While our default allocator returns physically contiguous memory, the debug allocator does not, causing virtio devices to fail.
-
Avi Kivity authored
-