Re: [PATCH V3 0/3] migration: add qemu parallel migration options

2023-04-25 Thread Jiang Jiacheng
On 2023/4/24 18:57, Jiri Denemark wrote: > On Fri, Apr 21, 2023 at 17:39:12 +0800, Jiang Jiacheng wrote: >> >> Thank you for your reply and review, I'd appreciate for you to do that. >> >> And I'd also like to confirm that we have the following usages after the

Re: [PATCH V3 0/3] migration: add qemu parallel migration options

2023-04-21 Thread Jiang Jiacheng
tifd' both to true, which I think is unreasonable though the migration is succeed. Thanks, Jiang Jiacheng On 2023/4/21 1:45, Jiri Denemark wrote: > On Fri, Feb 24, 2023 at 17:27:09 +0800, Jiang Jiacheng wrote: >> Add compress method zlib and zstd for parallel migration and new >> migr

Re: [PATCH V3 0/3] migration: add qemu parallel migration options

2023-03-15 Thread Jiang Jiacheng
Ping... On 2023/2/24 17:27, Jiang Jiacheng wrote: > Add compress method zlib and zstd for parallel migration and new > migration options to set qemu's parameter related with parallel > migration(multifd-compression, multifd-zlib-level and multifd-zstd-level). > These parameters h

[PATCH v2 4/8] migration/migration-pin: Implement qemuDomainPinMigrationThread

2023-03-07 Thread Jiang Jiacheng
Add cgroup for migation thread and implement qemuDomainPinMigrationThread to pin migraiton thread to given cpumap. Signed-off-by: zhengchuan Signed-off-by: Jiang Jiacheng --- src/conf/domain_conf.c | 9 ++ src/conf/domain_conf.h | 10 +++ src/conf/virconftypes.h | 2 ++ src

[PATCH v2 7/8] migration/migration-pin: pin migration thread immediately after get thread info

2023-03-07 Thread Jiang Jiacheng
ration parameter. Signed-off-by: zhengchuan Signed-off-by: Jiang Jiacheng --- src/qemu/qemu_migration.c | 28 ++ src/qemu/qemu_process.c | 81 +++ src/qemu/qemu_process.h | 3 ++ 3 files changed, 112 insertions(+) diff --git a/src/qemu/qe

[PATCH v2 6/8] migration/migration-pin: add migrationpin for migration parameters

2023-03-07 Thread Jiang Jiacheng
Add 'migrationpin' to migration parameters to provide another method to set the cpulist required for migration thread pin. 'migrationpin' can only be set before migration and won't effect if 'virsh migrationpin' is set. Signed-off-by: zhengchuan Signed-off-by: J

[PATCH v2 8/8] migration/migration-pin/multifd-pin: add migration pin status handle

2023-03-07 Thread Jiang Jiacheng
Signed-off-by: zhengchuan Signed-off-by: Jiang Jiacheng --- src/qemu/qemu_process.c | 56 + 1 file changed, 56 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e787db8b24..85a22c7e51 100644 --- a/src/qemu/qemu_process.c

[PATCH v2 3/8] migration/migration-pin: Introduce virDomainPinMigrationThread API

2023-03-07 Thread Jiang Jiacheng
Then, pin migration thread with given cpumap. Introduce virDomainPinMigrationThread API, and it will be implement in next patch. Signed-off-by: zhengchuan Signed-off-by: Jiang Jiacheng --- include/libvirt/libvirt-domain.h | 5 +++ src/driver-hypervisor.h | 6 +++ src/libvirt-domain.c

[PATCH v2 1/8] migration/migration-pin: Implemente the interface of obtaining migration thread information

2023-03-07 Thread Jiang Jiacheng
First, we need get migration thread info, implement the related interface to obtain migration threadinfo from qemu using qmp command. Implementation of the Interface for Obtaining Thread Information Signed-off-by: zhengchuan Signed-off-by: Jiang Jiacheng --- src/qemu/qemu_domain.c | 24

[PATCH v2 5/8] migration/migration-pin: support migration pin by virsh command

2023-03-07 Thread Jiang Jiacheng
getting information. Signed-off-by: zhengchuan Signed-off-by: Jiang Jiacheng --- tools/virsh-domain.c | 69 1 file changed, 69 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index a4abcb1b03..43ecd651d8 100644 --- a/tools/virsh-

[PATCH v2 2/8] migration/migration-pin: get migration pid for migration pin

2023-03-07 Thread Jiang Jiacheng
: Jiang Jiacheng --- src/qemu/qemu_migration.c| 81 src/qemu/qemu_migration_params.c | 19 src/qemu/qemu_migration_params.h | 4 ++ 3 files changed, 104 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

[PATCH v2 0/8] migration/migrationpin:support migration pin

2023-03-07 Thread Jiang Jiacheng
w.org/QEMU/20230203073519.2969147-1-jiangjiach...@huawei.com/ Jiang Jiacheng (8): migration/migration-pin: Implemente the interface of obtaining migration thread information migration/migration-pin: get migration pid for migration pin migration/migration-pin: Introduce virDomainPinMigrat

[PATCH 2/3] virsh: Add migrate options to set parallel compress level

2023-02-24 Thread Jiang Jiacheng
Add migrate options: --compression-zlib-level --compression-zstd-level These options are used to set compress level for "zlib" or "zstd" during parallel migration if the compress method is specified. Signed-off-by: Jiang Jiacheng --- docs/man

[PATCH V3 0/3] migration: add qemu parallel migration options

2023-02-24 Thread Jiang Jiacheng
t.com/archives/libvir-list/2023-February/237604.html diff to v2: * merge the processing of new method into 'qemuMigrationParamsSetCompression' * improve descriptions for the new options. Jiang Jiacheng (3): Add public API for parallel compression method virsh: Add migrate options

[PATCH 3/3] qemu: support set parallel migration compression method

2023-02-24 Thread Jiang Jiacheng
27;t be used in compress migration. Signed-off-by: Jiang Jiacheng --- src/qemu/qemu_migration.h| 2 + src/qemu/qemu_migration_params.c | 80 +++- src/qemu/qemu_migration_params.h | 3 ++ 3 files changed, 83 insertions(+), 2 deletions(-) diff --git a/src/qemu/qem

[PATCH 1/3] Add public API for parallel compression method

2023-02-24 Thread Jiang Jiacheng
migration. Signed-off-by: Jiang Jiacheng --- include/libvirt/libvirt-domain.h | 30 +++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 5152ed4551..40b6b19495 100644 --- a/include/libvirt

Re: [PATCH 3/4] qemu: support set parallel migration compression method

2023-02-09 Thread Jiang Jiacheng
On 2023/2/7 23:37, Jiri Denemark wrote: > On Fri, Jan 20, 2023 at 16:47:42 +0800, Jiang Jiacheng wrote: >> Add 'qemuMigrationParamsSetParallelCompression' to support set >> parallel migration compression method. Depending on whether '--parallel' >>

Re: [PATCH 2/4] qemu: Add qemu parallel migration parameters

2023-02-09 Thread Jiang Jiacheng
On 2023/2/7 23:37, Jiri Denemark wrote: > On Fri, Jan 20, 2023 at 16:47:41 +0800, Jiang Jiacheng wrote: >> Add qemu migration parameters to support setting multifd >> migration compression method and level. >> >> Signed-off-by: Jiang Jiacheng >> --- >>

Re: [PATCH 1/4] Add public API for parallel compression method

2023-02-09 Thread Jiang Jiacheng
On 2023/2/7 23:36, Jiri Denemark wrote: > On Fri, Jan 20, 2023 at 16:47:40 +0800, Jiang Jiacheng wrote: >> Add description for VIR_MIGRATE_PARAM_COMPRESSION, it will >> be reused in choosing compression method during multifd migration. >> Add public API VIR_MIGRATE_PARAM_C

Re: [PATCH 4/4] virsh: Add migrate options to set parallel compress level

2023-01-29 Thread Jiang Jiacheng
On 2023/1/20 17:41, Claudio Fontana wrote: > On 1/20/23 09:47, Jiang Jiacheng wrote: >> Add migrate options: --compression-zlib-level >> --compression-zstd-level >> These options are used to set compress level for "zlib" >> or &q

Re: [PATCH V2 0/2] define g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-19 Thread Jiang Jiacheng
Ping... 在 2023/1/10 19:29, Jiang Jiacheng 写道: > Define and use g_autoptr() for virNWFilterDef and virNWFilterRuleDef, > and remove unnecessary label/variable. > > Those patches are followup with: > https://gitlab.com/libvirt/libvirt/-/commit/a9027d447be789cd11c0aa18ceb83ed79f677f

Re: [PATCH 1/3] Add public API for parallel compression method

2023-01-18 Thread Jiang Jiacheng
On 2023/1/18 0:13, Jiri Denemark wrote: > On Tue, Jan 17, 2023 at 21:58:39 +0800, Jiang Jiacheng wrote: >> >> >> On 2023/1/17 16:44, Claudio Fontana wrote: >>> Hi, >>> >>> On 1/16/23 14:42, Jiang Jiacheng wrote: >>&g

Re: [PATCH 1/3] Add public API for parallel compression method

2023-01-17 Thread Jiang Jiacheng
On 2023/1/17 16:44, Claudio Fontana wrote: > Hi, > > On 1/16/23 14:42, Jiang Jiacheng wrote: >> Add public API VIR_MIGRATE_PARAM_PARALLEL_COMPRESSION, >> VIR_MIGRATE_PARAM_PARALLEL_ZLIB_LEVEL, VIR_MIGRATE_PARAM_PARALLEL_ZSTD_LEVEL >> for migration APIs to support se

Re: [PATCH 0/3] migration: add qemu multifd migration options

2023-01-17 Thread Jiang Jiacheng
On 2023/1/17 16:32, Claudio Fontana wrote: > Hi, > > On 1/16/23 14:42, Jiang Jiacheng wrote: >> Add qemu multifd migration options to set multifd-compression >> multifd-zlib-level and multifd-zstd-level. > > I think what you are adding here is a new parallel compres

[PATCH 2/3] qemu: Add qemu parallel migration parameters

2023-01-16 Thread Jiang Jiacheng
Add qemu migration parameters to support setting multifd migration compression method and level. Those parameters has been supportted by QEMU since 5.0. Signed-off-by: Jiang Jiacheng --- src/qemu/qemu_migration.h| 3 +++ src/qemu/qemu_migration_params.c | 29

[PATCH 3/3] virsh: Add options for multifd migration compression

2023-01-16 Thread Jiang Jiacheng
Add multifd migration options: --parallel-compression --parallel-zlib-level --parallel-zstd-level Signed-off-by: Jiang Jiacheng --- docs/manpages/virsh.rst | 11 +-- tools/virsh-domain.c| 39

[PATCH 0/3] migration: add qemu multifd migration options

2023-01-16 Thread Jiang Jiacheng
Add qemu multifd migration options to set multifd-compression multifd-zlib-level and multifd-zstd-level. Jiang Jiacheng (3): Add public API for parallel compression method qemu: Add qemu parallel migration parameters virsh: Add options for multifd migration compression docs/manpages

[PATCH 1/3] Add public API for parallel compression method

2023-01-16 Thread Jiang Jiacheng
Add public API VIR_MIGRATE_PARAM_PARALLEL_COMPRESSION, VIR_MIGRATE_PARAM_PARALLEL_ZLIB_LEVEL, VIR_MIGRATE_PARAM_PARALLEL_ZSTD_LEVEL for migration APIs to support set compression method and compress level used during migration. Signed-off-by: Jiang Jiacheng --- include/libvirt/libvirt-domain.h

Re: [PATCH 01/12] migration/migration-pin: get migration pid for migration pin

2023-01-10 Thread Jiang Jiacheng
On 2023/1/10 19:44, Daniel P. Berrangé wrote: > On Tue, Jan 10, 2023 at 07:30:08PM +0800, Jiang Jiacheng wrote: >> >> >> On 2023/1/9 22:46, Daniel P. Berrangé wrote: >>> On Tue, Jan 03, 2023 at 09:08:20PM +0800, Jiang Jiacheng wrote: >>>> From: zhe

[PATCH V2 2/2] src/tests: use g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-10 Thread Jiang Jiacheng
Use g_autoptr() for virNWFilterDef and virNWFilterRuleDef and remove unnecessary label. Signed-off-by: Jiang Jiacheng --- src/conf/nwfilter_conf.c| 44 +++-- tests/nwfilterxml2xmltest.c | 22 +++ 2 files changed, 26 insertions(+), 40 deletions

[PATCH 1/2] conf: define g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-10 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/conf/nwfilter_conf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h index 1a38e4198c..7c09b3bcb9 100644 --- a/src/conf/nwfilter_conf.h +++ b/src/conf/nwfilter_conf.h @@ -522,9 +522,11 @@ struct

[PATCH V2 0/2] define g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-10 Thread Jiang Jiacheng
'nwfilterDefineXMLFlags' and 'virNWFilterObjListLoadConfig' Jiang Jiacheng (2): conf: define g_autoptr for virNWFilterDef and virNWFilterRuleDef src/tests: use g_autoptr for virNWFilterDef and virNWFilterRuleDef src/conf/nwfilter_conf.c| 44 +++

Re: [PATCH] conf: check vhost-user queues with vcpus

2023-01-10 Thread Jiang Jiacheng
question > below. > > On Thu, Dec 08, 2022 at 08:52:19PM +0800, Jiang Jiacheng wrote: >> With kernel without the ref patch, if queues > vcpus, interrupts >> will be centralized on one vcpu affecting guest performance. After >> the ref patch merged, the queues whose nu

Re: [PATCH 2/3] src/tests: use g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-10 Thread Jiang Jiacheng
On 2023/1/9 23:00, Ján Tomko wrote: > On a Monday in 2023, Jiang Jiacheng wrote: >> Use g_autoptr() for virNWFilterDef and virNWFilterRuleDef and remove >> unnecessary label. >> >> Signed-off-by: Jiang Jiacheng >> --- >&

Re: [PATCH 01/12] migration/migration-pin: get migration pid for migration pin

2023-01-10 Thread Jiang Jiacheng
On 2023/1/9 22:46, Daniel P. Berrangé wrote: > On Tue, Jan 03, 2023 at 09:08:20PM +0800, Jiang Jiacheng wrote: >> From: zhengchuan >> >> Firstly, we need to get migration pids, add >> virDomainMigrateGetMigrationPids() for migration pin. >> >> Sign

[PATCH 0/3] define g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-09 Thread Jiang Jiacheng
Define and use g_autoptr() for virNWFilterDef and virNWFilterRuleDef, and remove unnecessary label/variable. Those patches are followup with: https://gitlab.com/libvirt/libvirt/-/commit/a9027d447be789cd11c0aa18ceb83ed79f677f86 Jiang Jiacheng (3): conf: define g_autoptr for virNWFilterDef and

[PATCH 1/3] conf: define g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-09 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/conf/nwfilter_conf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h index 1a38e4198c..7c09b3bcb9 100644 --- a/src/conf/nwfilter_conf.h +++ b/src/conf/nwfilter_conf.h @@ -522,9 +522,11 @@ struct

[PATCH 3/3] virNWFilterSaveConfig: remove the unnecessary variable 'ret'

2023-01-09 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/conf/nwfilter_conf.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 382dafb13b..8d198a7bb1 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -2684,7

[PATCH 2/3] src/tests: use g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-09 Thread Jiang Jiacheng
Use g_autoptr() for virNWFilterDef and virNWFilterRuleDef and remove unnecessary label. Signed-off-by: Jiang Jiacheng --- src/conf/nwfilter_conf.c | 44 ++ src/conf/virnwfilterobj.c | 19 +++ src/nwfilter/nwfilter_driver.c | 7

Re: [PATCH 2/2] src/tests: use g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-09 Thread Jiang Jiacheng
On 2023/1/6 20:11, Michal Prívozník wrote: > On 1/6/23 10:58, Jiang Jiacheng wrote: >> Use g_autoptr() for virNWFilterDef and virNWFilterRuleDef and remove >> unnecessary label. >> >> Signed-off-by: Jiang Jiacheng >> --- >&g

[PATCH 1/2] conf: define g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-06 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/conf/nwfilter_conf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h index 1a38e4198c..7c09b3bcb9 100644 --- a/src/conf/nwfilter_conf.h +++ b/src/conf/nwfilter_conf.h @@ -522,9 +522,11 @@ struct

[PATCH 2/2] src/tests: use g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-06 Thread Jiang Jiacheng
Use g_autoptr() for virNWFilterDef and virNWFilterRuleDef and remove unnecessary label. Signed-off-by: Jiang Jiacheng --- src/conf/nwfilter_conf.c | 44 ++ src/conf/virnwfilterobj.c | 19 +++ src/nwfilter/nwfilter_driver.c | 7

[PATCH 0/2] define g_autoptr for virNWFilterDef and virNWFilterRuleDef

2023-01-06 Thread Jiang Jiacheng
Define and use g_autoptr() for virNWFilterDef and virNWFilterRuleDef, and remove unnecessary label. Jiang Jiacheng (2): conf: define g_autoptr for virNWFilterDef and virNWFilterRuleDef src/tests: use g_autoptr for virNWFilterDef and virNWFilterRuleDef src/conf/nwfilter_conf.c | 44

[PATCH 3/9] locking: use g_autofree and remove unnecessary label

2023-01-06 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/locking/lock_driver_lockd.c | 36 +--- src/locking/lock_driver_sanlock.c | 46 --- 2 files changed, 31 insertions(+), 51 deletions(-) diff --git a/src/locking/lock_driver_lockd.c b/src/locking

[PATCH 9/9] vz: use g_autofree and remove unnecessary label

2023-01-06 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/vz/vz_utils.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c index fcf6d363a9..219d13823b 100644 --- a/src/vz/vz_utils.c +++ b/src/vz/vz_utils.c @@ -151,7 +151,8 @@ vzInitCaps

[PATCH 8/9] vmware: use g_autofree and remove unnecessary label

2023-01-06 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/vmware/vmware_conf.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c index 80a85f4d0f..5703ce717e 100644 --- a/src/vmware/vmware_conf.c +++ b/src/vmware

[PATCH 7/9] util: use g_autofree and remove unnecessary label

2023-01-06 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/util/virconf.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/src/util/virconf.c b/src/util/virconf.c index 8a96805642..c39489973b 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -716,7 +716,7

[PATCH 5/9] rpc: use g_autofree and remove unnecessary label

2023-01-06 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/rpc/virnetclientprogram.c | 6 ++ src/rpc/virnettlscontext.c| 16 +--- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/rpc/virnetclientprogram.c b/src/rpc/virnetclientprogram.c index 5da118bfd3..b93c495347 100644

[PATCH 2/9] interface: use g_autofree and remove unnecessary label

2023-01-06 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/interface/interface_backend_udev.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c index 979f187d87..54b43fb999 100644 --- a/src

[PATCH 4/9] remote: use g_autofree and remove unnecessary label

2023-01-06 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/remote/remote_driver.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index b0dba9057b..316a11b10f 100644 --- a/src/remote/remote_driver.c +++ b/src/remote

[PATCH V2 0/9] use g_autofree

2023-01-06 Thread Jiang Jiacheng
Use g_autofree more often and remove unnecessary cleanup/error labels. diff to v1: * use g_autofree for uuid in 'virNWFilterDefParseXML' * remove unused rc in security_apparmor.c Jiang Jiacheng (9): conf: use g_autofree and remove unnecessary label interface: use g_autofree

[PATCH V2 6/9] security: use g_autofree and remove unnecessary label

2023-01-06 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/security/security_apparmor.c | 94 +++- 1 file changed, 31 insertions(+), 63 deletions(-) diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 36e8ce42b5..b63b248975 100644 --- a/src/security

[PATCH V2 1/9] conf: use g_autofree and remove unnecessary label

2023-01-06 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/conf/domain_audit.c | 121 ++- src/conf/node_device_util.c | 49 + src/conf/nwfilter_conf.c | 55 +- src/conf/virnetworkobj.c | 85 -- src/conf

Re: [PATCH 6/9] security: use g_autofree and remove unnecessary label

2023-01-06 Thread Jiang Jiacheng
On 2023/1/6 1:45, Jonathon Jongsma wrote: > On 1/5/23 6:26 AM, Jiang Jiacheng wrote: > > ... > > >> @@ -476,33 +459,29 @@ >> AppArmorGetSecurityProcessLabel(virSecurityManager *mgr G_GNUC_UNUSED, >>   { >>   int rc = -1; > > 'rc'

Re: [PATCH 1/9] conf: use g_autofree and remove unnecessary label

2023-01-06 Thread Jiang Jiacheng
On 2023/1/6 1:33, Jonathon Jongsma wrote: > On 1/5/23 6:26 AM, Jiang Jiacheng wrote: >> Signed-off-by: Jiang Jiacheng > > ... > >> diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c >> index 9a95ae6c12..39f36ca29d 100644 >> --- a/src/co

[PATCH 3/9] locking: use g_autofree and remove unnecessary label

2023-01-05 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/locking/lock_driver_lockd.c | 36 +--- src/locking/lock_driver_sanlock.c | 46 --- 2 files changed, 31 insertions(+), 51 deletions(-) diff --git a/src/locking/lock_driver_lockd.c b/src/locking

[PATCH 7/9] util: use g_autofree and remove unnecessary label

2023-01-05 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/util/virconf.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/src/util/virconf.c b/src/util/virconf.c index 8a96805642..c39489973b 100644 --- a/src/util/virconf.c +++ b/src/util/virconf.c @@ -716,7 +716,7

[PATCH 5/9] rpc: use g_autofree and remove unnecessary label

2023-01-05 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/rpc/virnetclientprogram.c | 6 ++ src/rpc/virnettlscontext.c| 16 +--- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/rpc/virnetclientprogram.c b/src/rpc/virnetclientprogram.c index 5da118bfd3..b93c495347 100644

[PATCH 9/9] vz: use g_autofree and remove unnecessary label

2023-01-05 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/vz/vz_utils.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c index fcf6d363a9..219d13823b 100644 --- a/src/vz/vz_utils.c +++ b/src/vz/vz_utils.c @@ -151,7 +151,8 @@ vzInitCaps

[PATCH 2/9] interface: use g_autofree and remove unnecessary label

2023-01-05 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/interface/interface_backend_udev.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c index 979f187d87..54b43fb999 100644 --- a/src

[PATCH 8/9] vmware: use g_autofree and remove unnecessary label

2023-01-05 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/vmware/vmware_conf.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/src/vmware/vmware_conf.c b/src/vmware/vmware_conf.c index 80a85f4d0f..5703ce717e 100644 --- a/src/vmware/vmware_conf.c +++ b/src/vmware

[PATCH 4/9] remote: use g_autofree and remove unnecessary label

2023-01-05 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/remote/remote_driver.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index b0dba9057b..316a11b10f 100644 --- a/src/remote/remote_driver.c +++ b/src/remote

[PATCH 6/9] security: use g_autofree and remove unnecessary label

2023-01-05 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/security/security_apparmor.c | 91 +++- 1 file changed, 31 insertions(+), 60 deletions(-) diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 36e8ce42b5..64b57f6a22 100644 --- a/src/security

[PATCH 1/9] conf: use g_autofree and remove unnecessary label

2023-01-05 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/conf/domain_audit.c | 121 ++- src/conf/node_device_util.c | 49 + src/conf/nwfilter_conf.c | 51 - src/conf/virnetworkobj.c | 85 -- src/conf

[PATCH 0/9] use g_autofree

2023-01-05 Thread Jiang Jiacheng
Use g_autofree more often and remove unnecessary cleanup/error labels. Jiang Jiacheng (9): conf: use g_autofree and remove unnecessary label interface: use g_autofree and remove unnecessary label locking: use g_autofree and remove unnecessary label remote: use g_autofree and remove

[PATCH 0/3] fix some coding issues

2023-01-05 Thread Jiang Jiacheng
Jiang Jiacheng (3): qemu:fix a misspelling in log remote: fix misspelling in the documation of 'daemonCreateClientStream' storage/util: replace unnecessary while loop by if src/qemu/qemu_process.c | 2 +- src/remote/remote_daemon_stream.c | 4 ++-- src/storage/stor

[PATCH 3/3] storage/util: replace unnecessary while loop by if

2023-01-05 Thread Jiang Jiacheng
These while loops exit directly due to break after entering. Use if instead of these while loops. Signed-off-by: Jiang Jiacheng --- src/storage/storage_util.c | 4 +--- src/util/virutil.c | 6 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/storage

[PATCH 2/3] remote: fix misspelling in the documation of 'daemonCreateClientStream'

2023-01-05 Thread Jiang Jiacheng
Fix a misspelling in the documation of 'daemonCreateClientStream'. Signed-off-by: Jiang Jiacheng --- src/remote/remote_daemon_stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/remote/remote_daemon_stream.c b/src/remote/remote_daemon_stream.c index

[PATCH 1/3] qemu: fix a misspelling in log

2023-01-05 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index b6adcf2f2a..04d14e7eb0 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -7590,7 +7590,7

[PATCH 12/12] migration/migration-pin/multifd-pin: add migration pin status handle

2023-01-03 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- src/qemu/qemu_process.c | 56 + 1 file changed, 56 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1914aaa992..f5aff9db42 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu

[PATCH 10/12] migration/multifd-pin: add qemu monitor callback functions

2023-01-03 Thread Jiang Jiacheng
From: zhengchuan add qemu monitor callback functions Signed-off-by:zhengchuan --- src/qemu/qemu_monitor.c | 10 ++ src/qemu/qemu_monitor.h | 6 ++ src/qemu/qemu_monitor_json.c | 16 3 files changed, 32 insertions(+) diff --git a/src/qemu/qemu_monitor.c b

[PATCH 08/12] migration/multifd-pin: get multifd pid for migration pin

2023-01-03 Thread Jiang Jiacheng
From: zhengchuan Firstly, we need to get multifd pids, add virDomainMigrateGetMigrationMultiFdPids() for migration pin. Signed-off-by:zhengchuan --- include/libvirt/libvirt-domain.h | 2 ++ src/driver-hypervisor.h | 5 src/libvirt-domain.c | 40 ++

[PATCH 07/12] migration/migration-pin: add domainMigrationPid for qemuMonitorCallbacks

2023-01-03 Thread Jiang Jiacheng
From: zhengchuan add domainMigrationPid for qemuMonitorCallbacks Signed-off-by:zhengchuan --- src/qemu/qemu_process.c | 107 src/qemu/qemu_process.h | 7 +++ 2 files changed, 114 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_proce

[PATCH 03/12] migration/migration-pin: support migration thread pin by virsh command

2023-01-03 Thread Jiang Jiacheng
Signed-off-by: Jiang Jiacheng --- tools/virsh-domain.c | 69 1 file changed, 69 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 2d162cf8c0..e17c526850 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c

[PATCH 06/12] migration/migration-pin: get cpumap from migration.pin

2023-01-03 Thread Jiang Jiacheng
From: zhengchuan Add qemuProcessGetPcpumap to get cpumap from migration parameters when 'virsh migrationpin' is not called. Signed-off-by:zhengchuan --- src/qemu/qemu_process.c | 79 + src/qemu/qemu_process.h | 4 +++ 2 files changed, 83 insertions(+) d

[PATCH 11/12] migration/multifd-pin: support migration multifd thread pin

2023-01-03 Thread Jiang Jiacheng
From: zhengchuan support migration multifd thread pin by configuration. Signed-off-by:zhengchuan --- src/qemu/qemu_migration.c | 2 ++ src/qemu/qemu_process.c | 61 +++ src/qemu/qemu_process.h | 4 +++ 3 files changed, 67 insertions(+) diff --git a/src

[PATCH 01/12] migration/migration-pin: get migration pid for migration pin

2023-01-03 Thread Jiang Jiacheng
From: zhengchuan Firstly, we need to get migration pids, add virDomainMigrateGetMigrationPids() for migration pin. Signed-off-by:zhengchuan --- include/libvirt/libvirt-domain.h | 3 +++ src/driver-hypervisor.h | 5 src/libvirt-domain.c | 39 ++

[PATCH 04/12] migration/migration-pin: add qemu monitor callback functions

2023-01-03 Thread Jiang Jiacheng
From: zhengchuan add qemu monitor callback functions Signed-off-by:zhengchuan --- src/qemu/qemu_monitor.c | 10 ++ src/qemu/qemu_monitor.h | 7 +++ src/qemu/qemu_monitor_json.c | 16 3 files changed, 33 insertions(+) diff --git a/src/qemu/qemu_monitor.c

[PATCH 09/12] migration/multifd-pin: pin multifd pid by given cpumap

2023-01-03 Thread Jiang Jiacheng
From: zhengchuan Secondly, we start to pin multifd pid by given cpumap. Signed-off-by:zhengchuan --- src/qemu/qemu_driver.c | 20 1 file changed, 20 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 92049c5bcd..d4597489d5 100644 --- a/src/qem

[PATCH 00/12] migration/migrationpin:support migration pin

2023-01-03 Thread Jiang Jiacheng
process. New API 'pinMigrationThread' and virsh command 'virsh migrationpin' is used to pin migration thread to expected CPU list before or during migration. New migration param 'migration.pin' is used to support migration pin via interface 'virDomainMigrateToURI3

[PATCH 05/12] migration/migration-pin: add migrationpin for migration parameters

2023-01-03 Thread Jiang Jiacheng
From: zhengchuan Add a migrationpin to the migration parameters of live migration to bind cores to the migration thread during VM migration. Signed-off-by:zhengchuan --- include/libvirt/libvirt-domain.h | 10 ++ src/qemu/qemu_domain.c | 1 + src/qemu/qemu_domain.h |

[PATCH 02/12] migration/migration-pin: pin migration pid by given cpumap

2023-01-03 Thread Jiang Jiacheng
From: zhengchuan Secondly, we start to pin migration pid by given cpumap, add virDomainPinMigrationThread() for migration pin. Signed-off-by:zhengchuan --- include/libvirt/libvirt-domain.h | 4 ++ src/conf/domain_conf.c | 9 src/conf/domain_conf.h | 11 src/conf/

Re: [PATCH] qemu: fix several codecheck in qemu_monitor.c

2022-12-24 Thread Jiang Jiacheng
Ping... On 2022/12/8 20:49, Jiang Jiacheng wrote: > 1.clear passwd in debug log > 2.alignment > 3.use the same variable name for function definition and declaration > > Signed-off-by: Jiang Jiacheng > --- > src/qemu/qemu_monitor.c | 8 > src/qemu/qemu_monitor

Re: [PATCH] conf: check vhost-user queues with vcpus

2022-12-24 Thread Jiang Jiacheng
Ping... On 2022/12/8 20:49, Jiang Jiacheng wrote: > With kernel without the ref patch, if queues > vcpus, interrupts > will be centralized on one vcpu affecting guest performance. After > the ref patch merged, the queues whose number is greater than the > number of vcpus w

[PATCH] qemu: fix several codecheck in qemu_monitor.c

2022-12-08 Thread Jiang Jiacheng
1.clear passwd in debug log 2.alignment 3.use the same variable name for function definition and declaration Signed-off-by: Jiang Jiacheng --- src/qemu/qemu_monitor.c | 8 src/qemu/qemu_monitor.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/qemu

[PATCH] conf: check vhost-user queues with vcpus

2022-12-08 Thread Jiang Jiacheng
of vhost-user queues and vcpus. ref: https://patchwork.kernel.org/project/linux-scsi/cover/1553682995-5682-1-git-send-email-dongli.zh...@oracle.com/ Signed-off-by: Jiang Jiacheng --- src/conf/domain_validate.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/

Re: [PATCH 7/7] qemu: Reserve bootIndexSpecified when update device

2022-12-06 Thread Jiang Jiacheng
On 2022/11/22 23:53, Peter Krempa wrote: > On Thu, Nov 17, 2022 at 10:05:33 +0800, Jiang Jiacheng wrote: >> If the 'boot order' is not specified in the xml, we cancel its >> bootindex setting and set it to '0'. However, the bootIndexSpecified >> will be

Re: [PATCH 5/7] qemu: Support update net's bootindex

2022-12-06 Thread Jiang Jiacheng
On 2022/11/22 23:40, Peter Krempa wrote: > On Thu, Nov 17, 2022 at 10:05:31 +0800, Jiang Jiacheng wrote: >> Support to update the net's bootindex using 'virsh update-device'. >> Using flag --config or --persistent to change the boot index and the >> change

Re: [PATCH 6/7] qemu: Support add bootindex = 0 to boothash when its bootIndexSpecified is true

2022-12-06 Thread Jiang Jiacheng
On 2022/11/22 23:52, Peter Krempa wrote: > On Thu, Nov 17, 2022 at 10:05:32 +0800, Jiang Jiacheng wrote: >> Support add bootindex = 0 to boothash and return 0 if duplicated bootindex = >> 0 is set. >> It is nessary to add bootindex = 0 into boothash, otherwise libvirt w

Re: [PATCH 4/7] qemu: Support update disk's bootindex

2022-12-06 Thread Jiang Jiacheng
On 2022/11/22 23:17, Peter Krempa wrote: > On Thu, Nov 17, 2022 at 10:05:30 +0800, Jiang Jiacheng wrote: >> Support to update the disk's bootindex using 'virsh update-device'. >> Using flag --config or --persistent to change the boot index and the >> change

Re: [PATCH 3/7] qemu: Introduce qemuCheckBootIndex and qemuChangeDiskBootIndex API

2022-12-06 Thread Jiang Jiacheng
On 2022/11/22 23:06, Peter Krempa wrote: > On Thu, Nov 17, 2022 at 10:05:29 +0800, Jiang Jiacheng wrote: >> Introduce qemuCheckBootIndex to check the new bootindex and is it nessary >> to update the bootindex. Introduce qemuChangeDiskBootIndex to support update >> disk

Re: [PATCH 2/7] qemu: Add bootIndexSpecified and support set bootIndex to '0'

2022-12-06 Thread Jiang Jiacheng
On 2022/11/22 23:02, Peter Krempa wrote: > On Thu, Nov 17, 2022 at 10:05:28 +0800, Jiang Jiacheng wrote: >> Add a bool bootIndexSpecified into _virDomainDeviceInfo, which means whether >> the bootindex could be update or not. BootIndexSpecified will be set to >> true if bo

Re: [PATCH 1/7] qemu: Introduce qemuDomainChangeBootIndex API

2022-12-06 Thread Jiang Jiacheng
On 2022/11/22 22:36, Peter Krempa Wrote: > On Thu, Nov 17, 2022 at 10:05:27 +0800, Jiang Jiacheng wrote: >> Introduce qemuDomainChangeBootIndex api to support update device's bootindex. >> These function will be used in following patches to support change device's &g

[PATCH v2] coding-style: Use the same style in the 'struct option'

2022-11-21 Thread Jiang Jiacheng
Use same style in the 'struct option' as: struct option opt[] = { { a, b }, { a, b }, ... { a, b }, }; diff to v1: * use the same style in all the 'struct option' Signed-off-by: Jiang Jiacheng --- examples/c/domain/domtop.c | 10

[PATCH 0/2] Fix some coding issues

2022-11-19 Thread Jiang Jiacheng
*** BLURB HERE *** Jiang Jiacheng (2): qemu: convert the flags type to unsigned long coding-style: Use the same style in the same structure src/locking/lock_daemon.c | 12 ++-- src/logging/log_daemon.c | 12 ++-- src/qemu/qemu_migration.c | 4 ++-- src/remote

[PATCH 2/2] coding-style: Use the same style in the same structure

2022-11-19 Thread Jiang Jiacheng
Coding-style of members in the same structure should be unified. Signed-off-by: Jiang Jiacheng --- src/locking/lock_daemon.c | 12 ++-- src/logging/log_daemon.c | 12 ++-- src/remote/remote_daemon.c | 14 +++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff

[PATCH 1/2] qemu: convert the flags type to unsigned long

2022-11-19 Thread Jiang Jiacheng
The flags type is unsigend long but passed as unsigend int when invoke 'qemuMigrationSrcNBDStorageCopy'. Modify it to prevent data truncation. Signed-off-by: Jiang Jiacheng --- src/qemu/qemu_migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] cpu_arm: fix the compile warning of unexpected format

2022-11-16 Thread Jiang Jiacheng
These format are left unchanged when convert 'unsigned long' to 'unsigned long long', which caused compile warning. Signed-off-by: Jiang Jiacheng --- src/cpu/cpu_arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_ar

[PATCH 6/7] qemu: Support add bootindex = 0 to boothash when its bootIndexSpecified is true

2022-11-16 Thread Jiang Jiacheng
set duplicated bootindex = 0. Signed-off-by: Jiang Jiacheng --- src/conf/domain_postparse.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_postparse.c b/src/conf/domain_postparse.c index 9a3e8f494c..2ba3186561 100644 --- a/src/conf/domain_postparse.c

[PATCH 7/7] qemu: Reserve bootIndexSpecified when update device

2022-11-16 Thread Jiang Jiacheng
If the 'boot order' is not specified in the xml, we cancel its bootindex setting and set it to '0'. However, the bootIndexSpecified will be set to false because we cannot parse boot order from XML, so copy bootIndexSpecified from origin device when updating it. Signed-of

  1   2   >