From: "Jan Beulich" Subject: Re: [PATCHv3 5/6] evtchn: remove the locking when unmasking an event channel Date: Thu, 18 Jun 2015 12:30:51 +0100 Message-ID: <5582C80B0200007800086948@mail.emea.novell.com> References: <1434542583-28073-1-git-send-email-david.vrabel@citrix.com> <1434542583-28073-6-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z5Y22-0002Ko-U4 for xen-devel@lists.xenproject.org; Thu, 18 Jun 2015 11:30:55 +0000 In-Reply-To: <1434542583-28073-6-git-send-email-david.vrabel@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: xen-devel@lists.xenproject.org, Keir Fraser , Ian Campbell , Tim Deegan List-Id: xen-devel@lists.xenproject.org >>> On 17.06.15 at 14:03, wrote: > --- a/xen/common/event_channel.c > +++ b/xen/common/event_channel.c > @@ -978,8 +978,6 @@ int evtchn_unmask(unsigned int port) > struct domain *d = current->domain; > struct evtchn *evtchn; > > - ASSERT(spin_is_locked(&d->event_lock)); > - > if ( unlikely(!port_is_valid(d, port)) ) > return -EINVAL; > > @@ -1146,9 +1144,7 @@ long do_event_channel_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) > struct evtchn_unmask unmask; > if ( copy_from_guest(&unmask, arg, 1) != 0 ) > return -EFAULT; > - spin_lock(¤t->domain->event_lock); > rc = evtchn_unmask(unmask.port); > - spin_unlock(¤t->domain->event_lock); And, looking particularly at evtchn_fifo_unmask() (and its descendant evtchn_fifo_set_pending()), you get away without acquiring the port lock in or around evtchn_port_unmask()? If indeed so, this one would again be independent on 1, 2, and 4, i.e. could go in together with 3. Jan