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] Re: [PATCH 0 of 2 V5] libxc: checkpoint compression

To: "rshriram@xxxxxxxxx" <rshriram@xxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH 0 of 2 V5] libxc: checkpoint compression
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Tue, 8 Nov 2011 19:56:24 +0000
Cc: "brendan@xxxxxxxxx" <brendan@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Tue, 08 Nov 2011 11:57:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CAP8mzPPKM5UYaJEkNJkK1rAzO8EJE3jzM5ZG49n_iQziNF=3sw@xxxxxxxxxxxxxx>
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>
Organization: Citrix Systems, Inc.
References: <patchbomb.1320350703@xxxxxxxxxxxxxxxxxxx> <20147.55048.90214.665321@xxxxxxxxxxxxxxxxxxxxxxxx> <CAP8mzPM1Fxj6M5R+H79nKToSCxHxsMaq1CKN=csjRMMocG0LRA@xxxxxxxxxxxxxx> <CAP8mzPOqv9oiNyCRTSz9DaBDwB-MtOvPJ9+3xc5NwAepOgUm7w@xxxxxxxxxxxxxx> <1320771752.955.109.camel@xxxxxxxxxxxxxxxxxxxxxx> <CAP8mzPO49gNVbouAB8nehBRC4K7Q37O+FgX8bGR_3EHSY8p6JQ@xxxxxxxxxxxxxx> <1320772565.955.110.camel@xxxxxxxxxxxxxxxxxxxxxx> <CAP8mzPPZcU6H_EtadDZZ2aTwXMxxtAQntpFPZ7aQ1g5k1nSKcA@xxxxxxxxxxxxxx> <CAP8mzPPKM5UYaJEkNJkK1rAzO8EJE3jzM5ZG49n_iQziNF=3sw@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2011-11-08 at 19:41 +0000, Shriram Rajagopalan wrote:

> One alternative would be to add the xc_memalign function alone, that
> was removed by c/s 22520.

22520 is 22520:6df91a11dcb0 "libxc: remove comment obsoleted by addition
of hypercall bounce buffer." here. Did you mean 22312:9fad5e5e2fc1
(remember the cset number is not globally unique/stable, only the longer
node hash is)

I think putting xc_memalign back would be fine, better than the other
options we've discussed even.

I'd be tempted to do it as separate functions
tools/libxc/xc_{minios,netbsd,linux}.c rather than using #ifdef though.

(For my money you can ignore Solaris, it's been unmaintained for long
enough that I bet it doesn't even build now and there's no one we can
ask to even build test it).

> 
> -void *xc_memalign(size_t alignment, size_t size)
> -{
> -#if defined(_POSIX_C_SOURCE) && !defined(__sun__)
> -    int ret;
> -    void *ptr;
> -    ret = posix_memalign(&ptr, alignment, size);
> -    if (ret != 0)
> -        return NULL;
> -    return ptr;
> -#elif defined(__NetBSD__) || defined(__OpenBSD__)
> -    return valloc(size);
> -#else
> -    return memalign(alignment, size);
> -#endif
> -}
> -
> 
> shriram
>  
>         
>                 >
>                 > thanks
>                 > shriram
>                 >
>                 >
>                 >         Ian.
>                 >
>                 >         >
>                 >         >         shriram
>                 >         >
>                 >         >
>                 >         >
>                 >         > Ping.
>                 >         >
>                 >         >
>                 >         >         On Fri, Nov 4, 2011 at 5:14 AM,
>                 Ian Jackson
>                 >         >         <Ian.Jackson@xxxxxxxxxxxxx> wrote:
>                 >         >                 rshriram@xxxxxxxxx writes
>                 ("[PATCH 0 of 2
>                 >         V5] libxc:
>                 >         >                 checkpoint compression"):
>                 >         >                 > This patch series adds
>                 checkpoint
>                 >         compression
>                 >         >                 functionality, while
>                 >         >                 > running under Remus.
>                 >         >
>                 >         >                 ...
>                 >         >                 > Changes since last
>                 version:
>                 >         >                 > 1. use posix_memalign
>                 only on linux
>                 >         platforms and
>                 >         >                 switch to normal malloc
>                 for
>                 >         >                 >    the rest. stubdom
>                 compiles
>                 >         successfully.
>                 >         >
>                 >         >
>                 >         >                 Looking at this in more
>                 detail, I don't
>                 >         understand why
>                 >         >                 you're using
>                 >         >                 posix_memalign rather than
>                 just malloc,
>                 >         anyway.  If
>                 >         >                 it's necessary to
>                 >         >                 use posix_memalign on
>                 Linux, why is it OK to
>                 >         use
>                 >         >                 malloc on other
>                 >         >                 platforms ?
>                 >         >
>                 >         >                 Also this #ifdef is quite
>                 ugly.
>                 >         >
>                 >         >                 Ian.
>                 >         >
>                 >         >
>                 >         >
>                 >         >
>                 >
>                 >
>                 >
>                 >
>                 
>                 
>                 
>         
> 



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