All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiaqing Zhao <Zhao.Jiaqing@amd.com>
To: Jan Beulich <jbeulich@suse.com>, Jason Andryuk <jason.andryuk@amd.com>
Cc: "Anthony PERARD" <anthony.perard@vates.tech>,
	"Juergen Gross" <jgross@suse.com>,
	"Roger Pau Monné" <roger@xenproject.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Penny Zheng" <penny.zheng@amd.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH] libxl: wait for QEMU exit before restarting a domain
Date: Tue, 10 Nov 2026 17:10:43 +0800	[thread overview]
Message-ID: <14f7eb35-4dfb-4c2b-8594-fa07cf700bfe@amd.com> (raw)
In-Reply-To: <fdd91377-bcc1-4695-8cb7-b5db1f0f71ab@suse.com>

On 2026-11-05 16:13, Jan Beulich wrote:
> On 04.11.2026 18:33, Jason Andryuk wrote:
>> On 2026-11-04 01:46, Jiaqing Zhao wrote:
>>> The PID-based device model destruction path returns immediately after
>>> sending SIGHUP, before QEMU has necessarily exited. When an HVM guest
>>> reboots with VNC enabled, the new QEMU process may fail to bind the VNC
>>> port because the old process still holds it.
>>>
>>> Wait for QEMU to exit in a child process after singaling it for at most
>>
>> "signaling"
>>
>>> 60 seconds. If waiting fails or times out, log the error and retain the
>>> existing domain destruction behaviour.
>>
>> 60 seconds seems like a lot.  Did you measure the time to see how long 
>> it takes?  It's an upper bound, but maybe 10 seconds would be better?
> 
> Is 10s enough for it to time out upon disconnecting pass-through devices?
> I'm seeing this happen routinely, albeit with an older version of qemu.
> 
> Jan

I checked the code, passthorugh devices are removed via QMP, with
pci_remove_qmp_query_cb(), before sending SIGHUP to terminate QEMU.

Passing through a PCI SD card controller on my system took ~1.2s from
`xl destory` to sending SIGHUP to QEMU, and QEMU then took ~50ms to exit.
So 10s is pretty enough here I think.


  reply	other threads:[~2026-11-10  9:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  6:46 [PATCH] libxl: wait for QEMU exit before restarting a domain Jiaqing Zhao
2026-11-04 17:33 ` Jason Andryuk
2026-11-05  5:36   ` Jiaqing Zhao
2026-11-05  8:13   ` Jan Beulich
2026-11-10  9:10     ` Jiaqing Zhao [this message]
2026-11-10  9:22       ` Jan Beulich
2026-11-06  9:17 ` Roger Pau Monné
2026-11-10  9:27   ` Jiaqing Zhao

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=14f7eb35-4dfb-4c2b-8594-fa07cf700bfe@amd.com \
    --to=zhao.jiaqing@amd.com \
    --cc=anthony.perard@vates.tech \
    --cc=jason.andryuk@amd.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=penny.zheng@amd.com \
    --cc=roger@xenproject.org \
    --cc=sstabellini@kernel.org \
    --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.