All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <gcosta@redhat.com>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net, Marcelo Tosatti <marcelo@kvack.org>
Subject: Re: [PATCH] use slots_lock to protect writes to the wall clock
Date: Tue, 18 Mar 2008 06:55:29 -0300	[thread overview]
Message-ID: <47DF9191.9070607@redhat.com> (raw)
In-Reply-To: <47DF90D4.7090801@qumranet.com>

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/

  reply	other threads:[~2008-03-18  9:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17 20:10 [PATCH] use slots_lock to protect writes to the wall clock Glauber Costa
2008-03-18  6:42 ` Avi Kivity
2008-03-18  9:46   ` Glauber Costa
2008-03-18  9:52     ` Avi Kivity
2008-03-18  9:55       ` Glauber Costa [this message]
2008-03-18  9:58         ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47DF9191.9070607@redhat.com \
    --to=gcosta@redhat.com \
    --cc=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=marcelo@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.