[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.