WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 4 of 4] xenpaging: initial libxl support

To: Olaf Hering <olaf@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 4 of 4] xenpaging: initial libxl support
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Mon, 7 Nov 2011 11:02:08 +0000
Cc: Dunlap <George.Dunlap@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, George, Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Delivery-date: Mon, 07 Nov 2011 03:06:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <ab5406a5b1d01e3828f0.1320245140@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1320245136@xxxxxxxxxxxx> <ab5406a5b1d01e3828f0.1320245140@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Wed, 2 Nov 2011, Olaf Hering wrote:
> diff -r a51d4fab351d -r ab5406a5b1d0 tools/libxl/libxl_create.c
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -429,6 +429,122 @@ retry_transaction:
>      return rc;
>  }
> 
> +static int create_xenpaging(libxl__gc *gc, char *dom_name, uint32_t domid,
> +                            libxl_domain_build_info *b_info)
> +{
> +    libxl__spawner_starting *buf_starting;
> +    libxl_string_list xpe = b_info->u.hvm.xenpaging_extra;
> +    int i, rc;
> +    char *logfile;
> +    int logfile_w, null;
> +    char *path, *dom_path, *value;
> +    char **args;
> +    char *xp;
> +    flexarray_t *xp_args;
> +    libxl_ctx *ctx = libxl__gc_owner(gc);
> +
> +    /* Nothing to do */
> +    if (!b_info->tot_memkb)
> +        return 0;

I think that using tot_memkb to store the actual memory target and then
checking whether is 0 to detect if paging is active/inactive is
confusing.
If tot_memkb is the pod target of the domain, we should be coherent and
set it equal to target_memkb when paging is inactive.


> @@ -34,6 +34,17 @@
>      libxl_domain_setmaxmem -> xen maximum
>      libxl_set_memory_target -> actual target
> 
> +    build maximum = RAM as seen inside the virtual machine
> +                    Guest OS has to configure itself for this amount of 
> memory
> +                    Increase/Decrease via memory hotplug of virtual hardware.
> +                   xl mem-max
> +    build start   = RAM usable by the guest OS
> +                    Guest OS sees balloon driver as memory hog
> +                    Increase/Decrease via commands to the balloon driver
> +                   xl mem-set
> +    actual target = RAM allocated for the guest
> +                    Increase/Decrease via commands to paging daemon
> +                   xl mem-paging_target (?)

maybe xl mem-paging is specific enough


>   === Domain memory breakdown: PV guests ==================================
> 
> diff -r a51d4fab351d -r ab5406a5b1d0 tools/libxl/libxl_types.idl
> --- a/tools/libxl/libxl_types.idl
> +++ b/tools/libxl/libxl_types.idl
> @@ -157,6 +157,7 @@ libxl_domain_build_info = Struct("domain
>      ("tsc_mode",        integer),
>      ("max_memkb",       uint32),
>      ("target_memkb",    uint32),
> +    ("tot_memkb",       uint32),
>      ("video_memkb",     uint32),
>      ("shadow_memkb",    uint32),
>      ("disable_migrate", bool),

I would like a comment somewhere of what tot_memkb is supposed to
represent.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel