superpages in Xen
Материал из Xgu.ru
Пример запущенного гостевого домена с поддержкой HUGE-страниц.
(64 xen, 32 разрядное ядро)
%# sysctl -w vm.nr_hugepages=40 ; grep -i huge /proc/meminfo vm.nr_hugepages = 40 HugePages_Total: 40 HugePages_Free: 40 HugePages_Rsvd: 0 Hugepagesize: 2048 kB
Патч для Xen (присутствует в xen-3.5-unstable)
This patch try to allocate 2M pages on target side based on analysis of pfn sequence sent from source side for HVM migration. This patch is also friendly to PV guest migration.
Патч для linux-2.6.18-xen
----------- [cut here ] --------- [please bite here ] --------- Kernel BUG at ...8-xen.hg/arch/x86_64/mm/../../i386/mm/hypervisor.c:61 invalid opcode: 0000 [1] SMP CPU 0 Modules linked in: ext3 jbd dm_mod raid1 processor Pid: 2067, comm: mysqld Not tainted 2.6.18.8amd64-xen #1 RIP: e030:[<ffffffff8021d7dd>] [<ffffffff8021d7dd>] xen_l2_entry_update+0x99/0xa8 RSP: e02b:ffff88037ffad968 EFLAGS: 00010282 RAX: 00000000ffffffea RBX: 800000067a37b0e7 RCX: 0000000260fb14a8 RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff88037ffad968 RBP: ffff880011e9c000 R08: 0000000000000002 R09: ffffffff80483682 R10: 0000000000007ff0 R11: ffff88037ffaddd8 R12: ffff880011e95000 R13: ffff8803fdc33360 R14: ffff88037b957678 R15: ffff88037b1c1480 FS: 00002b798f70f810(0000) GS:ffffffff804ea000(0000) knlGS:0000000000000000 CS: e033 DS: 0000 ES: 0000 Process mysqld (pid: 2067, threadinfo ffff88037ffac000, task ffff8803fdcd3820) Stack: 0000000260fb14a8 800000067a37b0e7 800000067a37b027 ffffffff8027a5a5 00000000000280d2 000000017b1c14e0 ffff88037b2024a8 00002b7992a00000 0000000000000000 0000000000000000 ffff88037b2024a8 ffff88037b1c1480 Call Trace: [<ffffffff8027a5a5>] hugetlb_no_page+0x1e3/0x261 [<ffffffff8027a678>] hugetlb_fault+0x55/0xb4 [<ffffffff8026b4d3>] __handle_mm_fault+0x5d/0x1196 [<ffffffff802848cc>] __find_get_block_slow+0xec/0xf8 [<ffffffff80284c8e>] __find_get_block+0x21a/0x22c [<ffffffff8021aac8>] do_page_fault+0xb8b/0xef7 [<ffffffff80209d73>] error_exit+0x0/0x71 [<ffffffff8025cfe2>] file_read_actor+0x0/0xf2 [<ffffffff8025d007>] file_read_actor+0x25/0xf2 [<ffffffff80263d63>] activate_page+0x24/0xd2 [<ffffffff8025e3bf>] do_generic_mapping_read+0x176/0x3e7 [<ffffffff8025cfe2>] file_read_actor+0x0/0xf2 [<ffffffff8025fb71>] __generic_file_aio_read+0x16b/0x1b1 [<ffffffff8025fd58>] generic_file_aio_read+0x34/0x39 [<ffffffff8028296a>] do_sync_read+0xfa/0x139 [<ffffffff802f186a>] __up_read+0x13/0x8d [<ffffffff80243d74>] autoremove_wake_function+0x0/0x2e [<ffffffff802834e2>] vfs_read+0xce/0x174 [<ffffffff802835df>] sys_pread64+0x57/0x77 [<ffffffff80209d73>] error_exit+0x0/0x71 [<ffffffff80209634>] system_call+0x68/0x6d [<ffffffff802095cc>] system_call+0x0/0x6d Code: 0f 0b 68 01 dc 42 80 c2 3d 00 48 83 c4 18 c3 48 b8 ff ff ff RIP [<ffffffff8021d7dd>] xen_l2_entry_update+0x99/0xa8 RSP <ffff88037ffad968>
|
---|