lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130502180404.GA16489@phenom.dumpdata.com>
Date:	Thu, 2 May 2013 14:04:04 -0400
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	Stefano Stabellini <stefano.stabellini@...citrix.com>
Cc:	Daniel Kiper <daniel.kiper@...cle.com>,
	Ian Campbell <ijc@...lion.org.uk>,
	"carsten@...iers.de" <carsten@...iers.de>,
	"darren.s.shepherd@...il.com" <darren.s.shepherd@...il.com>,
	David Vrabel <david.vrabel@...rix.com>,
	Ian Jackson <Ian.Jackson@...citrix.com>,
	"james-xen@...gwall.me.uk" <james-xen@...gwall.me.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
	"Keir (Xen.org)" <keir@....org>, Dave.Scott@...citrix.com,
	Jonathan Ludlam <jonathan.ludlam@...citrix.com>
Subject: Re: [PATCH v2 2/2] xen/balloon: Enforce various limits on target

On Thu, May 02, 2013 at 12:34:32PM +0100, Stefano Stabellini wrote:
> On Tue, 30 Apr 2013, Daniel Kiper wrote:
> > > > > > +/*
> > > > > > + * Extra internal memory reserved by libxl.
> > > > > > + * Check tools/libxl/libxl_memory.txt file in Xen source for more details.
> > > > > > + */
> > > > > > +#define LIBXL_MAXMEM_CONSTANT_PAGES	(1024 * 1024 / PAGE_SIZE)
> > > > >
> > > > > I think we need to find a way to achieve your aims which doesn't require
> > > > > leaking internal implementation details of libxl into the guest kernels.
> > > > > What happens if libxl decides to double this?
> > > >
> > > > I agree that this is not elegant solution. However, if we would like to
> > > > be in line with docs/misc/libxl_memory.txt (this is correct path) this
> > > > is a must.
> > >
> > > I'm not sure about this, that file describes the toolstacks view of the
> > > memory in a system. That need not necessarily correspond with the
> > > guest's ideas (although you would hope it would be a superset).
> > >
> > > Surely it is logically wrong to bake toolstack specific knowledge in the
> > > guest? If someone can describe a meaningful semantic for this number in
> > > a toolstack independent way then perhaps it would be appropriate to do
> > > something with it. I've no idea, having looked at both the document and
> > > the code, what this value actually is.
> > 
> > This was added by commit 9905ac2b90a3e7cecd9e7dfe21c252362e7080b2
> > (libxenlight: implement libxl_set_memory_target). It was written
> > by Keir and signed off by Stefano (both are CCed here). Guys,
> > why did you added LIBXL_MAXMEM_CONSTANT? What does it mean?
> 
> libxl inherits the memory model from xapi.
> LIBXL_MAXMEM_CONSTANT corresponds to "extra internal" in xapi, an amount
> of memory that is not allocated to the domain but it is left as a slack
> on top of the actual memory target to determine the Xen maxmem.
> I believe it comes from empirical measurements and stress testing on the
> platform.

What is this 'slack' used for?

> The xapi guys, CC'ed, might have more insights on what exactly is.
> 
> 
> I dislike having to pull this "hack" into Linux, but if it is actually
> important to leave LIBXL_MAXMEM_CONSTANT unused, then it is worth doing.
> I would add a big comment on top saying:
> 
> "libxl seems to think that we need to leave LIBXL_MAXMEM_CONSTANT
> kilobytes unused, let's be gentle and do that."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ