All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org, avi@redhat.com, mtosatti@redhat.com
Subject: Re: [RFC PATCH] KVM: optimize apic interrupt delivery
Date: Tue, 11 Sep 2012 14:49:17 +0300	[thread overview]
Message-ID: <20120911114917.GJ20907@redhat.com> (raw)
In-Reply-To: <20120911112049.GI20907@redhat.com>

On Tue, Sep 11, 2012 at 02:20:49PM +0300, Gleb Natapov wrote:
> On Mon, Sep 10, 2012 at 07:17:54PM +0300, Gleb Natapov wrote:
> > > 
> > > > +	rcu_assign_pointer(kvm->arch.apic_map, new);
> > > > +	mutex_unlock(&kvm->arch.apic_map_lock);
> > > > +
> > > > +	if (old)
> > > > +		call_rcu(&old->rcu, rcu_free_apic_map);
> > > 
> > > What guarantees rcu_free_apic_map is called before module goes away?
> > Why do we care?
> > 
> Ugh. We do not care that apic_map memory will stick after module unload, but we
> obviously care since rcu_free_apic_map() code itself will go away. Looks
> like general problem for all modular users of call_rcu(). Is there
> general solution in module unload code somewhere? Calling rcu_barrier()
> before unloading module should be enough.
> 
If nothing changed for the past 3 years each module should call
rcu_barrier() by itself:
http://paulmck.livejournal.com/7314.html

Looking at the code I see that it calls synchronize_rcu() on module
delete, but this is not enough. :(

--
			Gleb.

  reply	other threads:[~2012-09-11 11:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10 13:09 [RFC PATCH] KVM: optimize apic interrupt delivery Gleb Natapov
2012-09-10 14:44 ` Michael S. Tsirkin
2012-09-10 16:17   ` Gleb Natapov
2012-09-10 17:05     ` Gleb Natapov
2012-09-11  9:29       ` Avi Kivity
2012-09-11  9:35         ` Gleb Natapov
2012-09-11  9:41           ` Avi Kivity
2012-09-11  9:45             ` Gleb Natapov
2012-09-11  9:57               ` Gleb Natapov
2012-09-11 12:05                 ` Avi Kivity
2012-09-11 12:12                   ` Gleb Natapov
2012-09-11 12:04               ` Avi Kivity
2012-09-11 12:09                 ` Gleb Natapov
2012-09-11 11:20     ` Gleb Natapov
2012-09-11 11:49       ` Gleb Natapov [this message]
2012-09-10 15:09 ` Avi Kivity
2012-09-10 15:35   ` 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=20120911114917.GJ20907@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mtosatti@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 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.