From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFHNM-0002Hc-Iy for qemu-devel@nongnu.org; Wed, 15 Jul 2015 03:45:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFHNH-0005wi-Gn for qemu-devel@nongnu.org; Wed, 15 Jul 2015 03:45:08 -0400 Received: from greensocs.com ([193.104.36.180]:52647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFHNH-0005sv-5n for qemu-devel@nongnu.org; Wed, 15 Jul 2015 03:45:03 -0400 Message-ID: <55A60F78.6090101@greensocs.com> Date: Wed, 15 Jul 2015 09:44:56 +0200 From: Frederic Konrad MIME-Version: 1.0 References: <1436544486-31169-1-git-send-email-fred.konrad@greensocs.com> <55A3A6CB.2040104@redhat.com> In-Reply-To: <55A3A6CB.2040104@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH V2 0/3] Multithread TCG async_safe_work part. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org, mttcg@greensocs.com Cc: alex.bennee@linaro.org, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, guillaume.delbergue@greensocs.com On 13/07/2015 13:53, Paolo Bonzini wrote: > > On 10/07/2015 18:08, fred.konrad@greensocs.com wrote: >> From: KONRAD Frederic >> >> This is the async_safe_work introduction bit of the Multithread TCG work. >> Rebased on current upstream (6169b60285fe1ff730d840a49527e721bfb30899). >> >> It can be cloned here: >> http://git.greensocs.com/fkonrad/mttcg.git branch async_work_v2 >> >> The first patch introduces a mutex to protect the existing queued_work_* >> CPUState members against multiple (concurent) access. >> >> The second patch introduces a tcg_executing_flag which will be 1 when we are >> inside cpu_exec(). This is required as safe work need to be sure that's all vCPU >> are outside cpu_exec(). >> >> The last patch introduces async_safe_work. It allows to add some work which will >> be done asynchronously but only when all vCPUs are outside cpu_exec(). The tcg >> thread will wait that no vCPUs have any pending safe work before reentering >> cpu-exec(). >> >> Changes V1 -> V2: >> * Release the lock while running the callback for both async and safe work. > What tree do these patches apply to? > > Paolo Hi, it applies on : (6169b60285fe1ff730d840a49527e721bfb30899) I need to rebase mttcg on it.. But I cleaned up/sent this part for Alvise. Fred > >> KONRAD Frederic (3): >> cpus: protect queued_work_* with work_mutex. >> cpus: add a tcg_executing flag. >> cpus: introduce async_run_safe_work_on_cpu. >> >> cpu-exec.c | 7 +++ >> cpus.c | 164 +++++++++++++++++++++++++++++++++++++++++------------- >> include/qom/cpu.h | 28 ++++++++++ >> qom/cpu.c | 2 + >> 4 files changed, 161 insertions(+), 40 deletions(-) >>