From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: Re: [PATCH] KVM: Defer remote tlb flushes on invlpg (v4) Date: Mon, 20 Apr 2009 15:01:43 +0200 Message-ID: <20090420130142.GD15228@random.random> References: <1237468666-30700-1-git-send-email-avi@redhat.com> <49CF4F11.30804@redhat.com> <20090411164853.GH1329@random.random> <20090412223158.GA31408@amt.cnet> <20090418153427.GB15228@random.random> <20090419175428.GB28197@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from mx2.redhat.com ([66.187.237.31]:41563 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754238AbZDTNBt (ORCPT ); Mon, 20 Apr 2009 09:01:49 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3KD1j7R028811 for ; Mon, 20 Apr 2009 09:01:45 -0400 Content-Disposition: inline In-Reply-To: <20090419175428.GB28197@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Apr 19, 2009 at 02:54:28PM -0300, Marcelo Tosatti wrote: > I'm fine with your kvm_flush_local_tlb. Just one minor nit: > > + /* get new asid before returning to guest mode */ > + if (!test_bit(KVM_REQ_TLB_FLUSH, &vcpu->requests)) > + set_bit(KVM_REQ_TLB_FLUSH, &vcpu->requests); > > Whats the test_bit for? To avoid a write in case it was already set... but thinking twice I guess the probability that it's already set is near zero, so I'll remove it and I'll just do set_bit. > It was nice to hide explicit knowledge about > vcpu->kvm->remote_tlbs_dirty behind the interface instead of exposing > it. Hmm ok, if you prefer it I'll add it back. I guess ..._tlb_dirty_cond is better name so it's clear it's not just checking the cond but the dirty flag too.