From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 1/2] KVM: mmu_notifier: Flush TLBs before releasing mmu_lock Date: Fri, 17 Feb 2012 10:36:45 +0800 Message-ID: <4F3DBD3D.4060202@linux.vnet.ibm.com> References: <20120210152831.6ac3ac87.yoshikawa.takuya@oss.ntt.co.jp> <20120214171044.GK9440@redhat.com> <20120214172947.GA22362@amt.cnet> <20120214185356.GQ9440@redhat.com> <20120214194342.GA24117@amt.cnet> <4F3B7867.7000807@redhat.com> <4F3B7F1F.40402@redhat.com> <4F3B9902.5000306@linux.vnet.ibm.com> <4F3BBC35.6010502@redhat.com> <4F3C8B0A.4020800@linux.vnet.ibm.com> <4F3CEF16.5060405@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , Andrea Arcangeli , Takuya Yoshikawa , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from e23smtp09.au.ibm.com ([202.81.31.142]:33197 "EHLO e23smtp09.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751800Ab2BQChI (ORCPT ); Thu, 16 Feb 2012 21:37:08 -0500 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 17 Feb 2012 03:28:23 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q1H2VaGk3395622 for ; Fri, 17 Feb 2012 13:31:36 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q1H2alZ8011776 for ; Fri, 17 Feb 2012 13:36:47 +1100 In-Reply-To: <4F3CEF16.5060405@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 02/16/2012 07:57 PM, Avi Kivity wrote: > Suppose at point A another thread executes defer_remote_flush(), > commit_remote_flush(), and defer_remote_flush() again. This brings the > balue of tlbs_dirty back to 1 again, with the tlbs dirty. The cmpxchg() > then resets tlbs_dirty, leaving the actual tlbs dirty. > Oh, right, sorry for my careless!