From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNdMG-0005NN-SU for qemu-devel@nongnu.org; Thu, 14 Jul 2016 05:55:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNdMD-0004hc-Ob for qemu-devel@nongnu.org; Thu, 14 Jul 2016 05:55:04 -0400 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:37951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNdMD-0004hR-8Z for qemu-devel@nongnu.org; Thu, 14 Jul 2016 05:55:01 -0400 Received: by mail-wm0-x22a.google.com with SMTP id o80so106312972wme.1 for ; Thu, 14 Jul 2016 02:55:01 -0700 (PDT) References: <1468354426-837-1-git-send-email-sergey.fedorov@linaro.org> <148a0c48-f58c-6d95-8b97-6449670019ac@redhat.com> <578673C5.3060108@gmail.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <578673C5.3060108@gmail.com> Date: Thu, 14 Jul 2016 10:55:03 +0100 Message-ID: <87zipk4k94.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 00/11] Reduce lock contention on TCG hot-path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Fedorov Cc: Paolo Bonzini , Sergey Fedorov , qemu-devel@nongnu.org, mttcg@listserver.greensocs.com, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, cota@braap.org, bobby.prani@gmail.com, rth@twiddle.net, peter.maydell@linaro.org, patches@linaro.org, claudio.fontana@huawei.com, mark.burton@greensocs.com, jan.kiszka@siemens.com Sergey Fedorov writes: > On 13/07/16 10:39, Paolo Bonzini wrote: >> On 12/07/2016 22:13, Sergey Fedorov wrote: >>> From: Sergey Fedorov >>> >>> Hi, >>> >>> This is my respin of Alex's v2 series [1]. >>> >>> The first 8 patches are preparation for the patch 9, the subject matter >>> of this series, which enables lockless translation block lookup. The >>> main change here is that Paolo's suggestion is implemented: TBs are >>> marked with invalid CPU state early during invalidation. This allows to >>> make lockless lookup safe from races on 'tb_jmp_cache' and direct block >>> chaining. >> Thanks for looking at the suggestion again and especially for perfecting it! >> >>> The patch 10 is a simple solution to avoid unnecessary bouncing on >>> 'tb_lock' between tb_gen_code() and tb_add_jump(). A local variable is >>> used to keep track of whether 'tb_lock' has already been taken. >>> >>> The last patch is my attempt to restructure tb_find_{fast,slow}() into a >>> single function tb_find(). I think it will be easier to follow the >>> locking scheme this way. However, I am afraid this last patch can be >>> controversial, so it can be simply dropped. >> Actually I agree entirely with it. >> >> If anything, for historical reasons one might rename tb_find_physical to >> tb_find_slow and leave the tb_find_fast name, but I think the patch is >> good as is. > > Nice to hear that :) > >> >> Have you measured performance with the series? In any case, it's nice >> to see MTTCG finally taking shape! > > No, I didn't measured the performance. Maybe Alex can help me with > this? I can run some tests against this series if you want. It's fairly easy to see an improvement when watching htop though as the system time usage drops a lot. > > Thanks, > Sergey -- Alex Bennée