From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Hao Xiang <hao.xiang@linux.dev>
Cc: marcandre.lureau@redhat.com, peterx@redhat.com, farosas@suse.de,
armbru@redhat.com, lvivier@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH v4 08/14] migration/multifd: Add new migration option for multifd DSA offloading.
Date: Thu, 25 Apr 2024 15:17:05 +0100 [thread overview]
Message-ID: <Zipl4WkTFgMr92NP@redhat.com> (raw)
In-Reply-To: <20240425022117.4035031-9-hao.xiang@linux.dev>
On Thu, Apr 25, 2024 at 02:21:11AM +0000, Hao Xiang wrote:
> Intel DSA offloading is an optional feature that turns on if
> proper hardware and software stack is available. To turn on
> DSA offloading in multifd live migration:
>
> multifd-dsa-accel="[dsa_dev_path1] [dsa_dev_path2] ... [dsa_dev_pathX]"
>
> This feature is turned off by default.
>
> Signed-off-by: Hao Xiang <hao.xiang@linux.dev>
> ---
> migration/migration-hmp-cmds.c | 8 ++++++++
> migration/options.c | 30 ++++++++++++++++++++++++++++++
> migration/options.h | 1 +
> qapi/migration.json | 26 +++++++++++++++++++++++---
> 4 files changed, 62 insertions(+), 3 deletions(-)
> diff --git a/qapi/migration.json b/qapi/migration.json
> index 8c65b90328..934fa8839e 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -914,6 +914,12 @@
> # See description in @ZeroPageDetection. Default is 'multifd'.
> # (since 9.0)
> #
> +# @multifd-dsa-accel: If enabled, use DSA accelerator offloading for
> +# certain memory operations. Enable DSA accelerator offloading by
> +# setting this string to a list of DSA device path separated by space
> +# characters. Setting this string to an empty string means disabling
> +# DSA accelerator offloading. Defaults to an empty string. (since 9.2)
Passing a list of paths as a single space separate string is a
design anti-pattern. This needs to use a list type at the QAPI
level.
Also I don't think we need add 'multifd' on the name - all
new features are for multifd.
Overall it should be called 'dsa-accel-path' I thjink
> @@ -1122,6 +1128,12 @@
> # See description in @ZeroPageDetection. Default is 'multifd'.
> # (since 9.0)
> #
> +# @multifd-dsa-accel: If enabled, use DSA accelerator offloading for
> +# certain memory operations. Enable DSA accelerator offloading by
> +# setting this string to a list of DSA device path separated by space
> +# characters. Setting this string to an empty string means disabling
> +# DSA accelerator offloading. Defaults to an empty string. (since 9.2)
> +#
> # Features:
> #
> # @deprecated: Member @block-incremental is deprecated. Use
> @@ -1176,7 +1188,8 @@
> 'features': [ 'unstable' ] },
> '*vcpu-dirty-limit': 'uint64',
> '*mode': 'MigMode',
> - '*zero-page-detection': 'ZeroPageDetection'} }
> + '*zero-page-detection': 'ZeroPageDetection',
> + '*multifd-dsa-accel': 'StrOrNull'} }
This needs to be
['str'] not 'StrOrNull'
>
> ##
> # @migrate-set-parameters:
> @@ -1354,6 +1367,12 @@
> # See description in @ZeroPageDetection. Default is 'multifd'.
> # (since 9.0)
> #
> +# @multifd-dsa-accel: If enabled, use DSA accelerator offloading for
> +# certain memory operations. Enable DSA accelerator offloading by
> +# setting this string to a list of DSA device path separated by space
> +# characters. Setting this string to an empty string means disabling
> +# DSA accelerator offloading. Defaults to an empty string. (since 9.2)
> +#
> # Features:
> #
> # @deprecated: Member @block-incremental is deprecated. Use
> @@ -1405,7 +1424,8 @@
> 'features': [ 'unstable' ] },
> '*vcpu-dirty-limit': 'uint64',
> '*mode': 'MigMode',
> - '*zero-page-detection': 'ZeroPageDetection'} }
> + '*zero-page-detection': 'ZeroPageDetection',
> + '*multifd-dsa-accel': 'str'} }
Liekewise needs to be
['str']
Having mgmt apps pass in the path every time though, feels like
overkill. Surely there's a standard path that QEMU should use
by default, and should only require flag to turn on its usage.
IOW, why not extend the ZeroPageDetection enum, to have a further
entry for 'dsa' to request ue of dsa accel. Passing paths could
be optional.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2024-04-25 14:18 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 2:21 [PATCH v4 00/14] Use Intel DSA accelerator to offload zero page checking in multifd live migration Hao Xiang
2024-04-25 2:21 ` [PATCH v4 01/14] meson: Introduce new instruction set enqcmd to the build system Hao Xiang
2024-04-25 18:50 ` Fabiano Rosas
2024-04-25 2:21 ` [PATCH v4 02/14] util/dsa: Add dependency idxd Hao Xiang
2024-04-25 20:33 ` Fabiano Rosas
2024-04-25 2:21 ` [PATCH v4 03/14] util/dsa: Implement DSA device start and stop logic Hao Xiang
2024-04-25 14:21 ` Daniel P. Berrangé
2024-04-25 14:25 ` Daniel P. Berrangé
2024-04-25 14:32 ` Daniel P. Berrangé
2024-04-25 21:22 ` Fabiano Rosas
2024-04-25 2:21 ` [PATCH v4 04/14] util/dsa: Implement DSA task enqueue and dequeue Hao Xiang
2024-04-25 20:55 ` Fabiano Rosas
2024-04-25 21:48 ` Fabiano Rosas
2024-04-25 2:21 ` [PATCH v4 05/14] util/dsa: Implement DSA task asynchronous completion thread model Hao Xiang
2024-04-25 2:21 ` [PATCH v4 06/14] util/dsa: Implement zero page checking in DSA task Hao Xiang
2024-04-25 2:21 ` [PATCH v4 07/14] util/dsa: Implement DSA task asynchronous submission and wait for completion Hao Xiang
2024-05-01 18:59 ` Peter Xu
2024-04-25 2:21 ` [PATCH v4 08/14] migration/multifd: Add new migration option for multifd DSA offloading Hao Xiang
2024-04-25 14:17 ` Daniel P. Berrangé [this message]
2024-04-26 9:16 ` Markus Armbruster
2024-04-25 2:21 ` [PATCH v4 09/14] migration/multifd: Prepare to introduce DSA acceleration on the multifd path Hao Xiang
2024-05-01 19:18 ` Peter Xu
2024-04-25 2:21 ` [PATCH v4 10/14] migration/multifd: Enable DSA offloading in multifd sender path Hao Xiang
2024-04-25 14:29 ` Daniel P. Berrangé
2024-04-25 15:39 ` Fabiano Rosas
2024-05-01 19:25 ` Peter Xu
2024-04-25 2:21 ` [PATCH v4 11/14] migration/multifd: Add migration option set packet size Hao Xiang
2024-05-01 19:36 ` Peter Xu
2024-04-25 2:21 ` [PATCH v4 12/14] migration/multifd: Enable set packet size migration option Hao Xiang
2024-04-25 2:21 ` [PATCH v4 13/14] util/dsa: Add unit test coverage for Intel DSA task submission and completion Hao Xiang
2024-04-25 2:21 ` [PATCH v4 14/14] migration/multifd: Add integration tests for multifd with Intel DSA offloading Hao Xiang
2024-05-01 19:54 ` [PATCH v4 00/14] Use Intel DSA accelerator to offload zero page checking in multifd live migration Peter Xu
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=Zipl4WkTFgMr92NP@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=farosas@suse.de \
--cc=hao.xiang@linux.dev \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).