Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jun 2014 16:28:16 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Roger Pau Monn? <roger.pau@citrix.com>
Cc:        virtualization@FreeBSD.org, "freebsd-xen@freebsd.org" <freebsd-xen@freebsd.org>, bryanv@FreeBSD.org
Subject:   Re: FreeBSD and memory balloon drivers
Message-ID:  <20140620132816.GH3991@kib.kiev.ua>
In-Reply-To: <53A40079.9000804@citrix.com>
References:  <53A40079.9000804@citrix.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--i+R2Fnv74iOC5F2I
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jun 20, 2014 at 11:35:53AM +0200, Roger Pau Monn? wrote:
> Hello,
>=20
> I've been looking into the Xen balloon driver, because I've experienced
> problems when ballooning memory down which AFAICT are also present in
> the VirtIO balloon driver. The problem I've experienced is that when
> ballooning memory down, we basically allocate a bunch of memory as
> WIRED, to make sure nobody tries to swap it do disk, since it will crash
> the kernel because the memory is not populated. Due to this massive
> amount of memory allocated as WIRED, user-space programs that try to use
> mlock will fail because we hit the limit in vm.max_wired.
>=20
> I'm not sure what's the best way to deal with this limitation, should
> vm.max_wired be changed from the balloon drivers when ballooning
> down/up? Is there anyway to remove the pages ballooned down from the
> memory accounting of wired pages?

You could change the type of pages the ballon driver is allocating.
Instead of wired pages, you may request unmanaged, by passing NULL object
to vm_page_alloc().  This would also save on the trie nodes for managing
the radix trie for the object.  There are still plinks or listq to
keep track of the allocated pages.

--i+R2Fnv74iOC5F2I
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJTpDbvAAoJEJDCuSvBvK1BgikP+gPdzLt8XtsevQkU8vfpCtJj
ZnRdVneYSdHC6JBe+wUI0eT4/gQ9bIUD8eHYeVrVSW4JG0Br4SrpU0fTigfHi14j
udk2+tcTmUFw7Ksx2l8L8qKGatWacZXZwF9adZfazvulwmMKmzou2bOcO9V9bBMb
8XgamaNFDldAl2KYyFP2k93ozuSTjgww1WhjooFcbhdlVgDDYzK+SNpk17BgDD+b
9FXjkiIKBNtH+xTznmL5zYAmrr4pCAy0MaOElawnR7oRlm0h9/9E49efm6jAcXrn
ntnkfzlScTSRBtk/ZxIMpkK87LUfY80VkGnSentkSAUBqqEr217Ifnqf/Kbn8Y0v
Zh0HGP2nF1J1TwqhEbsgQMGEBHjwzjx/vX39NX5pJfnCQ9Okb6mJMkzCR/8iIysI
mNgYa0EOzg5wo022GiO18iWinAhklYFhIc+rc65Ot9qOSq5Y2lhp1xks1HTEnuC6
ircTeK5do0II/boxvv5j3pefjnUEc39iwSuKuKx4enFDErN3tQjJ/G2NqdqfYPH7
rhl4UMX1X0vIxLraOT1ZNIlJupj1gSfuAxgcEMdl54Upx9nE8IeSfy0F8UN8Kj5n
js6brUwv06sHX9FUN5Ixo10ifZRqktzV9YcEEzaVYrTsM9+IFC3UgEt8QQ3CQubW
sphwPTjgF7JM8TWS+fWf
=dJ1f
-----END PGP SIGNATURE-----

--i+R2Fnv74iOC5F2I--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140620132816.GH3991>