All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: Glauber Costa <gcosta@redhat.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 11:58:09 +0200	[thread overview]
Message-ID: <47DF9231.9090104@qumranet.com> (raw)
In-Reply-To: <47DF9191.9070607@redhat.com>

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/

      reply	other threads:[~2008-03-18  9:58 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
2008-03-18  9:58         ` Avi Kivity [this message]

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=47DF9231.9090104@qumranet.com \
    --to=avi@qumranet.com \
    --cc=gcosta@redhat.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.