On Sat, 1 Apr 2000, tom r wrote:
> This may (I hope it does) have an obvious answer ...
Sorry, but I don't believe it does.
> ... I'd also like to nice -19 whatever it is that handles the mouse.
> Before I embark on a long painful set of experiments, does anyone know
> what to give high priority to to ensure smooth mouse movement on a system
> with a zillion background jobs running ?
Depending on the applications and what they are doing, you may not be able
to achieve your desired goal. It all depends on what is keeping the mouse from
moving smoothly. Any of the following could slow down your perceived response
time:
- The userland mouse handler might not be getting enough CPU time.
Changing the priority may help this, but only to a point. The kernel will
still strive to ensure other processes get some CPU time. The only way to
ensure CPU time is to change the mouse handler's class to one of the real-time
scheduler classes (*NOT* recommended).
- If the system is low on memory, the userland mouse handler may be being
paged out to disk. Increasing the priority may help this (the paging algorithm
may see the process as scheduled to run again soon, and thus keep it in
memory), but is not guaranteed to do so. Regardless of the process's
priority, if it isn't in memory, it won't run.
- If the system is getting a lot of interrupts, latency will increase.
Kernel interrupt handlers are generally not preemptable. Thus, if a disk I/O
interrupt is being serviced and a mouse interrupt occurs, the disk I/O
interrupt handler will still need to complete before the kernel can service
the mouse interrupt handler. And there may be other, higher priority
interrupts waiting before the mouse.
- If the system hardware is bottle-necking (e.g., the system memory bus is
saturated, or you've got a dog slow I/O chip somewhere), that may unavoidably
slow things. The kernel can only schedule things to a point; if it is
spending a lot of time servicing slow hardware, there isn't anything it can do
about it.
Now that I've listed a bunch of caveats (and there may well be more), let me
answer your question: On a typical Linux system, the mouse is handled by, at
most, two userland programs: The X server and gpm, the "general purpose mouse"
handler for text consoles. You can try increasing their priority.
Hope this helps!
--
Ben Scott <[EMAIL PROTECTED]>
| Never attribute to malice that which can be explained by stupidity. |
**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************