qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 11/13] cpu-exec-common: Introduce async_safe_


From: Alex Bennée
Subject: Re: [Qemu-devel] [PATCH v5 11/13] cpu-exec-common: Introduce async_safe_run_on_cpu()
Date: Wed, 31 Aug 2016 11:09:45 +0100
User-agent: mu4e 0.9.17; emacs 25.1.10

Paolo Bonzini <address@hidden> writes:

>> The problem with CPUs coming up late is indeed present in this patch,
>> I'll review your patch on the flight. :)
>>
>> synchronize_rcu() is actually relatively cheap with URCU, so I guess
>> that's fine.  An alternative to that could be a pthread_barrier_t, but
>> it can be added later.
>>
>> Another way to fix the issue with a variable number of waiters could be
>> to wrap safe work with rcu_read_lock and rcu_read_unlock, and put a
>> synchronize_rcu() at the beginning of the CPU thread function.  But it
>> can be done later too.
>>
>> Your patch from a year ago, right now, seems to be the best to me.  I'd
>> like to make it use regular work items instead of the special
>> cpu->tcg_work_func, but that's pretty much it.
>
> Ok, I think I have something.  It only uses condition variables when
> there is a safe work in flight, to enter and leave the function at the
> right time.  It also makes linux-user's start_exclusive/end_exclusive
> use the same synchronization logic.  I'll test it and post; most
> preliminary patches are straight from this series.

Good stuff, I look forward to seeing the patches. I'll see if I can come
up with some better stress tests for linux-user in the meantime.

>
> Paolo


--
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]