Hi Kristoffer,

On Tue, May 13, 2008 at 10:53:56PM +0200, Kristoffer Ericson wrote:
> Hey Dmitry & Paul
> 
> Want your input on best way to handle this. As you know the HP 6xx keyboard 
> is using the poll interrupt.
> I believe my current issue is due to the fact that it uses a fixed time 
> (50ms) to check the keyboard for new data.
> 
> At high cpu usage, it doesn't complete the routine in 50ms, so it starts to 
> pile up and outputs bad chars (like 555555555).
> In the old driver it instead used a timer that at end of function setup to 
> run within one HZ, that enabled only one
> routine to be active at one time. 
> 
> I could use spinlocks to force only one active, but Im somewhat concerned at 
> what cost this would imply. I do not know
> how many "requests" could pile up and what this would mean further down the 
> line.
> 
> Ive increased the poll to 100ms-200ms and the problem occured less and less. 
> However it also means that the keyboard is "slower"
> that usual. Instead with timer, it will essentially get it done when it can 
> and dont schedule other stuff until its ready.
> 
> 

It is the same with the input-polldev. The polling is done form a work
that is submitted into ipolldevd workqueue that resubmits itself. There
is only one work active or pending for every polled input device.

What you are seeing is most likely input autorepeat kicking in if the
polling thread is not scheduled fast enough, although the CPU should be
pretty busy since default repeat delay is 250 ms.

-- 
Dmitry

Reply via email to