All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/libxl: optimize domain creation skipping domain cpupool move
@ 2022-05-26  8:12 Luca Fancellu
  2022-05-27 13:46 ` Juergen Gross
  2022-06-01 10:31 ` Anthony PERARD
  0 siblings, 2 replies; 3+ messages in thread
From: Luca Fancellu @ 2022-05-26  8:12 UTC (permalink / raw)
  To: xen-devel
  Cc: bertrand.marquis, wei.chen, andrew.cooper3, Wei Liu,
	Anthony PERARD, Juergen Gross

Commit 92ea9c54fc81 ("arm/dom0less: assign dom0less guests to cpupools")
introduced a way to start a domain directly on a certain cpupool,
adding a "cpupool_id" member to struct xen_domctl_createdomain.

This was done to be able to start dom0less guests in different pools than
cpupool0, but the toolstack can benefit from it because it can now use
the struct member directly instead of creating the guest in cpupool0
and then moving it to the target cpupool.

Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
---
 tools/libs/light/libxl_create.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c
index 69ec405858a8..2339f09e95a6 100644
--- a/tools/libs/light/libxl_create.c
+++ b/tools/libs/light/libxl_create.c
@@ -633,6 +633,7 @@ int libxl__domain_make(libxl__gc *gc, libxl_domain_config *d_config,
             .max_maptrack_frames = b_info->max_maptrack_frames,
             .grant_opts = XEN_DOMCTL_GRANT_version(b_info->max_grant_version),
             .vmtrace_size = ROUNDUP(b_info->vmtrace_buf_kb << 10, XC_PAGE_SHIFT),
+            .cpupool_id = info->poolid,
         };
 
         if (info->type != LIBXL_DOMAIN_TYPE_PV) {
@@ -757,13 +758,6 @@ int libxl__domain_make(libxl__gc *gc, libxl_domain_config *d_config,
      */
     assert(libxl_domid_valid_guest(*domid));
 
-    ret = xc_cpupool_movedomain(ctx->xch, info->poolid, *domid);
-    if (ret < 0) {
-        LOGED(ERROR, *domid, "domain move fail");
-        rc = ERROR_FAIL;
-        goto out;
-    }
-
     dom_path = libxl__xs_get_dompath(gc, *domid);
     if (!dom_path) {
         rc = ERROR_FAIL;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tools/libxl: optimize domain creation skipping domain cpupool move
  2022-05-26  8:12 [PATCH] tools/libxl: optimize domain creation skipping domain cpupool move Luca Fancellu
@ 2022-05-27 13:46 ` Juergen Gross
  2022-06-01 10:31 ` Anthony PERARD
  1 sibling, 0 replies; 3+ messages in thread
From: Juergen Gross @ 2022-05-27 13:46 UTC (permalink / raw)
  To: Luca Fancellu, xen-devel
  Cc: bertrand.marquis, wei.chen, andrew.cooper3, Wei Liu, Anthony PERARD


[-- Attachment #1.1.1: Type: text/plain, Size: 705 bytes --]

On 26.05.22 10:12, Luca Fancellu wrote:
> Commit 92ea9c54fc81 ("arm/dom0less: assign dom0less guests to cpupools")
> introduced a way to start a domain directly on a certain cpupool,
> adding a "cpupool_id" member to struct xen_domctl_createdomain.
> 
> This was done to be able to start dom0less guests in different pools than
> cpupool0, but the toolstack can benefit from it because it can now use
> the struct member directly instead of creating the guest in cpupool0
> and then moving it to the target cpupool.
> 
> Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tools/libxl: optimize domain creation skipping domain cpupool move
  2022-05-26  8:12 [PATCH] tools/libxl: optimize domain creation skipping domain cpupool move Luca Fancellu
  2022-05-27 13:46 ` Juergen Gross
@ 2022-06-01 10:31 ` Anthony PERARD
  1 sibling, 0 replies; 3+ messages in thread
From: Anthony PERARD @ 2022-06-01 10:31 UTC (permalink / raw)
  To: Luca Fancellu
  Cc: xen-devel, bertrand.marquis, wei.chen, andrew.cooper3, Wei Liu,
	Juergen Gross

On Thu, May 26, 2022 at 09:12:30AM +0100, Luca Fancellu wrote:
> Commit 92ea9c54fc81 ("arm/dom0less: assign dom0less guests to cpupools")
> introduced a way to start a domain directly on a certain cpupool,
> adding a "cpupool_id" member to struct xen_domctl_createdomain.
> 
> This was done to be able to start dom0less guests in different pools than
> cpupool0, but the toolstack can benefit from it because it can now use
> the struct member directly instead of creating the guest in cpupool0
> and then moving it to the target cpupool.
> 
> Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-01 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26  8:12 [PATCH] tools/libxl: optimize domain creation skipping domain cpupool move Luca Fancellu
2022-05-27 13:46 ` Juergen Gross
2022-06-01 10:31 ` Anthony PERARD

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.