From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH] xen/manage: Always freeze/thaw processes when suspend/resuming Date: Fri, 22 Aug 2014 12:00:57 +0100 Message-ID: <53F722E9.4060505@citrix.com> References: <1408354896-30770-1-git-send-email-ross.lagerwall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XKmac-0002vz-Bs for xen-devel@lists.xenproject.org; Fri, 22 Aug 2014 11:01:03 +0000 In-Reply-To: <1408354896-30770-1-git-send-email-ross.lagerwall@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ross Lagerwall , xen-devel@lists.xenproject.org Cc: Boris Ostrovsky , David Vrabel List-Id: xen-devel@lists.xenproject.org On 18/08/14 10:41, Ross Lagerwall wrote: > Always freeze processes when suspending and thaw processes when resuming > to prevent a race noticeable with HVM guests. > > This prevents a deadlock where the khubd kthread (which is designed to > be freezable) acquires a usb device lock and then tries to allocate > memory which requires the disk which hasn't been resumed yet. > Meanwhile, the xenwatch thread deadlocks waiting for the usb device > lock. > > Freezing processes fixes this because the khubd thread is only thawed > after the xenwatch thread finishes resuming all the devices. I think this is the safest fix for this issue but I'm a bit concerned about how much extra time the freeze_processes() call will add to the suspend. Can you measure how long it takes for a typical VM? David