From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v4 0/3] Add reference counting to grant notify ioctls Date: Fri, 11 Nov 2011 15:33:30 -0500 Message-ID: <20111111203330.GA9618@phenom.dumpdata.com> References: <1316207684-19860-1-git-send-email-dgdegra@tycho.nsa.gov> <1319752729-13990-1-git-send-email-dgdegra@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1319752729-13990-1-git-send-email-dgdegra@tycho.nsa.gov> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Daniel De Graaf Cc: keir@xen.org, jeremy@goop.org, xen-devel@lists.xensource.com, Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On Thu, Oct 27, 2011 at 05:58:46PM -0400, Daniel De Graaf wrote: > > The current notify ioctls assume that an event channel will not be > > closed prior to the page being unmapped. If the mappings are associated > > with an open file descriptor and the application crashes, the > > notification behavior depends on the close ordering of the file > > descriptors. To avoid this, event channels now have a reference count > > that is used by the grant notify ioctls to postpone the close operation > > until the notification is fired. OK, it all looks sensible to me. Sticking on my 3.3 queue. Thx! > > Changes since v3: > Avoid race between evtchn_get and evtchn_put > (reference count changed to an integer protected by mutex) > > Changes since v2: > Avoid possible sleep under spinlock > Decrease refcount mismatch errors from BUG to WARN > Use reference count to identify userspace-visible event channels > > Changes since v1: > Rename evtchn_get/put to match kernel naming conventions > Use atomic_t for refcount > > [PATCH 1/3] xen/event: Add reference counting to event channels > [PATCH 2/3] xen/gntalloc: Change gref_lock to a mutex > [PATCH 3/3] xen/gnt{dev,alloc}: reserve event channels for notify