From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIU5g-0001t3-LE for qemu-devel@nongnu.org; Thu, 23 Jul 2015 23:56:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIU5c-0008Fg-K7 for qemu-devel@nongnu.org; Thu, 23 Jul 2015 23:56:08 -0400 Received: from [59.151.112.132] (port=8055 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIU5b-00082k-E9 for qemu-devel@nongnu.org; Thu, 23 Jul 2015 23:56:04 -0400 References: <1437574681-18362-2-git-send-email-pbonzini@redhat.com> <55B0C24C.7020401@de.ibm.com> <55B0C527.8060502@redhat.com> <55B0CA2D.3060506@cn.fujitsu.com> <55B0CB47.2070301@redhat.com> <55B0E522.1000009@gmail.com> <55B11D26.10402@redhat.com> From: Wen Congyang Message-ID: <55B1B747.7000602@cn.fujitsu.com> Date: Fri, 24 Jul 2015 11:55:51 +0800 MIME-Version: 1.0 In-Reply-To: <55B11D26.10402@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Wen Congyang , Christian Borntraeger , qemu-devel@nongnu.org On 07/24/2015 12:58 AM, Paolo Bonzini wrote: > > > On 23/07/2015 14:59, Wen Congyang wrote: >>>> >>>> If the thread doesn't use RCU, rcu_register_thread() is harmless, is >>>> it right? >>> >>> Every rcu_register_thread() makes synchronize_rcu() a little slower. >> >> Yes, but synchronize_rcu() is very slow... > > Hmm, worse, rcu_register_thread() if called together with > synchronize_rcu() it waits for the synchronize_rcu() to finish. :/ Yes, it is a problem. Thanks Wen Congyang > > Paolo > >>> >>>>>> be simpler to add an assertion in rcu_register_thread. I'm just a bit >>>>>> wary of doing little more than the bare minimum in 2.4, because of the >>>>>> OS X failure that I didn't quite understand. >>>> Which problem? I don't find it in the maillist. >>> >>> http://article.gmane.org/gmane.comp.emulators.qemu/351548 >> >> Hmm, I guess rcu_reader is invalid when pthread key is destroyed. >> pthread key and __thread >> variable, which is destroyed first? I don't find any document to >> describe it. >