On Wed, 14 May 2008 01:19:41 -0400 Dmitry Torokhov <[EMAIL PROTECTED]> wrote:
> 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. Ah, oki. > > 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. > Its not auto-repeat, Im sure of this since my earlier bugtracking. Its always the same keys and they appear at somewhat regular intervals, the frequency is increase when cpu usage tops. I posted about this maybe 1-2 months ago. (2008-03-31 to be exact), here's the basic content. "One of my developers are getting spurius ^[[G outputs from keyboard driver. Im 100% certain that its caused by keyboard driver and removing report_key also removes the problem. I extracted some numbers when it happens and they show some linear structure, but so far failed to understand why it doesn't work. It happens when j = 5, i = even number (2, 4, 6, 8, 10) Here are the values this developer is getting at boot (along with 5 x ^[[G) (j , i, scancode, xor, bit) 5, 6, 53, 32 , 32 5, 8, 69, 32 , 32 5, 4, 37, 32 , 32 5, 2, 21, 32 , 32 " > -- > Dmitry -- Kristoffer Ericson <[EMAIL PROTECTED]>