All of lore.kernel.org
 help / color / mirror / Atom feed
* Stale Xenstore entries after start of domU with stubdom
@ 2016-12-23 13:36 Juergen Gross
  2016-12-29 16:36 ` [PATCH] libxl: fix libxl_set_memory_target Wei Liu
  2017-01-03 11:38 ` Stale Xenstore entries after start of domU with stubdom Ian Jackson
  0 siblings, 2 replies; 4+ messages in thread
From: Juergen Gross @ 2016-12-23 13:36 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Ian Jackson

Anyone an idea why I have additional stale Xenstore entries each time
I've started a new domU with a stubdom? After 4 such starts I have:

vm = ""
 00000000-0100-0000-fd7f-0000489bdb5a = ""
  memory = "6651"
 00000000-0100-0000-fc7f-000048dbe98a = ""
  memory = "6651"
 00000000-0100-0000-ff7f-0000482b19f9 = ""
  memory = "6651"
 00000000-0100-0000-ff7f-000048ebcf93 = ""
  memory = "6651"

The "memory" size reported is the same as for dom0.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* [PATCH] libxl: fix libxl_set_memory_target
  2016-12-23 13:36 Stale Xenstore entries after start of domU with stubdom Juergen Gross
@ 2016-12-29 16:36 ` Wei Liu
  2017-01-03 11:50   ` [PATCH] libxl: fix libxl_set_memory_target [and 1 more messages] Ian Jackson
  2017-01-03 11:38 ` Stale Xenstore entries after start of domU with stubdom Ian Jackson
  1 sibling, 1 reply; 4+ messages in thread
From: Wei Liu @ 2016-12-29 16:36 UTC (permalink / raw)
  To: Xen-devel; +Cc: Juergen Gross, Ian Jackson, Wei Liu

Commit 26dbc93a ("libxl: Remove pointless hypercall from
libxl_set_memory_target") removed the call to xc_domain_getinfolist, but
it failed to notice that "info" was actually needed later.

Put that back. While at it, make the code conform to coding style
requirement.

Reported-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Juergen Gross <jgross@suse.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>

I'm not really sure how useful it is to store memory information under
/vm path. For now let's err on the safe side.

Should be backported to 4.7 and 4.8.
---
 tools/libxl/libxl.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 6fd4fe1..2f83731 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -4308,6 +4308,13 @@ retry_transaction:
     libxl__xs_printf(gc, t, GCSPRINTF("%s/memory/target", dompath),
                      "%"PRIu64, new_target_memkb);
 
+    r = xc_domain_getinfolist(ctx->xch, domid, 1, &info);
+    if (r != 1 || info.domain != domid) {
+        abort_transaction = 1;
+        rc = ERROR_FAIL;
+        goto out;
+    }
+
     libxl_dominfo_init(&ptr);
     xcinfo2xlinfo(ctx, &info, &ptr);
     uuid = libxl__uuid2string(gc, ptr.uuid);
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: Stale Xenstore entries after start of domU with stubdom
  2016-12-23 13:36 Stale Xenstore entries after start of domU with stubdom Juergen Gross
  2016-12-29 16:36 ` [PATCH] libxl: fix libxl_set_memory_target Wei Liu
@ 2017-01-03 11:38 ` Ian Jackson
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2017-01-03 11:38 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel, Wei Liu

Juergen Gross writes ("Stale Xenstore entries after start of domU with stubdom"):
> Anyone an idea why I have additional stale Xenstore entries each time
> I've started a new domU with a stubdom? After 4 such starts I have:
> 
> vm = ""
>  00000000-0100-0000-fd7f-0000489bdb5a = ""
>   memory = "6651"
>  00000000-0100-0000-fc7f-000048dbe98a = ""
>   memory = "6651"
>  00000000-0100-0000-ff7f-0000482b19f9 = ""
>   memory = "6651"
>  00000000-0100-0000-ff7f-000048ebcf93 = ""
>   memory = "6651"
> 
> The "memory" size reported is the same as for dom0.

What is the uuid ?  It's probably the stubdom or the main domain.
(Try `xl list -l'.)

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

* Re: [PATCH] libxl: fix libxl_set_memory_target [and 1 more messages]
  2016-12-29 16:36 ` [PATCH] libxl: fix libxl_set_memory_target Wei Liu
@ 2017-01-03 11:50   ` Ian Jackson
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2017-01-03 11:50 UTC (permalink / raw)
  To: Wei Liu; +Cc: Juergen Gross, Xen-devel

Ian Jackson writes ("Re: Stale Xenstore entries after start of domU with stubdom"):
> What is the uuid ?  It's probably the stubdom or the main domain.
> (Try `xl list -l'.)

Never mind, I have just realised that Wei's patch (below) is a reply
to this.

Wei Liu writes ("[PATCH] libxl: fix libxl_set_memory_target"):
> Commit 26dbc93a ("libxl: Remove pointless hypercall from
> libxl_set_memory_target") removed the call to xc_domain_getinfolist, but
> it failed to notice that "info" was actually needed later.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

And applied.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2017-01-03 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-23 13:36 Stale Xenstore entries after start of domU with stubdom Juergen Gross
2016-12-29 16:36 ` [PATCH] libxl: fix libxl_set_memory_target Wei Liu
2017-01-03 11:50   ` [PATCH] libxl: fix libxl_set_memory_target [and 1 more messages] Ian Jackson
2017-01-03 11:38 ` Stale Xenstore entries after start of domU with stubdom Ian Jackson

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.