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

[Xen-devel] Re: [Qemu-devel] [PATCH V9 10/16] xen: Introduce the Xen map

To: Anthony Liguori <anthony@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [Qemu-devel] [PATCH V9 10/16] xen: Introduce the Xen mapcache
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Thu, 27 Jan 2011 12:04:16 +0000
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>, Jun, QEMU-devel <qemu-devel@xxxxxxxxxx>, Nakajima <jun.nakajima@xxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
Delivery-date: Thu, 27 Jan 2011 04:06:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D40A946.2020903@xxxxxxxxxxxxx>
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: <1295965760-31508-1-git-send-email-anthony.perard@xxxxxxxxxx> <1295965760-31508-11-git-send-email-anthony.perard@xxxxxxxxxx> <4D40A946.2020903@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Wed, 26 Jan 2011, Anthony Liguori wrote:
> > +#ifdef MAPCACHE_DEBUG
> > +#  define DPRINTF(fmt, ...) do { \
> > +    fprintf(stderr, "xen_mapcache: " fmt, ## __VA_ARGS__); \
> > +} while (0)
> > +#else
> > +#  define DPRINTF(fmt, ...) do { } while (0)
> > +#endif
> > +
> > +#if defined(__i386__)
> > +#  define MAX_MCACHE_SIZE    0x40000000 /* 1GB max for x86 */
> > +#  define MCACHE_BUCKET_SHIFT 16
> > +#elif defined(__x86_64__)
> > +#  define MAX_MCACHE_SIZE    0x1000000000 /* 64GB max for x86_64 */
> > +#  define MCACHE_BUCKET_SHIFT 20
> > +#endif
> > +#define MCACHE_BUCKET_SIZE (1UL<<  MCACHE_BUCKET_SHIFT)
> >
> 
> This is pretty awful.  Set limits based on host address with, not based
> on i386 vs. x86_64.

Good point, actually we found a bug recently because of this.
We should choose the mapcache size depending on RLIMIT_AS.

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

<Prev in Thread] Current Thread [Next in Thread>