[libvirt] [PATCH] qemu: Fix IOThread pids lost after qemuProcessReconnect

Jie Wang posted 1 patch 5 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/06511115-77ca-4dd0-9e70-9b64603c0f8b@HGHY1w002515742.local
src/qemu/qemu_process.c | 3 +++
1 file changed, 3 insertions(+)
[libvirt] [PATCH] qemu: Fix IOThread pids lost after qemuProcessReconnect
Posted by Jie Wang 5 years, 5 months ago
>From fca1732c0e1f691fb25c614349d5486bbc73a109 Mon Sep 17 00:00:00 2001
From: Jie Wang <wangjie88@huawei.com>
Date: Wed, 17 Oct 2018 22:55:51 +0800
Subject: [PATCH] qemu: Fix IOThread pids lost after qemuProcessReconnect

IOThread pids info will lost after libvirtd restart, then
if we call pinIOThread, sched_setaffinity will be called with
pid 0, not IOThread pid. So pinIOThread cannot work normally.

Signed-off-by: Jie Wang <wangjie88.huawei.com>
---
 src/qemu/qemu_process.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 40d35cbe6b..5bf55721d2 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -7650,6 +7650,9 @@ qemuProcessReconnect(void *opaque)
 
     qemuDomainVcpuPersistOrder(obj->def);
 
+    if (qemuProcessDetectIOThreadPIDs(driver, obj, QEMU_ASYNC_JOB_NONE) < 0)
+        goto error;
+
     if (qemuSecurityReserveLabel(driver->securityManager, obj->def, obj->pid) < 0)
         goto error;
 
-- 
2.16.2.windows.1




--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] qemu: Fix IOThread pids lost after qemuProcessReconnect
Posted by John Ferlan 5 years, 5 months ago

On 10/18/18 3:32 AM, Jie Wang wrote:
> From fca1732c0e1f691fb25c614349d5486bbc73a109 Mon Sep 17 00:00:00 2001
> From: Jie Wang <wangjie88@huawei.com>
> Date: Wed, 17 Oct 2018 22:55:51 +0800
> Subject: [PATCH] qemu: Fix IOThread pids lost after qemuProcessReconnect

Removed whatever ^^^^this was (and it was in both patches you posted,
this just happens to be the second one).

> 
> IOThread pids info will lost after libvirtd restart, then
> if we call pinIOThread, sched_setaffinity will be called with
> pid 0, not IOThread pid. So pinIOThread cannot work normally.
> 
> Signed-off-by: Jie Wang <wangjie88.huawei.com>
> ---
>  src/qemu/qemu_process.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Very strange looked through history to see if somehow some patch removed
a call during *Reconnect, but found nothing (of course). I cannot recall
why in the original commit 9bef96ec502 that this wasn't added.  It was
added in *Start (which eventually because *Launch) and *Attach, but not
*Reconnect.

Oh well, good catch.

Reviewed-by: John Ferlan <jferlan@redhat.com>
(and pushed)

Tks,

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list