From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH 10/14] xen/gntdev: convert priv->lock to a mutex Date: Mon, 19 Jan 2015 18:43:04 +0000 Message-ID: <54BD5038.3050800@citrix.com> References: <1421682692-20628-1-git-send-email-david.vrabel@citrix.com> <1421682692-20628-11-git-send-email-david.vrabel@citrix.com> <54BD4492.8040204@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YDHI6-00045I-Bp for xen-devel@lists.xenproject.org; Mon, 19 Jan 2015 18:43:10 +0000 In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: xen-devel@lists.xenproject.org, Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org On 19/01/15 18:38, Stefano Stabellini wrote: > On Mon, 19 Jan 2015, David Vrabel wrote: >> On 19/01/15 17:49, Stefano Stabellini wrote: >>> On Mon, 19 Jan 2015, David Vrabel wrote: >>>> Unmapping may require sleeping and we unmap while holding priv->lock, so >>>> convert it to a mutex. >>> >>> It would be useful to list in the commit message the operations that >>> might sleep and are currently called with the spinlock held. >> >> It's the next patch that introduces the sleeping, when we wait on the >> completion for the async grant unmap to complete. > > Ah! Makes sense. > One thing to keep in mind is that mutex_lock can introduce a sleep > itself. We need to make sure that all the call sites in gntdev.c are OK > with it. They are. David