[PATCH 0/3] Make timers even more resistant to signals

Peter Hutterer peter.hutterer at who-t.net
Tue Oct 2 20:25:45 PDT 2012


On Fri, Sep 28, 2012 at 01:25:50AM -0700, Keith Packard wrote:
> Peter Hutterer <peter.hutterer at who-t.net> writes:
> 
> > Thanks, merged this into my tree. This should fix the remaining issues we're
> > seeing with synaptics.
> 
> Did you see my comments about this patch? I'm really not excited about
> adding 12 more syscalls per WaitForSomething invocation. Seems like
> there are two options to fix this 'correctly':
> 
>  1) Have the synaptics driver modify the timer interval from either a
>     wakeup or block handler as appropriate.

A quick git grep shows that timers are used in keybard, mouse, joystick,
synaptics, and wacom, all of those are in the signal path. We could in
theory fix up the lot, but it will take time.

>  2) Provide a signal-safe timer value setting function in DIX. This
>     would set a global flag indicating that 'something' changed in the
>     timers. WaitForSomething could use this flag to check whether the
>     timers need fixing before computing the timeout value for select.

> At the very least, the server should only be blocking SIGIO and not all
> signals; that's half the syscalls...

Both of these solutions seems to be more straightforward. Daniel?

Cheers,
   Peter



More information about the xorg-devel mailing list