All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Lagerwall <ross.lagerwall@citrix.com>
To: David Vrabel <david.vrabel@citrix.com>, xen-devel@lists.xenproject.org
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH] xen/manage: Always freeze/thaw processes when suspend/resuming
Date: Fri, 22 Aug 2014 15:39:09 +0100	[thread overview]
Message-ID: <53F7560D.50004@citrix.com> (raw)
In-Reply-To: <53F722E9.4060505@citrix.com>

On 08/22/2014 12:00 PM, David Vrabel wrote:
> 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?
>

With 2 vCPUs and 1024MB RAM, 8ms for freeze_processes() and 6ms for 
thaw_processes().

With 4 vCPUs and 4096MB RAM, 8ms for freeze_processes() and 5ms for 
thaw_processes().

With 4 vCPUs and 4096MB RAM running stress -c 4, 12ms for 
freeze_processes() and 66ms for thaw_processes().

It doesn't seem to take too long...

Cheers
-- 
Ross Lagerwall

      reply	other threads:[~2014-08-22 14:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18  9:41 [PATCH] xen/manage: Always freeze/thaw processes when suspend/resuming Ross Lagerwall
2014-08-22 11:00 ` David Vrabel
2014-08-22 14:39   ` Ross Lagerwall [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53F7560D.50004@citrix.com \
    --to=ross.lagerwall@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.