Subject: Re: wscons input multiplexor
To: None <M.Drochner@fz-juelich.de>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-kern
Date: 07/23/1999 11:35:07
In message <199907231700.TAA0000021867@zel459.zel.kfa-juelich.de>Matthias Drochner writes

>For the serial mice: What's better, a daemon or a
>line discipline dealing with the mouse protocol.
>Mice already tend to be "jumpy" under system load, so the
>daemon might require too many context switches.

I'd say `line discipline'.  There's considerable experience with
moving pointer traking into the kernel and making a cursor sprite
following the pointer. Mostly on vaxes, where the costs of
context-switching are prohibitive: going to userland and back to
follow mouse movements is `jumpy' and ugly even under no load.

The pmax kernels still use a derivative of that code, placing all
input events (pointer motion and kbd events) into a ring-buffer which
gets mmap'ed into the X server's address space. since the kernel is
the only writer and userspace the only consumer, each has their own
pointer, and the kernel is conservative about tossing data to avoid
overflow, there's no real race conditions (the worst is that the
Xserver might miss an event and have to select() again).

That particular implementation is gross, but the CHI results are
really, *really* nice. Pointer location is always accurate  even
on a grossly-overloaded machine.