4. Install libhugetlbfs
root@ubuntu:~# apt-get install libhugetlbfs*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libhugetlbfs-dev' for regex 'libhugetlbfs*'
Note, selecting 'libhugetlbfs0' for regex 'libhugetlbfs*'
Note, selecting 'libhugetlbfs-tests' for regex 'libhugetlbfs*'
The following extra packages will be installed:
hugepages
Suggested packages:
oprofile
The following NEW packages will be installed:
hugepages libhugetlbfs-dev libhugetlbfs-tests libhugetlbfs0
0 upgraded, 4 newly installed, 0 to remove and 56 not upgraded.
Need to get 526 kB of archives.
After this operation, 5,555 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com/ubuntu-ports/ trusty/universe libhugetlbfs0 ppc64el 2.17-0ubuntu2 [52.1 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports/ trusty/universe hugepages ppc64el 2.17-0ubuntu2 [45.0 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports/ trusty/universe libhugetlbfs-dev ppc64el 2.17-0ubuntu2 [48.6 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports/ trusty/universe libhugetlbfs-tests ppc64el 2.17-0ubuntu2 [381 kB]
Fetched 526 kB in 3s (171 kB/s)
Selecting previously unselected package libhugetlbfs0.
(Reading database ... 45325 files and directories currently installed.)
Preparing to unpack .../libhugetlbfs0_2.17-0ubuntu2_ppc64el.deb ...
Unpacking libhugetlbfs0 (2.17-0ubuntu2) ...
Selecting previously unselected package hugepages.
Preparing to unpack .../hugepages_2.17-0ubuntu2_ppc64el.deb ...
Unpacking hugepages (2.17-0ubuntu2) ...
Selecting previously unselected package libhugetlbfs-dev.
Preparing to unpack .../libhugetlbfs-dev_2.17-0ubuntu2_ppc64el.deb ...
Unpacking libhugetlbfs-dev (2.17-0ubuntu2) ...
Selecting previously unselected package libhugetlbfs-tests.
Preparing to unpack .../libhugetlbfs-tests_2.17-0ubuntu2_ppc64el.deb ...
Unpacking libhugetlbfs-tests (2.17-0ubuntu2) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up libhugetlbfs0 (2.17-0ubuntu2) ...
Setting up hugepages (2.17-0ubuntu2) ...
Setting up libhugetlbfs-dev (2.17-0ubuntu2) ...
Setting up libhugetlbfs-tests (2.17-0ubuntu2) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
root@ubuntu:~#
root@ubuntu:~#
5. performed 2 scenrio tests
Tests Performed:
===============
Scenario 1:
=========
Guests backed with hugepages
-------------------------------------------
All information about hugepages is still available. As per the patch provided in defect https://bugs.launchpad.net/tasty-taco/+bug/1295705, the hugepage data should not be available. However it doesn't seem to be the same.
This sceanrio as a result will be a FAIL.
Kindly do run through my patch application steps and let me know if the right steps have been followed or should I be choosing a different repo altogether.
Applied the proposed patch as follows:
1.Added below entry in /etc/apt/ source. list ports.ubuntu. com/ubuntu- ports/ trusty-proposed restricted main multiverse universe
deb http://
2. Did apt-get update
3. Check for libhugetlbfs
root@ubuntu:~# apt-cache policy libhugetlbfs* ports.ubuntu. com/ubuntu- ports/ trusty/universe ppc64el Packages ports.ubuntu. com/ubuntu- ports/ trusty/universe ppc64el Packages ports.ubuntu. com/ubuntu- ports/ trusty/universe ppc64el Packages
libhugetlbfs-dev:
Installed: (none)
Candidate: 2.17-0ubuntu2
Version table:
2.17-0ubuntu2 0
500 http://
libhugetlbfs0:
Installed: (none)
Candidate: 2.17-0ubuntu2
Version table:
2.17-0ubuntu2 0
500 http://
libhugetlbfs-tests:
Installed: (none)
Candidate: 2.17-0ubuntu2
Version table:
2.17-0ubuntu2 0
500 http://
root@ubuntu:~#
4. Install libhugetlbfs tests' for regex 'libhugetlbfs*' ports.ubuntu. com/ubuntu- ports/ trusty/universe libhugetlbfs0 ppc64el 2.17-0ubuntu2 [52.1 kB] ports.ubuntu. com/ubuntu- ports/ trusty/universe hugepages ppc64el 2.17-0ubuntu2 [45.0 kB] ports.ubuntu. com/ubuntu- ports/ trusty/universe libhugetlbfs-dev ppc64el 2.17-0ubuntu2 [48.6 kB] ports.ubuntu. com/ubuntu- ports/ trusty/universe libhugetlbfs-tests ppc64el 2.17-0ubuntu2 [381 kB] s0_2.17- 0ubuntu2_ ppc64el. deb ... 2.17-0ubuntu2_ ppc64el. deb ... s-dev_2. 17-0ubuntu2_ ppc64el. deb ... s-tests_ 2.17-0ubuntu2_ ppc64el. deb ...
root@ubuntu:~# apt-get install libhugetlbfs*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libhugetlbfs-dev' for regex 'libhugetlbfs*'
Note, selecting 'libhugetlbfs0' for regex 'libhugetlbfs*'
Note, selecting 'libhugetlbfs-
The following extra packages will be installed:
hugepages
Suggested packages:
oprofile
The following NEW packages will be installed:
hugepages libhugetlbfs-dev libhugetlbfs-tests libhugetlbfs0
0 upgraded, 4 newly installed, 0 to remove and 56 not upgraded.
Need to get 526 kB of archives.
After this operation, 5,555 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Fetched 526 kB in 3s (171 kB/s)
Selecting previously unselected package libhugetlbfs0.
(Reading database ... 45325 files and directories currently installed.)
Preparing to unpack .../libhugetlbf
Unpacking libhugetlbfs0 (2.17-0ubuntu2) ...
Selecting previously unselected package hugepages.
Preparing to unpack .../hugepages_
Unpacking hugepages (2.17-0ubuntu2) ...
Selecting previously unselected package libhugetlbfs-dev.
Preparing to unpack .../libhugetlbf
Unpacking libhugetlbfs-dev (2.17-0ubuntu2) ...
Selecting previously unselected package libhugetlbfs-tests.
Preparing to unpack .../libhugetlbf
Unpacking libhugetlbfs-tests (2.17-0ubuntu2) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up libhugetlbfs0 (2.17-0ubuntu2) ...
Setting up hugepages (2.17-0ubuntu2) ...
Setting up libhugetlbfs-dev (2.17-0ubuntu2) ...
Setting up libhugetlbfs-tests (2.17-0ubuntu2) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
root@ubuntu:~#
root@ubuntu:~#
5. performed 2 scenrio tests
Tests Performed:
===============
Scenario 1: ------- ------- ------- ------- ------- -
=========
Guests backed with hugepages
-------
1. On the Host: =1000
[root@lep8b ubuntu_ga]# sysctl vm.nr_hugepages
vm.nr_hugepages = 1000
[root@lep8b ubuntu_ga]# cat /proc/meminfo | grep -i Huge
HugePages_Total: 1000
HugePages_Free: 1000
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 16384 kB
2. make an entry for Hugepages in guest XML
Add the lines
<memoryBacking>
<hugepages/>
</memoryBacking>
3. Spawn the guest
4. root@ubuntu:~# cat /proc/meminfo | grep -i Huge
AnonHugePages: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 16384 kB
root@ubuntu:~#
5. root@ubuntu: /usr/lib/ libhugetlbfs/ tests# mkdir -p /mnt/hugetlbfs /usr/lib/ libhugetlbfs/ tests# mount -t hugetlbfs none /mnt/hugetlbfs /usr/lib/ libhugetlbfs/ tests# /usr/lib/ libhugetlbfs/ tests# mount | grep -i Huge
root@ubuntu:
root@ubuntu:
root@ubuntu:
none on /mnt/hugetlbfs type hugetlbfs (rw)
6. root@ubuntu: /usr/lib/ libhugetlbfs/ tests# sysctl vm.nr_hugepages=120 /usr/lib/ libhugetlbfs/ tests# cat /proc/meminfo | grep -i huge /usr/lib/ libhugetlbfs/ tests# ./run_tests.py segment (16M: 64): PASS
vm.nr_hugepages = 120
root@ubuntu:
AnonHugePages: 0 kB
HugePages_Total: 120
HugePages_Free: 120
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 16384 kB
root@ubuntu:
run_tests.py: The 32 bit word size is not compatible with 16M pages
zero_filesize_
test_root (16M: 64): PASS
meminfo_nohuge (16M: 64): PASS
gethugepagesize (16M: 64): PASS
gethugepagesizes (16M: 64): PASS
HUGETLB_VERBOSE=1 empty_mounts (16M: 64): PASS
HUGETLB_VERBOSE=1 large_mounts (16M: 64): PASS
find_path (16M: 64): PASS
unlinked_fd (16M: 64): PASS
readback (16M: 64): PASS
truncate (16M: 64): PASS
shared (16M: 64): PASS
mprotect (16M: 64): PASS
This Sceanrio is PASS.
Sceanrio 2: ------- ------- ------- ------- ------- -------
============
Guests not backed with hugepages
-------
1. On the host
[root@lep8b ubuntu_ga]# cat /proc/meminfo | grep -i Huge
HugePages_Total: 1000
HugePages_Free: 1000
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 16384 kB
[root@lep8b ubuntu_ga]#
2. Do not provide any information about backing guests in the XML.
3. Spawn the guest.
4. root@ubuntu:~# cat /proc/meminfo | grep -i huge
AnonHugePages: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 64 kB
root@ubuntu: /proc/sys/ vm# cat nr_hugepages /proc/sys/ vm# ls kbytes laptop_mode oom_dump_tasks allocating_ task reserve_ ratio overcommit_memory d_bytes max_map_count overcommit_ratio d_ratio min_free_kbytes page-cluster centisecs min_unmapped_ratio percpu_ pagelist_ fraction e_pages _centisecs nr_hugepages stat_interval mempolicy swappiness hugepages user_reserve_kbytes treat_as_ movable nr_pdflush_threads vfs_cache_pressure /proc/sys/ vm# cat nr_hugepages
0
root@ubuntu:
admin_reserve_
block_dump legacy_va_layout oom_kill_
compact_memory lowmem_
dirty_backgroun
dirty_backgroun
dirty_bytes min_slab_ratio panic_on_oom
dirty_expire_
dirty_ratio mmap_min_addr scan_unevictabl
dirty_writeback
drop_caches nr_hugepages_
extfrag_threshold nr_overcommit_
hugepages_
hugetlb_shm_group numa_zonelist_order zone_reclaim_mode
root@ubuntu:
All information about hugepages is still available. As per the patch provided in defect https:/ /bugs.launchpad .net/tasty- taco/+bug/ 1295705, the hugepage data should not be available. However it doesn't seem to be the same.
This sceanrio as a result will be a FAIL.
Kindly do run through my patch application steps and let me know if the right steps have been followed or should I be choosing a different repo altogether.