Bug 162226

Summary: xen0 under-reports available memory
Product: [Fedora] Fedora Reporter: Joshua Fiske <fiskeja>
Component: xenAssignee: Rik van Riel <riel>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: itamar
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 2.6.12-1.1473 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-16 14:49:34 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Joshua Fiske 2005-06-30 20:29:51 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
When booting into the xen0 kernel, the system appears to lose a significant portion of my total RAM.  I should see (nearly?) identical results when performing a 'cat /proc/meminfo' regardless of which kernel I am booting into.



Version-Release number of selected component (if applicable):
xen-2-20050522

How reproducible:
Always

Steps to Reproduce:
1.  Boot into SMP kernel
2.  'cat /proc/meminfo'
3.  Reboot into xen0 kernel
3.  'cat /proc/meminfo' 
  

Actual Results:  Under SMP kernel:
MemTotal:      4153996 kB
...

Under xen0 kernel:
MemTotal:       903168 kB
...      



Expected Results:  Under XMP kernel:
MemTotal:      4153996 kB
...

Under xen0 kernel:
MemTotal:      4153996 kB
...

Additional info:

Just for reference sake, here are the versions of all xen related RPMs that I am running...

[root@localhost ~]# rpm -qa | grep xen
kernel-xen0-2.6.11-1.1369_FC4
kernel-xen0-devel-2.6.11-1.1369_FC4
xen-2-20050522
kernel-xenU-2.6.11-1.1369_FC4
kernel-xenU-devel-2.6.11-1.1369_FC4
Comment 1 Rik van Riel 2005-06-30 21:09:29 EDT
This is because the xen kernels do not have highmem enabled.

Note that the rest of the memory can still be used by the hypervisor, and for
guest domains.

Try "xm info" and check how much free memory you have.

I will enable highmem in future Xen kernels, but mostly to check what problems
that will give, since I do not expect it to work flawlessly...
Comment 2 Joshua Fiske 2005-07-01 09:51:02 EDT
The 2.6.11-1.1369_FC4xenU kernels also appear to be compiled without BIGMEM
support, which is kind of a bummer.  I allocated 1024M of ram to a domain in
it's /etc/xen/domain config file, but when the domain booted, it only reported
903948.  This will definitely prevent me from running a serious production-grade
system under Xen.
Comment 3 Itamar Reis Peixoto 2005-07-18 18:54:55 EDT
I have the same problem.

I have 4 gb of memory on the host.

When I try to create a xenU domain 

xm -c create my_domain 

the host machine crash!!!
Comment 4 Itamar Reis Peixoto 2005-07-18 19:29:30 EDT
 
[root@router xen]# xm list
Name              Id  Mem(MB)  CPU  State  Time(s)  Console
Domain-0           0      891    0  r----      9.0

[root@router xen]# xm info
system                 : Linux
host                   : router.ispbrasil.com.br
release                : 2.6.12-1.1398_FC4xen0
version                : #1 SMP Fri Jul 15 01:53:34 EDT 2005
machine                : i686
cores                  : 0
hyperthreads_per_core  : 2
cpu_mhz                : 2992
memory                 : 3806
free_memory            : 2876
[root@router xen]#



[root@router ~]# xm list
Name              Id  Mem(MB)  CPU  State  Time(s)  Console
Domain-0           0      891    0  r----      9.0

[root@router ~]# xm balloon 0 256
[root@router ~]# xm list
Name              Id  Mem(MB)  CPU  State  Time(s)  Console
Domain-0           0      256    0  r----     10.2


[root@router ~]# xm create -c ispbrasil
Using config file "/etc/xen/ispbrasil".

crashed !!!!

this is the /etc/xen/ispbrasil used to start xenU

kernel ="/boot/vmlinuz-2.6.12-1.1398_FC4xenU"
memory = 128
name = "ispbrasil"
nics = 1
disk = ['file:/vps/ispbrasil/root_fs.ext3,sda1,w','file:/vps/ispbrasil/swap.img,
sda2,w']
root = "/dev/sda1 ro"
Comment 5 Rik van Riel 2005-09-16 14:49:34 EDT
Newer xen kernels have highmem enabled.