Re: 2.4.18-pre7 slow ... apm problem

From: Petr Vandrovec (VANDROVE@vc.cvut.cz)
Date: Mon Jan 28 2002 - 18:22:04 EST


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/



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:00:55 EST