H. Peter Anvin
2016-Mar-02 22:22 UTC
[syslinux] "Tick-counting" vs "Tick-less" timekeeping issues on VMs emulating BIOS PCs
On 03/01/16 21:11, H. Peter Anvin via Syslinux wrote:> On 03/01/16 07:21, Patrick Masotta via Syslinux wrote: >> >> At the moment I'm seeing timing issues on TFTP transfers (lwIP depends >> on the new interrupt based timer). I have consistently detected >> >> multiple Requests, double ACKs, etc. All these problems seem to be >> >> sourced on the now unreliable timeouts. >> I have used TFTP on the same (BIOS VM) scenarios with 3.X and TFTP >> >> timing was always rock solid. >> >> >> Sorry if this was discussed before, if not I'd like to ask (Peter) if >> there is any reason preventing us from going back to the "Tick-less" >> approach. Thanks. >> > > There are quite a few; primarily we simply cannot make lwIP > (lpxelinux.0) work without it. However, pxelinux.0 should not depend on > this. >Now, tickful timekeeping is wasteful, but this is a bootloader, and functionality is the main concern. The "tickless" version still depended on the BIOS tick. -hpa
Patrick Masotta
2016-Mar-02 22:47 UTC
[syslinux] "Tick-counting" vs "Tick-less" timekeeping issues on VMs emulating BIOS PCs
>> There are quite a few; primarily we simply cannot make lwIP > (lpxelinux.0) work without it. However, pxelinux.0 should not depend on > this.I'm finding most of the problems on lpxelinux.0> >Now, tickful timekeeping is wasteful, but this is a bootloader, and >functionality is the main concern. The "tickless" version still >depended on the BIOS tick. >Not really, a virtual environment can easily emulate the BIOS_timer at 0x046C but it has problems emulating a "real" timer interrupt to be hooked... That's the real problem. Just testing I have replaced the timing functions #define BIOS_timer 0x046C // Timer ticks typedef uint32_t jiffies_t; extern volatile jiffies_t __jiffies, __ms_timer; static inline jiffies_t jiffies(void) { return (*(volatile uint32_t *)BIOS_timer); } typedef uint32_t mstime_t; typedef int32_t mstimediff_t; static inline mstime_t ms_timer(void) { return ((*(volatile uint32_t *)BIOS_timer) * 55); } lpxelinux.0 hangs while legacy works OK. I think we should not depend on hoking timer interrupts if we want to be compatible with virtual environments. Best, Patrick
Michael Brown
2016-Mar-02 23:45 UTC
[syslinux] "Tick-counting" vs "Tick-less" timekeeping issues on VMs emulating BIOS PCs
On 02/03/16 22:47, Patrick Masotta via Syslinux wrote:> Not really, a virtual environment can easily emulate the BIOS_timer at 0x046C > but it has problems emulating a "real" timer interrupt to be hooked... > That's the real problem.The timer interrupt works fine in at least KVM, Xen, VMware, and Hyper-V. (I've tested iPXE in all of those virtual environments, and iPXE relies on the timer interrupt actually triggering a call to an ISR within the VM.) Michael
Possibly Parallel Threads
- "Tick-counting" vs "Tick-less" timekeeping issues on VMs emulating BIOS PCs
- "Tick-counting" vs "Tick-less" timekeeping issues on VMs emulating BIOS PCs
- "Tick-counting" vs "Tick-less" timekeeping issues on VMs emulating BIOS PCs
- [PATCH 1/4] efi/udp: core_udp_connect should use SubnetMask not StationAddress for netmask
- "Tick-counting" vs "Tick-less" timekeeping issues on VMs emulating BIOS PCs