Re: 2.4.18-pre7 slow ... apm problem

Petr Vandrovec (VANDROVE@vc.cvut.cz)
Tue, 29 Jan 2002 00:22:04 +0100


On 28 Jan 02 at 22:20, Alan Cox wrote:
> > Question to all: Would it be a good idea to de-idle the CPU
> > inside interrupt handlers?
>
> If you call APM routines from inside APM routines weirdness occurs - so
> the answer is no. I'd say that unless this is shown to be occuring in
> non vmware stuff its up to vmware to handle the apm situation right

Hi,
unfortunately, majordomo kicked me yesterday evening, so I had to
follow this discussion through web archives, and I have some problems
with understanding why problem happens...

When vmmon switches out of the Linux to the virtual machine, it disables
all (APIC) NMI sources, disables IRQ on the CPU, completely replaces CPU
context (GDT/IDT/...) and switches to VMM, which does not physically
access anything except main memory and things emulated inside VMM
(like accesses to VGA/SVGA framebuffers). When an IRQ arrives to virtual
machine, it disables all IRQs, restores Linux kernel contexts, reenables
NMI sources, and restarts IRQ from vmmon by using INT xx instruction.
And everything this happens in process context (when VMM_RUN ioctl is
invoked).

So this behavior should be completely transparent to Linux kernel,
it should just see VMware process as a HLT instruction executed in vmmon
module, which delays interrupt confirmation/delivery a bit. Only thing
which could cause troubles is SMI arrival - but SMI handler cannot notice
any difference (except that APIC IRQ sources delivered as a NMI to CPU
are disabled), as paging is turned off during SMI handler, and physical
memory contents is same under both vmware and Linux kernel.

So I'm really puzzled.
Best regards,
Petr Vandrovec
vandrove@vc.cvut.cz

P.S.: I'm not trying to say that it is not VMware fault. It probably
is, as I saw same behavior on my old Pentium 120MHz notebook two years
ago - but as problem disappeared as it appeared...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/