Zachary Amsden
2007-Aug-04 09:37 UTC
2.6.22 x86_64 : kernel initial decompression hangs on vmware
Gabriel Barazer wrote:> Hi, > > After upgrading kernel to 2.6.22 on a Vmware workstation guest version > 5.5 and 6 , the kernel decompression stage ("Decompressing Linux...") > is hanging for a very long time (~5 minutes) before finally > succeeding (displaying "done.\nBooting the kernel.\n"). During this > time, the VM process is eating all the CPU time during the > decompression, like an infinite loop. > Between these 2 strings is the gunzip() function at > boot/compressed/misc.c which does the real job, and the problem seemed > to appear since commit 1ab60e0f72f71ec54831e525a3e1154f1c092408. > (2.6.22-rc1 hangs, 2.6.21.6 works). The problem occurs with or without > CONFIG_RELOCATABLE enabled. > > What are the possible solutions to confirm where the problem is coming > from ?Since I was just involved in the boot decompressor for another bug, I took a look at this. 2.6.22 switches it to be 64-bit code. VT is very picky about what state it can run in. Not using VT on Intel 64-bit hardware cripples performance, running at far below normal speed, and taking minutes to decompress the kernel, which is nearly instantaneous otherwise. To get back into VT in this case, not only do we need to load FS and GS, we also need to setup an initial LDT and task. Can you try the attached patch and see that it does the right thing? I've also cc'd the KVM developers, as the same problem will affect them, and hopefully the same patch will fix it. Thanks, Zach Zach -------------- next part -------------- A non-text attachment was scrubbed... Name: boot-decompress-vt-fix.patch Type: text/x-patch Size: 1177 bytes Desc: not available Url : http://lists.linux-foundation.org/pipermail/virtualization/attachments/20070804/e637d91c/boot-decompress-vt-fix-0001.bin
Gabriel Barazer
2007-Aug-04 10:18 UTC
2.6.22 x86_64 : kernel initial decompression hangs on vmware
On 08/04/2007 6:23:00 PM +0200, Zachary Amsden <zach@vmware.com> wrote:> Gabriel Barazer wrote: >> Hi, >> >> After upgrading kernel to 2.6.22 on a Vmware workstation guest version >> 5.5 and 6 , the kernel decompression stage ("Decompressing Linux...") >> is hanging for a very long time (~5 minutes) before finally >> succeeding (displaying "done.\nBooting the kernel.\n"). During this >> time, the VM process is eating all the CPU time during the >> decompression, like an infinite loop. >> Between these 2 strings is the gunzip() function at >> boot/compressed/misc.c which does the real job, and the problem seemed >> to appear since commit 1ab60e0f72f71ec54831e525a3e1154f1c092408. >> (2.6.22-rc1 hangs, 2.6.21.6 works). The problem occurs with or without >> CONFIG_RELOCATABLE enabled. >> >> What are the possible solutions to confirm where the problem is coming >> from ? > > Since I was just involved in the boot decompressor for another bug, I > took a look at this. 2.6.22 switches it to be 64-bit code. VT is very > picky about what state it can run in. Not using VT on Intel 64-bit > hardware cripples performance, running at far below normal speed, and > taking minutes to decompress the kernel, which is nearly instantaneous > otherwise. > > To get back into VT in this case, not only do we need to load FS and GS, > we also need to setup an initial LDT and task. Can you try the attached > patch and see that it does the right thing?It Works (tm) ! Tried compiling with and without the patch, with exactly the same config, just to be sure. Decompressing the kernel is now lightning fast. Thanks !> I've also cc'd the KVM developers, as the same problem will affect them, > and hopefully the same patch will fix it.-------------- next part -------------- A non-text attachment was scrubbed... Name: boot-decompress-vt-fix.patch Type: text/x-patch Size: 1177 bytes Desc: not available Url : http://lists.linux-foundation.org/pipermail/virtualization/attachments/20070804/8c34e9b3/boot-decompress-vt-fix.bin
Avi Kivity
2007-Aug-09 13:58 UTC
2.6.22 x86_64 : kernel initial decompression hangs on vmware
Zachary Amsden wrote:> > Since I was just involved in the boot decompressor for another bug, I > took a look at this. 2.6.22 switches it to be 64-bit code. VT is > very picky about what state it can run in. Not using VT on Intel > 64-bit hardware cripples performance, running at far below normal > speed, and taking minutes to decompress the kernel, which is nearly > instantaneous otherwise. > > To get back into VT in this case, not only do we need to load FS and > GS, we also need to setup an initial LDT and task. Can you try the > attached patch and see that it does the right thing? > > I've also cc'd the KVM developers, as the same problem will affect > them, and hopefully the same patch will fix it. >We haven't seen any issue with the 2.6.22 boot decompressor. Which of the four (fs, gs, ldt, or tr) were proving problematic and why?