Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-13 Thread Avi Kivity
On 08/12/2011 06:24 AM, Anthony Liguori wrote: On 08/08/2011 06:37 AM, Avi Kivity wrote: +static void spawn_thread_bh_fn(void *opaque) +{ +mutex_lock(&lock); +do_spawn_thread(); +mutex_unlock(&lock); +} The locking here is odd. Why not call do_spawn_thread() without the lock, an

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-12 Thread Anthony Liguori
On 08/08/2011 06:37 AM, Avi Kivity wrote: In certain circumstances, posix-aio-compat can incur a lot of latency: - threads are created by vcpu threads, so if vcpu affinity is set, aio threads inherit vcpu affinity. This can cause many aio threads to compete for one cpu. - we can crea

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Avi Kivity
On 08/08/2011 04:21 PM, Frediano Ziglio wrote: > > The entire qemu process may be affined to a subset of the host cpus; we > don't want to break that. > > For example: > > taskset 0xf0 qemu > (qemu) info cpus > > > Just call sched_getaffinity at program start, save to a global

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Frediano Ziglio
2011/8/8 Avi Kivity : > On 08/08/2011 03:49 PM, Frediano Ziglio wrote: >> >> 2011/8/8 Avi Kivity: >> >  In certain circumstances, posix-aio-compat can incur a lot of latency: >> >    - threads are created by vcpu threads, so if vcpu affinity is set, >> >     aio threads inherit vcpu affinity.  This

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Avi Kivity
On 08/08/2011 03:49 PM, Frediano Ziglio wrote: 2011/8/8 Avi Kivity: > In certain circumstances, posix-aio-compat can incur a lot of latency: >- threads are created by vcpu threads, so if vcpu affinity is set, > aio threads inherit vcpu affinity. This can cause many aio threads > to

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Frediano Ziglio
2011/8/8 Avi Kivity : > In certain circumstances, posix-aio-compat can incur a lot of latency: >  - threads are created by vcpu threads, so if vcpu affinity is set, >   aio threads inherit vcpu affinity.  This can cause many aio threads >   to compete for one cpu. >  - we can create up to max_threa

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Avi Kivity
On 08/08/2011 03:34 PM, Anthony Liguori wrote: On 08/08/2011 06:37 AM, Avi Kivity wrote: In certain circumstances, posix-aio-compat can incur a lot of latency: - threads are created by vcpu threads, so if vcpu affinity is set, aio threads inherit vcpu affinity. This can cause many aio thr

Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Anthony Liguori
On 08/08/2011 06:37 AM, Avi Kivity wrote: In certain circumstances, posix-aio-compat can incur a lot of latency: - threads are created by vcpu threads, so if vcpu affinity is set, aio threads inherit vcpu affinity. This can cause many aio threads to compete for one cpu. - we can crea

[Qemu-devel] [PATCH] posix-aio-compat: fix latency issues

2011-08-08 Thread Avi Kivity
In certain circumstances, posix-aio-compat can incur a lot of latency: - threads are created by vcpu threads, so if vcpu affinity is set, aio threads inherit vcpu affinity. This can cause many aio threads to compete for one cpu. - we can create up to max_threads (64) aio threads in one go;