Re: [XenPPC] [xenppc-unstable] [POWERPC][TOOLS] flatdevtree requires us to reserve the ramdisk
On Sep 17, 2006, at 3:10 PM, poff wrote: The changeset below solve the ramdisk freeing error we see on DomUs. This issue hit Dan consistently so we adjusted his Dom1 script to allocate more memory which allowed his linux to be usable. Dan, please pull/rebuild and change your memory back to 64 MiB and see if this solves the big problem you were having and please post results (hopefully closing the bug) in bugzilla. Yes, this resolves the DomU panic - also no occurences 'Bad page state...' Thanks. Thanks Dan, thats awesome. I'd like us to use bugzilla as it should be used, so could you "resolve" the bug to "FIXED" here is the link: http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=768 -JX ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [XenPPC] [xenppc-unstable] [POWERPC][TOOLS] flatdevtree requires us to reserve the ramdisk
> The changeset below solve the ramdisk freeing error we see on DomUs. > This issue hit Dan consistently so we adjusted his Dom1 script to > allocate more memory which allowed his linux to be usable. > Dan, please pull/rebuild and change your memory back to 64 MiB and > see if this solves the big problem you were having and please post > results (hopefully closing the bug) in bugzilla. Yes, this resolves the DomU panic - also no occurences 'Bad page state...' Thanks. Here is console of DomU, 64mb: Script started on Sun Sep 17 15:06:58 2006 lab082:~ # xm list /usr/lib/python2.4/xmllib.py:9: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead. warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning) Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 192 1 r- 143.9 lab082:~ # xm create -c dom1 Using config file "/etc/xen/dom1". /usr/lib/python2.4/xmllib.py:9: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead. warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning) Started domain S-1158520031.61 xen_start_info at c3ffc000 magic xen-3.0-powerpc64HV flags 0 shared_info3fff000, c3fff000 store_mfn 3ffe store_evtchn 1 console_mfn3ffd console_evtchn 2 Hello World I'm Maple Xen-LPAR! <- xen_init_early Starting Linux PPC64 #1 SMP Fri Sep 15 14:50:47 EDT 2006 - ppc64_pft_size= 0x14 ppc64_interrupt_controller= 0x1 physicalMemorySize= 0x400 ppc64_caches.dcache_line_size = 0x80 ppc64_caches.icache_line_size = 0x80 htab_address = 0x htab_hash_mask= 0x1fff - Linux version 2.6.17-Xen ([EMAIL PROTECTED]) (gcc version 3.4.1) #1 SMP Fri Sep 15 14:50:47 EDT 2006 *** : CF12 *** : Setup Arch [boot]0012 Setup Arch Using Xen idle loop *** : CF15 *** : Setup Done [boot]0015 Setup Done Built 1 zonelists. Total pages: 16384 Kernel command line: xencons=tty128 console=tty128 PID hash table entries: 512 (order: 9, 4096 bytes) firmware_features = 0x4a Using Xen-Maple machine description Found initrd at 0xc180:0xc1b10648 Starting Linux PPC64 #1 SMP Fri Sep 15 14:50:47 EDT 2006 - ppc64_pft_size= 0x14 ppc64_interrupt_controller= 0x1 physicalMemorySize= 0x400 ppc64_caches.dcache_line_size = 0x80 ppc64_caches.icache_line_size = 0x80 htab_address = 0x htab_hash_mask= 0x1fff - Linux version 2.6.17-Xen ([EMAIL PROTECTED]) (gcc version 3.4.1) #1 SMP Fri Sep 15 14:50:47 EDT 2006 *** : CF12 *** : Setup Arch [boot]0012 Setup Arch Using Xen idle loop *** : CF15 *** : Setup Done [boot]0015 Setup Done Built 1 zonelists. Total pages: 16384 Kernel command line: xencons=tty128 console=tty128 PID hash table entries: 512 (order: 9, 4096 bytes) Console: colour dummy device 80x25 Dentry cache hash table entries: 8192 (order: 4, 65536 bytes) Inode-cache hash table entries: 4096 (order: 3, 32768 bytes) Memory: 54188k/65536k available (5276k kernel code, 11284k reserved, 1212k data, 456k bss, 236k init) Mount-cache hash table entries: 256 Brought up 1 CPUs smp_xen_setup_cpu(0) migration_cost=0 checking if image is initramfs...it isn't (no cpio magic); looks like an initrd Freeing initrd memory: 3137k freed grant table at c0708000 Grant table initialized NET: Registered protocol family 16 *** : Linux ppc64 *** : 2.6.17-Xen SCSI subsystem initialized usbcore: registered new driver usbfs usbcore: registered new driver hub NET: Registered protocol family 2 IP route cache hash table entries: 512 (order: 0, 4096 bytes) TCP established hash table entries: 2048 (order: 3, 32768 bytes) TCP bind hash table entries: 1024 (order: 2, 16384 bytes) TCP: Hash tables configured (established 2048 bind 1024) TCP reno registered rtas_flash: no firmware flash support scan-log-dump not implemented on this system Initializing Cryptographic API io scheduler noop registered io scheduler deadline registered (default) Generic RTC Driver v1.07 RAMDISK driver initialized: 16 RAM disks of 10240K size 1024 blocksize loop: loaded (max 8 devices) Intel(R) PRO/1000 Network Driver - version 7.0.38-k4 Copyright (c) 1999-2006 Intel Corporation. Xen virtual console successfully installed as tty128 Event-channel device installed. blkif_init: reqs=64, pages=704, mmap_vstart=0xc1c0 netfront: Initialising virtual ethernet driver. Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 50MHz system bus speed for PIO modes; overrid
Re: [XenPPC] [xenppc-unstable] [POWERPC][TOOLS] flatdevtree requires us to reserve the ramdisk
The changeset below solve the ramdisk freeing error we see on DomUs. This issue hit Dan consistently so we adjusted his Dom1 script to allocate more memory which allowed his linux to be usable. Dan, please pull/rebuild and change your memory back to 64 MiB and see if this solves the big problem you were having and please post results (hopefully closing the bug) in bugzilla. Thanks Here is the message I'm speaking of in case you forgot it. Bad page state in process 'swapper' page:c07de000 flags:0x1008 mapping: mapcount:0 count:0 Trying to fix it up, but a reboot is needed Backtrace: Call Trace: [C089BBA0] [C000F844] .show_stack+0x54/0x1f0 (unreliable) [C089BC50] [C0094B90] .bad_page+0x70/0xd0 [C089BCD0] [C009577C] .free_hot_cold_page+0x1fc/0x210 [C089BD70] [C00332BC] .free_initrd_mem+0x10c/0x150 [C089BE10] [C0558900] .free_initrd+0x70/0x130 [C089BEB0] [C00092D8] .init+0x168/0x430 [C089BF90] [C0028F54] .kernel_thread+0x4c/0x68 -JX On Sep 16, 2006, at 9:40 AM, Xen patchbot-xenppc-unstable wrote: # HG changeset patch # User Jimi Xenidis <[EMAIL PROTECTED]> # Node ID 7a20fed8be73857abe33d308ed27099efbff4a3c # Parent 1d9c135673e4db41789d730d843c9e5f8de3a4eb [POWERPC][TOOLS] flatdevtree requires us to reserve the ramdisk The following patch solves the DomU: Freeing initrd memory: 3137k freed Bad page state in process 'swapper' error message that was cause by not reserving the memory in the flattened device tree. We have to pre-reserve these entries when we create the tree in FlatDeviceTree.py and fix it later because there appears to be no way to add a reservation in libxc. Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]> --- tools/libxc/powerpc64/xc_linux_build.c |8 +++- tools/python/xen/xend/FlatDeviceTree.py |8 +++- 2 files changed, 14 insertions(+), 2 deletions(-) diff -r 1d9c135673e4 -r 7a20fed8be73 tools/libxc/powerpc64/ xc_linux_build.c --- a/tools/libxc/powerpc64/xc_linux_build.c Fri Sep 15 18:20:55 2006 -0400 +++ b/tools/libxc/powerpc64/xc_linux_build.c Sat Sep 16 09:34:26 2006 -0400 @@ -208,6 +208,12 @@ static int load_devtree( return rc; } +rc = ft_set_rsvmap(devtree, 1, initrd_base, initrd_len); +if (rc < 0) { +DPRINTF("couldn't set initrd reservation\n"); +return ~0UL; +} + /* start-info (XXX being removed soon) */ rc = ft_set_prop(&devtree, xen, "start-info", start_info, sizeof(start_info)); @@ -379,7 +385,7 @@ static unsigned long create_start_info(v rc = ft_set_rsvmap(devtree, 0, si_addr, 4*PAGE_SIZE); if (rc < 0) { -DPRINTF("couldn't set first reservation\n"); +DPRINTF("couldn't set start_info reservation\n"); return ~0UL; } diff -r 1d9c135673e4 -r 7a20fed8be73 tools/python/xen/xend/ FlatDeviceTree.py --- a/tools/python/xen/xend/FlatDeviceTree.py Fri Sep 15 18:20:55 2006 -0400 +++ b/tools/python/xen/xend/FlatDeviceTree.py Sat Sep 16 09:34:26 2006 -0400 @@ -271,8 +271,14 @@ def build(imghandler): the host's device tree.''' root = Tree() -# 4 pages: start_info, console, store, shared_info +# 1st reseravtion entry used for start_info, console, store, shared_info root.reserve(0x3ffc000, 0x4000) + +# 2nd reservation enrty used for initrd, later on when we load the +# initrd we may fill this in with zeroes which signifies the end +# of the reservation map. So as to avoid adding a zero map now we +# put some bogus yet sensible numbers here. +root.reserve(0x100, 0x1000) root.addprop('device_type', 'chrp-but-not-really\0') root.addprop('#size-cells', 2) ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [xenppc-unstable] [POWERPC][TOOLS] flatdevtree requires us to reserve the ramdisk
# HG changeset patch # User Jimi Xenidis <[EMAIL PROTECTED]> # Node ID 7a20fed8be73857abe33d308ed27099efbff4a3c # Parent 1d9c135673e4db41789d730d843c9e5f8de3a4eb [POWERPC][TOOLS] flatdevtree requires us to reserve the ramdisk The following patch solves the DomU: Freeing initrd memory: 3137k freed Bad page state in process 'swapper' error message that was cause by not reserving the memory in the flattened device tree. We have to pre-reserve these entries when we create the tree in FlatDeviceTree.py and fix it later because there appears to be no way to add a reservation in libxc. Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]> --- tools/libxc/powerpc64/xc_linux_build.c |8 +++- tools/python/xen/xend/FlatDeviceTree.py |8 +++- 2 files changed, 14 insertions(+), 2 deletions(-) diff -r 1d9c135673e4 -r 7a20fed8be73 tools/libxc/powerpc64/xc_linux_build.c --- a/tools/libxc/powerpc64/xc_linux_build.cFri Sep 15 18:20:55 2006 -0400 +++ b/tools/libxc/powerpc64/xc_linux_build.cSat Sep 16 09:34:26 2006 -0400 @@ -208,6 +208,12 @@ static int load_devtree( return rc; } +rc = ft_set_rsvmap(devtree, 1, initrd_base, initrd_len); +if (rc < 0) { +DPRINTF("couldn't set initrd reservation\n"); +return ~0UL; +} + /* start-info (XXX being removed soon) */ rc = ft_set_prop(&devtree, xen, "start-info", start_info, sizeof(start_info)); @@ -379,7 +385,7 @@ static unsigned long create_start_info(v rc = ft_set_rsvmap(devtree, 0, si_addr, 4*PAGE_SIZE); if (rc < 0) { -DPRINTF("couldn't set first reservation\n"); +DPRINTF("couldn't set start_info reservation\n"); return ~0UL; } diff -r 1d9c135673e4 -r 7a20fed8be73 tools/python/xen/xend/FlatDeviceTree.py --- a/tools/python/xen/xend/FlatDeviceTree.py Fri Sep 15 18:20:55 2006 -0400 +++ b/tools/python/xen/xend/FlatDeviceTree.py Sat Sep 16 09:34:26 2006 -0400 @@ -271,8 +271,14 @@ def build(imghandler): the host's device tree.''' root = Tree() -# 4 pages: start_info, console, store, shared_info +# 1st reseravtion entry used for start_info, console, store, shared_info root.reserve(0x3ffc000, 0x4000) + +# 2nd reservation enrty used for initrd, later on when we load the +# initrd we may fill this in with zeroes which signifies the end +# of the reservation map. So as to avoid adding a zero map now we +# put some bogus yet sensible numbers here. +root.reserve(0x100, 0x1000) root.addprop('device_type', 'chrp-but-not-really\0') root.addprop('#size-cells', 2) ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel