Xen guest total memory size smaller than specified in virtual configuration due to Xen balloon driver

Bug #1622567 reported by Dan Streetman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Precise by Dan Streetman

Bug Description

[Impact]

On virtual systems under Xen, the kernel does not correctly calculate the total amount of memory. This results in the system having slightly less memory available for use than the actual amount provided by Xen.

[Fix]

See first comment.

[Test Case]

Load a virtual Xen guest with the latest precise (3.2) kernel, and notice that its total memory is less than what is allocated in the Xen configuration. Also possible is to load a virtual Xen guest, with the exact same Xen guest config/parameters, with the latest trusty (3.13) kernel; on trusty and later, the total amount of memory is correctly detected.

[Regression Potential]

None known.

Revision history for this message
Dan Streetman (ddstreet) wrote :

This is fixed by commit:
c275a57f5ec3056f732843b11659d892235faff7 (xen/balloon: Set balloon's initial state to number of existing RAM pages)

which requires part of commit:
7ee3d4e8cd560500192d80ca84d7f15d6dee0807 (mm: introduce helper function mem_init_print_info() to simplify mem_init())

Changed in linux (Ubuntu):
status: New → Fix Released
Dan Streetman (ddstreet)
description: updated
Dan Streetman (ddstreet)
summary: - kernel does not calculate correct total memory size
+ Xen guest total memory size smaller than specified in virtual
+ configuration due to Xen balloon driver
Revision history for this message
Dan Streetman (ddstreet) wrote :

I verified this using an Amazon AWS HVM (Xen) precise medium instance; it had the full amount of memory only after booting a precise kernel with these patches.

Revision history for this message
Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-precise' to 'verification-done-precise'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-precise
Revision history for this message
Dan Streetman (ddstreet) wrote :

Verified fix using kernel 3.2.0-111.

Before patched kernel:

ubuntu@lp1622567:~$ uname -a
Linux lp1622567 3.2.0-110-virtual #151-Ubuntu SMP Tue Aug 30 14:46:28 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@lp1622567:~$ free
             total used free shared buffers cached
Mem: 3786332 146904 3639428 0 11224 43648
-/+ buffers/cache: 92032 3694300
Swap: 0 0 0

After patched kernel:

ubuntu@lp1622567:~$ uname -a
Linux lp1622567 3.2.0-111-virtual #153-Ubuntu SMP Wed Sep 21 21:49:22 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@lp1622567:~$ free
             total used free shared buffers cached
Mem: 4048476 147860 3900616 0 11612 43616
-/+ buffers/cache: 92632 3955844
Swap: 0 0 0

tags: added: verification-done-precise
removed: verification-needed-precise
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.