From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: Re: [PATCH 4/4] Convert irq notifiers lists to RCU locking. Date: Mon, 13 Jul 2009 12:31:39 -0700 Message-ID: <20090713193139.GB6670@linux.vnet.ibm.com> References: <1247400233-24243-1-git-send-email-gleb@redhat.com> <1247400233-24243-5-git-send-email-gleb@redhat.com> <20090713130256.GC10402@redhat.com> <20090713131128.GI28046@redhat.com> <4A5B35FD.9090208@gmail.com> <20090713133234.GN28046@redhat.com> <20090713134058.GG10402@redhat.com> Reply-To: paulmck@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Gleb Natapov , Gregory Haskins , avi@redhat.com, "kvm@vger.kernel.org" To: "Michael S. Tsirkin" Return-path: Received: from e2.ny.us.ibm.com ([32.97.182.142]:54190 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756643AbZGMUJN (ORCPT ); Mon, 13 Jul 2009 16:09:13 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e2.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n6DK40NM014189 for ; Mon, 13 Jul 2009 16:04:00 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n6DK9Crg253316 for ; Mon, 13 Jul 2009 16:09:12 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n6DK9BC2001139 for ; Mon, 13 Jul 2009 16:09:12 -0400 Content-Disposition: inline In-Reply-To: <20090713134058.GG10402@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jul 13, 2009 at 04:40:59PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 04:32:34PM +0300, Gleb Natapov wrote: > > Yeah I understand that other RCU read section may introduce delays too. > > The question is how big the delay may be. > > I recall seeing the number "at least 3 jiffies" somewhere, but that > might have changed since. A grace period lasts a handful of jiffies, depending on kernel configuration and how long readers remain in a given RCU read-side critical section. If a handful of jiffies is too long, there are patches that speed up the grace period, down into the sub-hundred-microsecond range. > > I don't think multiple > > milliseconds delay in device de-assignment is a big issue though. > > Right. My point was that since the sync is done under kvm lock, the > guest can easily get blocked trying to get kvm lock meanwhile. I will ask the usual question -- can call_rcu() be used to move the grace period out from under the lock? (Often this can be done, but not always.) Thanx, Paul