From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 4/4] Convert irq notifiers lists to RCU locking. Date: Tue, 14 Jul 2009 15:06:05 +0300 Message-ID: <20090714120605.GB28046@redhat.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> <20090713193139.GB6670@linux.vnet.ibm.com> <20090714054612.GU28046@redhat.com> <20090714120309.GA6671@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Michael S. Tsirkin" , Gregory Haskins , avi@redhat.com, "kvm@vger.kernel.org" To: "Paul E. McKenney" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:48631 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751252AbZGNMGQ (ORCPT ); Tue, 14 Jul 2009 08:06:16 -0400 Content-Disposition: inline In-Reply-To: <20090714120309.GA6671@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Jul 14, 2009 at 05:03:09AM -0700, Paul E. McKenney wrote: > On Tue, Jul 14, 2009 at 08:46:12AM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 12:31:39PM -0700, Paul E. McKenney wrote: > > > 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.) > > > > > It can't. Caller frees the data. > > I will then ask the usual next question... Can the freeing of the > data be moved from the caller? > Not really. But don't worry. In the case we discuss a small delay is not a problem. -- Gleb.