From: Marcelo Tosatti <mtosatti@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
kvm@vger.kernel.org, avi@redhat.com
Subject: Re: [PATCH 3/5] Move irq notifiers lists to its own locking.
Date: Mon, 13 Jul 2009 13:31:06 -0300 [thread overview]
Message-ID: <20090713163106.GA7920@amt.cnet> (raw)
In-Reply-To: <20090713162338.GA7713@amt.cnet>
On Mon, Jul 13, 2009 at 01:23:38PM -0300, Marcelo Tosatti wrote:
> On Mon, Jul 13, 2009 at 05:37:50PM +0300, Gleb Natapov wrote:
> > On Mon, Jul 13, 2009 at 05:23:20PM +0300, Michael S. Tsirkin wrote:
> > > On Mon, Jul 13, 2009 at 02:48:44PM +0300, Gleb Natapov wrote:
> > > > On Mon, Jul 13, 2009 at 02:45:51PM +0300, Michael S. Tsirkin wrote:
> > > > > On Mon, Jul 13, 2009 at 12:12:33PM +0300, Gleb Natapov wrote:
> > > > > >
> > > > > > Signed-off-by: Gleb Natapov <gleb@redhat.com>
> > > > >
> > > > > This one is probably better off left as is,
> > > > What do you mean "as is"?
> > >
> > > This is a slow operation. It seems that we could use irq_lock or switch
> > > to slot lock or kvm lock here. Why do we need another one?
> > >
> > irq_lock is completely removed. So either we don't remove it and use it
> > here (and we don't need mutex so we change it to spinlock too), or we add
> > another lock with the name that actually tell us what its purpose. I prefer
> > second option. I am not sure you can use kvm lock without deadlock, and
> > slot lock? How this connected to slots management?!
>
> slots_lock is just a bad name now. See slots_lock is taken for read on
> every exit. So taking slots_lock for write means all guests are stopped
^^^^^^
all vcpus
> in a known synchronization state.
>
> If the write side of the operation is very unfrequent (such as
> registration of irq ack/mask notifiers), down_write(slots_lock) works as
> a simpler replacement for RCU.
>
> We want to get rid of slots_lock on every exit at some point, though.
>
> > And this is not about speed of the operation. It is about making reader
> > lockless.
next prev parent reply other threads:[~2009-07-13 16:31 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 9:12 [PATCH 0/5][RFC] more fine grained locking for IRQ injection Gleb Natapov
2009-07-13 9:12 ` [PATCH 1/5] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock Gleb Natapov
2009-07-13 14:29 ` Gregory Haskins
2009-07-13 14:39 ` Gleb Natapov
2009-07-13 14:55 ` Michael S. Tsirkin
2009-07-13 15:01 ` Gleb Natapov
2009-07-13 15:03 ` Gregory Haskins
2009-07-13 15:11 ` Gregory Haskins
2009-07-13 15:19 ` Gleb Natapov
2009-07-13 9:12 ` [PATCH 2/5] Move irq routing to its own locking Gleb Natapov
2009-07-13 9:12 ` [PATCH 3/5] Move irq notifiers lists " Gleb Natapov
2009-07-13 11:45 ` Michael S. Tsirkin
2009-07-13 11:48 ` Gleb Natapov
2009-07-13 14:23 ` Michael S. Tsirkin
2009-07-13 14:37 ` Gleb Natapov
2009-07-13 14:49 ` Michael S. Tsirkin
2009-07-13 15:23 ` Gleb Natapov
2009-07-13 15:32 ` Gregory Haskins
2009-07-13 15:40 ` Michael S. Tsirkin
2009-07-13 16:28 ` Gleb Natapov
2009-07-13 16:23 ` Marcelo Tosatti
2009-07-13 16:31 ` Marcelo Tosatti [this message]
2009-07-13 16:35 ` Gleb Natapov
2009-07-13 16:43 ` Marcelo Tosatti
2009-07-13 9:12 ` [PATCH 4/5] Move IO APIC to its own lock Gleb Natapov
2009-07-13 9:12 ` [PATCH 5/5] Drop kvm->irq_lock lock Gleb Natapov
2009-07-13 13:23 ` [PATCH 0/5][RFC] more fine grained locking for IRQ injection Michael S. Tsirkin
2009-07-13 13:28 ` Gleb Natapov
2009-07-13 13:53 ` Michael S. Tsirkin
2009-07-13 13:58 ` Gleb Natapov
2009-07-13 14:21 ` Michael S. Tsirkin
2009-07-13 14:33 ` Gleb Natapov
2009-07-13 14:43 ` Michael S. Tsirkin
2009-07-13 15:21 ` Gleb Natapov
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=20090713163106.GA7920@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox