qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Wen Congyang <wency@cn.fujitsu.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections
Date: Thu, 23 Jul 2015 07:35:48 +0200	[thread overview]
Message-ID: <55B07D34.3090800@redhat.com> (raw)
In-Reply-To: <55B057D3.2010907@cn.fujitsu.com>



On 23/07/2015 04:56, Wen Congyang wrote:
>> > Otherwise, grace periods are detected too early!
> We always use qemu_thread_create() in qemu. So I think we can do it like this:
> wrapped_fn()
> {
>     rcu_register_thread();
>     call thread_fn() here
>     rcu_unregister_thread();
> }
> 
> So we will never forget to call rcu_register_thread() when creating a new thread.

That's a good idea.  Would you like to propose a patch for 2.5?  Then we
can also use it to run the thread_atexit notifiers and avoid the bug
that Peter reported for OS X.

Paolo

  reply	other threads:[~2015-07-23  5:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22 14:18 [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections Paolo Bonzini
2015-07-23  2:56 ` Wen Congyang
2015-07-23  5:35   ` Paolo Bonzini [this message]
2015-07-23 10:30 ` Christian Borntraeger
2015-07-23 10:42   ` Paolo Bonzini
2015-07-23 11:04     ` Wen Congyang
2015-07-23 11:08       ` Paolo Bonzini
2015-07-23 12:59         ` Wen Congyang
2015-07-23 16:58           ` Paolo Bonzini
2015-07-24  3:55             ` Wen Congyang
2015-07-24  5:56             ` Wen Congyang
2015-07-24  6:22               ` Paolo Bonzini
2015-07-24  6:30                 ` Wen Congyang

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=55B07D34.3090800@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wency@cn.fujitsu.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;
as well as URLs for NNTP newsgroup(s).