All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Christoph Egger <Christoph.Egger@amd.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH] libxc: lzma build fix
Date: Thu, 27 Jan 2011 19:54:35 +0000	[thread overview]
Message-ID: <1296158075.20804.41.camel@localhost.localdomain> (raw)
In-Reply-To: <201101261827.25727.Christoph.Egger@amd.com>


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.

Ian.

  parent reply	other threads:[~2011-01-27 19:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 15:22 [PATCH] libxc: lzma build fix Christoph Egger
2011-01-26 16:16 ` Ian Jackson
2011-01-26 17:27   ` Christoph Egger
2011-01-27 19:04     ` Ian Jackson
2011-01-27 19:54     ` Ian Campbell [this message]
2011-01-28 11:45       ` Ian Jackson
2011-01-28 18:51         ` Ian Jackson
2011-01-28 19:14           ` Ian Campbell
2011-01-28 19:38             ` Ian Jackson
2011-02-11 13:41           ` Jan Beulich
2011-02-11 13:53             ` Ian Campbell
2011-02-11 17:49               ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1296158075.20804.41.camel@localhost.localdomain \
    --to=ian.campbell@citrix.com \
    --cc=Christoph.Egger@amd.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.