linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* a problem about the the patch in the comment #118 of bug 10724
@ 2008-09-05  1:51 Zhao Yakui
  2008-09-05 12:38 ` Alexey Starikovskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Zhao Yakui @ 2008-09-05  1:51 UTC (permalink / raw)
  To: astarikovskiy; +Cc: linux-acpi, lenb

Hi, Alexey
    
    Maybe you misunderstand what I have done in the patch of bug 10724. 
    We should firstly make it clear why there exists EC GPE interrupt storm on some laptops. EC controller
uses the pulse interrupt model to trigger GPE interrupt and EC GPE is registered as Edge mode.
    If the EC interrupt pulse is too wide on some broken BIOS, several ACPI interrupts are triggered
although only one EC interrupt pulse is generated. Maybe on some broken BIOS the situation will be more serious.And
when EC GPE handler is served, OS will check the EC status by reading the EC status I/O port. On most laptops the 
EC and other controller(Keyboard, UART) are accessed through LPC bus. If the EC GPE interrupt is triggered too many times
( For example: 50000 per second), too much bandwith of LPC bus will be wasted on reading the EC status register. 
On the bug 9998 it causes that sometimes the keystrobes are lost. Sometimes it will cause that the info of the 
battery/SBS battery related with EC can't be obtained.
    
    If we can add some delays on the EC GPE handler, the number of EC GPE interrupt can be reduced very obviously, which 
makes the system work well. For example: the laptop in bug 9998 can work well and the EC working flowchart is also simple.

    My patch is only for the broken BIOS. For most laptops no delay is added in the EC GPE handler. 
    Only when five EC GPE interrupts happens in the same jiffies and the EC status is the same, OS will add some delay in 
the EC GPE handler. If the same thing still happens after the delay is added, the delay time will be increased. 
But the max delay time is 5 microseconds.
    
    At the same time IMO udelay is harmless. It is realized by repeat loop instead of halt. 

    
Thanks
   Yakui

    
    



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: a problem about the the patch in the comment #118 of bug 10724
  2008-09-05  1:51 a problem about the the patch in the comment #118 of bug 10724 Zhao Yakui
@ 2008-09-05 12:38 ` Alexey Starikovskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Alexey Starikovskiy @ 2008-09-05 12:38 UTC (permalink / raw)
  To: Zhao Yakui; +Cc: linux-acpi, lenb

Zhao Yakui wrote:
> Hi, Alexey
>     
>     Maybe you misunderstand what I have done in the patch of bug 10724.
Ok, the patch is worthless from both debugging point (you _will_ get less interrupts if you service them longer), so you will
not find anything new with this patch, and it is stupid as a patch intended at production just because you'll spend same time
in interrupt context as before, but now you flush system responsiveness down the tube too.

>     We should firstly make it clear why there exists EC GPE interrupt storm on some laptops. EC controller
> uses the pulse interrupt model to trigger GPE interrupt and EC GPE is registered as Edge mode.
>     If the EC interrupt pulse is too wide on some broken BIOS, several ACPI interrupts are triggered
> although only one EC interrupt pulse is generated. Maybe on some broken BIOS the situation will be more serious.And
> when EC GPE handler is served, OS will check the EC status by reading the EC status I/O port. On most laptops the 
> EC and other controller(Keyboard, UART) are accessed through LPC bus. If the EC GPE interrupt is triggered too many times
> ( For example: 50000 per second), too much bandwith of LPC bus will be wasted on reading the EC status register. 
> On the bug 9998 it causes that sometimes the keystrobes are lost. Sometimes it will cause that the info of the 
> battery/SBS battery related with EC can't be obtained.
>     
>     If we can add some delays on the EC GPE handler, the number of EC GPE interrupt can be reduced very obviously, which 
> makes the system work well. For example: the laptop in bug 9998 can work well and the EC working flowchart is also simple.
> 
>     My patch is only for the broken BIOS. For most laptops no delay is added in the EC GPE handler. 
>     Only when five EC GPE interrupts happens in the same jiffies and the EC status is the same, OS will add some delay in 
> the EC GPE handler. If the same thing still happens after the delay is added, the delay time will be increased. 
> But the max delay time is 5 microseconds.
If you care to look at the log I've sent several days ago, you will see that interrupts happen for about 1ms after the command
write. So you will spend this whole millisecond spinning.

>     At the same time IMO udelay is harmless. It is realized by repeat loop instead of halt. 
Well, most people try to make interrupt context as short as possible, just because it's not interruptible, 
so you loose interactivity. For example music/video could become jerky.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-05 12:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-05  1:51 a problem about the the patch in the comment #118 of bug 10724 Zhao Yakui
2008-09-05 12:38 ` Alexey Starikovskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).