From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH] use slots_lock to protect writes to the wall clock Date: Tue, 18 Mar 2008 06:55:29 -0300 Message-ID: <47DF9191.9070607@redhat.com> References: <1205784615-23255-1-git-send-email-gcosta@redhat.com> <47DF643F.5000707@qumranet.com> <47DF8F5B.9080606@redhat.com> <47DF90D4.7090801@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, Marcelo Tosatti To: Avi Kivity Return-path: In-Reply-To: <47DF90D4.7090801@qumranet.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Avi Kivity wrote: > Glauber Costa wrote: >>> >>> This lock is fairly annoying. What do you think about taking it in >>> vcpu_run unconditionally and only dropping it while in guest mode? >>> Most exits are mmu (or with npt, mmio) so they need to take it anyway. >>> >> Can't see the point. This is taken before updates to the wall clock, >> not system time. > > I mean in general, not related to wall clock. Oh, sorry. >> [avi@firebolt linux-2.6 (master)]$ git grep down_read.*slots_lock >> arch/x86/kvm/ | wc -l >> 16 > > We take the lock for read 16 times, could be narrowed down to probably > once (with a drop and re-take around guest mode). Since it will be written to so rarely, that's probably fine. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/