[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 05/38] thread-posix: inline qemu_spin functions
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC 05/38] thread-posix: inline qemu_spin functions |
Date: |
Tue, 25 Aug 2015 18:53:43 -0400 (EDT) |
> > I just tested a fetch-and-swap+exp.backoff spinlock with usermode on a
> > program that spawns N threads and each thread performs an 2**M atomic
> > increments
> > on the same variable. That is, a degenerate worst-case kind of contention.
> > N varies from 1 to 64, and M=15 on all runs, 5 runs per experiment:
> >
> > http://imgur.com/XpYctyT
> > With backoff, the per-access latency grows roughly linearly with the
> > number of
> > cores, i.e. this is scalable. The other two are clearly superlinear.
>
> Just tried MCS, CLH and ticket spinlocks (with and without backoff).
> They take essentially forever for this (admittedly worst-case) test;
[snip interesting stuff]
Yeah, fair spinlocks in userspace wasn't a smart suggestion. :)
Paolo
- [Qemu-devel] [RFC 02/38] hw/i386/kvmvapic: add missing include of tcg.h, (continued)
- [Qemu-devel] [RFC 02/38] hw/i386/kvmvapic: add missing include of tcg.h, Emilio G. Cota, 2015/08/23
- [Qemu-devel] [RFC 01/38] cpu-exec: add missing mmap_lock in tb_find_slow, Emilio G. Cota, 2015/08/23
- [Qemu-devel] [RFC 10/38] translate-all: remove obsolete comment about l1_map, Emilio G. Cota, 2015/08/23
- [Qemu-devel] [RFC 18/38] tcg: add fences, Emilio G. Cota, 2015/08/23
- [Qemu-devel] [RFC 12/38] linux-user: call rcu_(un)register_thread on pthread_(exit|create), Emilio G. Cota, 2015/08/23
- [Qemu-devel] [RFC 05/38] thread-posix: inline qemu_spin functions, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 11/38] qemu-thread: handle spurious futex_wait wakeups, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 13/38] cputlb: add physical address to CPUTLBEntry, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 14/38] softmmu: add helpers to get ld/st physical addresses, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 17/38] aie: add target helpers, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 15/38] radix-tree: add generic lockless radix tree module, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 16/38] aie: add module for Atomic Instruction Emulation, Emilio G. Cota, 2015/08/23
[Qemu-devel] [RFC 20/38] tcg/i386: implement fences, Emilio G. Cota, 2015/08/23