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/
Home Products Support Community News


Re: [Xen-devel] [PATCH] libxc: lzma build fix

On Wed, 2011-01-26 at 17:27 +0000, Christoph Egger wrote: 
> On Wednesday 26 January 2011 17:16:11 Ian Jackson wrote:
> > Christoph Egger writes ("[Xen-devel] [PATCH] libxc: lzma build fix"):
> > > Attached patch lets libxc build with lzma support on NetBSD.
> > > NetBSD doesn't have sysconf(_SC_PHYS_PAGES).
> >
> > Can you please break this out into separate os-dependent code in an
> > appropriate different file ?  These kind of #ifdefs break up the code
> > and make it hard to see what's going on.
> Yes. Attached patch factors physmem() out into os-dependent files
> and renamed it to xc_get_physmem() to not pollute the namespace.

I see this has now been applied, which is my fault for putting this
aside to reply to later and then forgetting...

The physmem value calculated by this function is only used as an
argument to lzma_alone_decoder, it is divided by 3 to get the memory
limit for the decoder.

It's not clear to me why a userspace lzma decode would want to use that
particular value, what bearing it has on anything or why it would assume
it could use 1/3 of the total RAM in the system (potentially quite a
large amount of RAM) as opposed to any other limit number.

Why not just hardcode 32M or something? A quick scan through the
rdepends on Debian shows at least a couple of users doing so.


Xen-devel mailing list