* [PATCH 0/1] libxl: set stub domain size based on VRAM size
@ 2015-07-10 15:36 Eric Shelton
2015-07-10 15:36 ` [PATCH 1/1] " Eric Shelton
2015-07-10 15:58 ` [PATCH 0/1] " Samuel Thibault
0 siblings, 2 replies; 5+ messages in thread
From: Eric Shelton @ 2015-07-10 15:36 UTC (permalink / raw)
To: xen-devel
Cc: wei.liu2, ian.campbell, stefano.stabellini, ian.jackson,
samuel.thibault, Eric Shelton
I ran into crashes with qemu-traditional stub domain when 16 MB was
assigned to the stdvga virtual video adapter. These were occurring due
to an out of memory condition arising from stub domains having a fixed
size of 32 MB, with half of that being demanded for video. Assuming the
the original value of 32 MB was based on having a 4 MB video adapter,
this increases the stub domain size by however much the VRAM exceeds 4 MB.
Eric Shelton (1):
libxl: set stub domain size based on VRAM size
tools/libxl/libxl_dm.c | 2 ++
1 file changed, 2 insertions(+)
--
2.1.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] libxl: set stub domain size based on VRAM size
2015-07-10 15:36 [PATCH 0/1] libxl: set stub domain size based on VRAM size Eric Shelton
@ 2015-07-10 15:36 ` Eric Shelton
2015-07-10 15:48 ` Ian Jackson
2015-07-10 15:59 ` Samuel Thibault
2015-07-10 15:58 ` [PATCH 0/1] " Samuel Thibault
1 sibling, 2 replies; 5+ messages in thread
From: Eric Shelton @ 2015-07-10 15:36 UTC (permalink / raw)
To: xen-devel
Cc: wei.liu2, ian.campbell, stefano.stabellini, ian.jackson,
samuel.thibault, Eric Shelton
Allocate additional memory to the stub domain for qemu-traditional if
more than 4 MB is assigned to the video adapter to avoid out of memory
condition for QEMU.
Signed-off-by: Eric Shelton <eshelton@pobox.com>
---
tools/libxl/libxl_dm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 317a8eb..9a5a937 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -1087,6 +1087,8 @@ void libxl__spawn_stub_dm(libxl__egc *egc, libxl__stub_dm_spawn_state *sdss)
dm_config->b_info.max_vcpus = 1;
dm_config->b_info.max_memkb = 32 * 1024;
+ if (guest_config->b_info.video_memkb > 4096)
+ dm_config->b_info.max_memkb += guest_config->b_info.video_memkb - 4096;
dm_config->b_info.target_memkb = dm_config->b_info.max_memkb;
dm_config->b_info.u.pv.features = "";
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 1/1] libxl: set stub domain size based on VRAM size
2015-07-10 15:36 ` [PATCH 1/1] " Eric Shelton
@ 2015-07-10 15:48 ` Ian Jackson
2015-07-10 15:59 ` Samuel Thibault
1 sibling, 0 replies; 5+ messages in thread
From: Ian Jackson @ 2015-07-10 15:48 UTC (permalink / raw)
To: Eric Shelton
Cc: xen-devel, ian.campbell, wei.liu2, samuel.thibault,
stefano.stabellini
Eric Shelton writes ("[PATCH 1/1] libxl: set stub domain size based on VRAM size"):
> Allocate additional memory to the stub domain for qemu-traditional if
> more than 4 MB is assigned to the video adapter to avoid out of memory
> condition for QEMU.
> dm_config->b_info.max_vcpus = 1;
> dm_config->b_info.max_memkb = 32 * 1024;
> + if (guest_config->b_info.video_memkb > 4096)
> + dm_config->b_info.max_memkb += guest_config->b_info.video_memkb - 4096;
Thanks for diagnosing this. This seems a reasonable approach to me.
I have only one small stylistic comment: please use max() as found in
libxl_internal.h.
Eg,
dm_config->b_info.max_memkb = 28 * 1024 +
max(guest_config->b_info.video_memkb, 4096);
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 1/1] libxl: set stub domain size based on VRAM size
2015-07-10 15:36 ` [PATCH 1/1] " Eric Shelton
2015-07-10 15:48 ` Ian Jackson
@ 2015-07-10 15:59 ` Samuel Thibault
1 sibling, 0 replies; 5+ messages in thread
From: Samuel Thibault @ 2015-07-10 15:59 UTC (permalink / raw)
To: Eric Shelton
Cc: xen-devel, wei.liu2, ian.jackson, ian.campbell,
stefano.stabellini
Eric Shelton, le Fri 10 Jul 2015 11:36:02 -0400, a écrit :
> Allocate additional memory to the stub domain for qemu-traditional if
> more than 4 MB is assigned to the video adapter to avoid out of memory
> condition for QEMU.
>
> Signed-off-by: Eric Shelton <eshelton@pobox.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> tools/libxl/libxl_dm.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
> index 317a8eb..9a5a937 100644
> --- a/tools/libxl/libxl_dm.c
> +++ b/tools/libxl/libxl_dm.c
> @@ -1087,6 +1087,8 @@ void libxl__spawn_stub_dm(libxl__egc *egc, libxl__stub_dm_spawn_state *sdss)
>
> dm_config->b_info.max_vcpus = 1;
> dm_config->b_info.max_memkb = 32 * 1024;
> + if (guest_config->b_info.video_memkb > 4096)
> + dm_config->b_info.max_memkb += guest_config->b_info.video_memkb - 4096;
> dm_config->b_info.target_memkb = dm_config->b_info.max_memkb;
>
> dm_config->b_info.u.pv.features = "";
> --
> 2.1.0
>
--
Samuel
Client: "This program has been successfully installed."
Vendeur (surpris): "Et où voyez-vous une erreur ?"
Client: "C'est << HAS BEEN >> !"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/1] libxl: set stub domain size based on VRAM size
2015-07-10 15:36 [PATCH 0/1] libxl: set stub domain size based on VRAM size Eric Shelton
2015-07-10 15:36 ` [PATCH 1/1] " Eric Shelton
@ 2015-07-10 15:58 ` Samuel Thibault
1 sibling, 0 replies; 5+ messages in thread
From: Samuel Thibault @ 2015-07-10 15:58 UTC (permalink / raw)
To: Eric Shelton
Cc: xen-devel, wei.liu2, ian.jackson, ian.campbell,
stefano.stabellini
Eric Shelton, le Fri 10 Jul 2015 11:36:01 -0400, a écrit :
> Assuming the the original value of 32 MB was based on having a 4 MB
> video adapter,
In my memory that was the case, yes.
Samuel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-10 15:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-10 15:36 [PATCH 0/1] libxl: set stub domain size based on VRAM size Eric Shelton
2015-07-10 15:36 ` [PATCH 1/1] " Eric Shelton
2015-07-10 15:48 ` Ian Jackson
2015-07-10 15:59 ` Samuel Thibault
2015-07-10 15:58 ` [PATCH 0/1] " Samuel Thibault
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).