From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZP6LD-0007V6-PN for qemu-devel@nongnu.org; Tue, 11 Aug 2015 05:59:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZP6LA-0004WZ-2o for qemu-devel@nongnu.org; Tue, 11 Aug 2015 05:59:31 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:37689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZP6L9-0004WF-Oh for qemu-devel@nongnu.org; Tue, 11 Aug 2015 05:59:28 -0400 Received: by wibhh20 with SMTP id hh20so187531087wib.0 for ; Tue, 11 Aug 2015 02:59:26 -0700 (PDT) Sender: Paolo Bonzini References: <1439220437-23957-1-git-send-email-fred.konrad@greensocs.com> <1439220437-23957-8-git-send-email-fred.konrad@greensocs.com> <55C8D31A.8070703@redhat.com> <55C99A57.2090406@greensocs.com> <55C9B37E.2020700@redhat.com> From: Paolo Bonzini Message-ID: <55C9C778.5070001@redhat.com> Date: Tue, 11 Aug 2015 11:59:20 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: mttcg@listserver.greensocs.com, Mark Burton , Alvise Rigo , QEMU Developers , Guillaume Delbergue , =?UTF-8?Q?Alex_Benn=c3=a9e?= , Frederic Konrad On 11/08/2015 11:21, Peter Maydell wrote: > > > I think it's definitely not sufficient. Is user-mode multithread still > > > working today? > > > > For some definition of "working", yes. It's not sufficient, but it's a > > good start. > > > > The main problem with user-mode multithreading is that there is no clear > > lock hierarchy between mmap_lock and tb_lock. But this is not a problem > > for softmmu. > > And also that we don't have a serious design for the locking at all. > I was hoping this would be something that would come out of the > multithreaded-TCG work... Indeed. Fred made an effort to identify the translate-all.c functions that need tb_lock, and there are only a few that need mmap_lock. I'm now trying to document it so that the patches are actually reviewable... Paolo