From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] use slots_lock to protect writes to the wall clock Date: Tue, 18 Mar 2008 11:58:09 +0200 Message-ID: <47DF9231.9090104@qumranet.com> References: <1205784615-23255-1-git-send-email-gcosta@redhat.com> <47DF643F.5000707@qumranet.com> <47DF8F5B.9080606@redhat.com> <47DF90D4.7090801@qumranet.com> <47DF9191.9070607@redhat.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: Glauber Costa Return-path: In-Reply-To: <47DF9191.9070607@redhat.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 Glauber Costa wrote: > >>> [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. > > Moreover, the time setting up guest entry and handling exits is bounded and usually short. [We need to drop the lock when emulating hlt, too, for this to hold] -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- 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/