[syslinux] Domain-specific HLT when idle

Peter Iannucci iannucci at MIT.EDU
Sat May 2 21:58:42 PDT 2009


H. Peter Anvin wrote:
> Peter Iannucci wrote:
>   
>> Hello hpa,
>>
>> We are developing a Xen-based virtualization service, and we are trying
>> to reduce excessive CPU utilization at isolinux boot prompts.  When
>> users boot up a virtual machine on an isolinux boot CD, the CPU starts
>> spinning at 100%.  These machines frequently get left in this state for
>> days or weeks, degrading the service for everyone else.
>>
>> You replied to the work-around discussed in the earlier thread at
>>
>> http://syslinux.zytor.com/archives/2005-June/005291.html
>>
>>     
>>> Breaks serial console.
>>>     -hpa
>>>       
>> In our case, the serial console is not an issue.  We would like to
>> submit a patch to isolinux which HLTs on getchar if isolinux is not
>> running with the serial console option.  Do you think this is the right
>> solution to this problem?  Can we work with you to resolve this?
>>
>>     
>
> It would *probably* be okay to do when serial console is not enabled,
> but it seems a bit crude... and also it's somewhat confusing that one
> should enable serial console and get drastically different behavior.
>
> What is much more confusing to me is why do you have VMs left like this
> for "days or weeks"?
>
> 	-hpa
>
>   
One improvement might be enabling interrupts for the serial port.  On 
line 1277 of 2.6.29/drivers/serial/8250.c, this is accomplished with

serial_outp(up, UART_IER, 0x0f);

where the UART Interrupt Enable Register is defined on line 23 of 
include/linux/serial_reg.h, and serial_outp is responsible for 
special-casing unusual devices.  The protocol for enabling interrupts 
via this register is common to all standard PC serial ports (and can 
easily be scraped from 8250.c for exceptions as desired).

On scanning through syslinux/core/parseconfig.inc, it looks like the 
infrastructure for enabling serial IRQ's is already present, but is not 
being used.  Once these interrupts are enabled, the HLT should take care 
of both cases fine.

By way of explanation, when our users boot a VM with a live CD and 
reboot from within the guest, the domain still has the CD still 
attached.  This leaves the machine spinning at the boot prompt.  Users 
forget and leave their machines in this state frequently enough that it 
has become a problem.  Similarly, users occasionally create a new VM and 
specify a first-time boot CD, but never log in to complete the install.  
It only takes a few VMs using 100% of a CPU to degrade the performance 
of a host.

-Peter Iannucci
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2713 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.zytor.com/pipermail/syslinux/attachments/20090503/92d6c84b/attachment.bin>


More information about the Syslinux mailing list