Lost kbd input when swapping

Lost kbd input when swapping

Post by Bernhard Neb » Sat, 03 Jul 1993 20:30:39



I encountered a problem that might be specific to notebooks with
power-management enabled. I run Linux 0.99pl9 (from SLS 1.01) on a
SX386/33 notebook (ESCOM blackmate) with 4MB main memory and 81MB
hard disk (with a 10MB swap partition).

When I run emacs under X (well, it is slowish) and the hard disk
has been shut down by the power management, it can happen that
the HD is started -- probably because Linux wants to swap -- and
while the HD spins up, all typed input is ignored. Well, I
glanced through the code and noticed that in the function
"ll_rw_page" Linux may sleep uninterrupatble (provided that my
interpretation of cli as disabling all interrupts is correct --
I'm not a 386 guru) until there is a free entry in the request
queue. I changed that by putting a sti/cli around the sleep and
it seemed to help somewhat. I'm not sure whether this a safe
hack, but I believe that kbd interrupts shouldn't be disabled
during swapping.

Nevertheless, I still encounter the problem sometimes,
e.g., when typing a ^K and some characters, these characters may
not find there way into the emacs buffer (if the ^K forces a HD
start, probably in order to swap).

Any hints or clues?

-- Bernhard

 
 
 

1. raw kbd input w/o using kbd (how)

I am looking for a method to run any application (emacs, xterm, CAD
tools, etc.) and send it keystrokes from a source other than a
keyboard, but in the same format as keyboard keystrokes.

For instance, I want to start up Mentor Graphics Design Architect and
have it edit a schematic thinking that all of its input is coming from
the keyboard where it actually is just coming from another source.
The input includes sending things like M-x, C-q, F1, L1, R1, etc.

I want this to be application independent.  In other words, don't tell
me to write a keyboard macro for each application.

ANY and ALL replies are welcome.  Please email to me and I will
summarize.  Please also suggest where I might crosspost this article
(I previously sent it to comp.unix.wizards) to reach other
knowledgeable people.

I am using SunOS 4.1.2, if that helps.

Thanks in advance,
  Brian Evans
--

      Student/Research Assistant          /    __       /    ___
 Microsystems Prototyping Laboratory     /__  /_  /  / /__  /__
     Mississippi State University       /__/ __/ /__/ /__/ /__

2. More on characters ~R ~S and ~T

3. How to get unbuffered kbd input in C?

4. S10 process privs question

5. using ksh to get kbd input into a variable???

6. Why 2842 SCSI hang?

7. Can I have a serial display output and a kbd PS/2 input?

8. mouse pointer is a block!

9. Can I get keyboard input directly from /dev/kbd?

10. Lost my kbd & mouse

11. LOST LOST LOST

12. Booting loses USB input devices

13. sendmail: lost input channel errs