Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 May 2008 16:05:12 -0700
From:      "Maksim Yevmenkin" <maksim.yevmenkin@gmail.com>
To:        rick-freebsd@kiwi-computer.com
Cc:        freebsd-hackers@freebsd.org, Jeremy Chadwick <koitsu@freebsd.org>, Fraser Tweedale <frase@frase.id.au>
Subject:   Re: temporary freezes when pressing capslock / numlock
Message-ID:  <bb4a86c70805271605u323d259ejbf2b67903188e18b@mail.gmail.com>
In-Reply-To: <20080527224256.GA83303@keira.kiwi-computer.com>
References:  <48378DA0.8040506@frase.id.au> <20080527041236.GB68298@keira.kiwi-computer.com> <20080527051109.GA26502@eos.sc1.parodius.com> <20080527054842.GA69670@keira.kiwi-computer.com> <bb4a86c70805271034y5472efadsf239fac2995161e0@mail.gmail.com> <20080527194554.GA79741@keira.kiwi-computer.com> <bb4a86c70805271332l7d0424dau1e498e41f2c92a6b@mail.gmail.com> <20080527210158.GB81555@keira.kiwi-computer.com> <bb4a86c70805271428v60e997cal9e578ea04ca0271e@mail.gmail.com> <20080527224256.GA83303@keira.kiwi-computer.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 5/27/08, Rick C. Petty <rick-freebsd@kiwi-computer.com> wrote:
> On Tue, May 27, 2008 at 02:28:26PM -0700, Maksim Yevmenkin wrote:
>  >
>  > well, i just took a brief look at atkbd(4).  specifically one function
>  > - wait_while_controller_busy(). this function polls status every
>  > KBDC_DELAYTIME (20) usec with retry count of 5000. so, just this
>  > function alone can give up to 100 msec delay. keep in mind that
>  > wait_while_controller_busy() is apparently called every time driver
>  > need to talk to the hardware. i can see how we could delay kernel for
>  > 400 msec or even more.
>
>  I'm not sure why we retry 5000 times.  100ms seems like a long time to
>  block the entire kernel.  Is there any reason we can't spawn a kernel
>  thread to deal with the waits?  I recommend that we also reduce the
>  timeouts to at most twice what the spec states.

all great ideas. please send in the patches and i will be happy to
review and commit them for you.

>  How come this doesn't happen when other keys are pressed?  Just when the
>  console is flipped.  Perhaps because it tries to set the LEDs first?

like i said, i suspect delay happens only when driver needs to send
command to the keyboard. that is what happens when you press
num/scroll/capslock.

thanks,
max

>
>
>  -- Rick C. Petty
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70805271605u323d259ejbf2b67903188e18b>