mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Cc: David Newall <davidn@davidnewall.com>,
	Jiri Kosina <jkosina@suse.cz>, "Fred ." <eldmannen@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Keys get stuck
Date: Fri, 14 Mar 2008 20:35:34 +0100	[thread overview]
Message-ID: <20080314193534.GB24646@elf.ucw.cz> (raw)
In-Reply-To: <20080314133019.GE1289@csclub.uwaterloo.ca>

On Fri 2008-03-14 09:30:19, Lennart Sorensen wrote:
> On Thu, Mar 13, 2008 at 06:14:26PM +0100, Pavel Machek wrote:
> > hw is proper place to implement autorepeat, and along with some
> > buffering, it has chance to work. Kernel is not real-time, and X are
> > definitely not real-time, while autorepeat is real-time operation.
> > 
> > It actually mostly works in ps/2 case. Buffer in hardware means that
> > pretty big interrupt delays can be tolerated without problems.
> 
> So does the keyboard events generate something like this then:
> 
> KEY_x_DOWN
> KEY_x_REPEAT
> KEY_x_UP

Yes, kernel<->user interface is something like that. Try evtest to see
it.

> If so then X certainly could get all the keyboard information I imagine
> it needs from the kernel, but otherwise I am not sure how it could.
> A
> repeated series of key down events are not enough since some keys you
> don't want repeated you just want to know when the key is held down and
> when it isn't.

PS/2 keyboard sends both ups and downs. "down down down up" means
autorepeat. It is not actually ambiguous.

BTW this is what I use to generate huge latencies and cause X
problems:

void
main(void)
{
        int i;
        iopl(3);
        while (1) {
                asm volatile("cli");
                //              for (i=0; i<20000000; i++)
                for (i=0; i<1000000000; i++)
                        asm volatile("");
                asm volatile("sti");
                sleep(1);
        }
}

...run it once per core.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


  reply	other threads:[~2008-03-14 19:35 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-11 23:32 Fred .
2008-03-12  0:04 ` Andrew Morton
2008-03-12  8:48 ` Sebastien Dugue
2008-03-12 10:32 ` Jiri Kosina
2008-03-12 10:44   ` David Newall
2008-03-12 14:47     ` Theodore Tso
2008-03-12 15:20       ` Stephen Hemminger
2008-03-12 16:47       ` David Newall
2008-03-12 16:49         ` Jiri Kosina
2008-03-12 21:22           ` Hans-Peter Jansen
2008-03-13  5:42             ` Mike Galbraith
2008-03-13  9:48               ` Jan Knutar
2008-03-13 11:28                 ` Mike Galbraith
2008-03-13 11:31                   ` Jiri Kosina
2008-03-13 12:02                     ` Mike Galbraith
2008-03-13 12:02                   ` Carlos R. Mafra
2008-03-13 12:06                     ` Jiri Kosina
2008-03-13 12:19                       ` Carlos R. Mafra
2008-03-13 12:21                     ` Mike Galbraith
2008-03-13 14:18                     ` Helge Hafting
2008-03-13 15:13                       ` Swap makes X unfair (was Re: Keys get stuck) Carlos R. Mafra
2008-03-14 11:02                         ` Helge Hafting
2008-03-15 22:11                           ` Carlos R. Mafra
2008-03-16 15:27                           ` Jan Knutar
2008-03-14 18:34                       ` Keys get stuck Pavel Machek
2008-03-13 17:14     ` Pavel Machek
2008-03-13 17:56       ` Fred .
2008-03-13 18:03         ` Pavel Machek
2008-03-14  9:21       ` Jiri Kosina
2008-03-14 18:24         ` Pavel Machek
2008-03-14 21:34           ` Lennart Sorensen
2008-03-14 13:30       ` Lennart Sorensen
2008-03-14 19:35         ` Pavel Machek [this message]
2008-03-13 13:01 ` Mark Lord
     [not found] <a6meN-2aj-39@gated-at.bofh.it>
     [not found] ` <a6wxo-1xY-1@gated-at.bofh.it>
     [not found]   ` <a6wQO-1YG-1@gated-at.bofh.it>
     [not found]     ` <a6Zgb-5Hj-55@gated-at.bofh.it>
     [not found]       ` <a7iiO-2fq-39@gated-at.bofh.it>
2008-03-14 20:20         ` Bodo Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080314193534.GB24646@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=davidn@davidnewall.com \
    --cc=eldmannen@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsorense@csclub.uwaterloo.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®