[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] Fixing non-blocking select/poll

From: Richard Braun
Subject: [RFC] Fixing non-blocking select/poll
Date: Thu, 14 Feb 2013 12:19:39 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Feb 13, 2013 at 01:53:37AM +0100, Samuel Thibault wrote:
> and pushed to our glibc repository. This is all above Richard's
> io_select_timeout changes.

I've pushed my latest changes to the hurd and glibc repositories,
respectively in the rbraun/select_timeout_pthread_v3 and
rbraun/io_select_timeout_v2 branches. The main changes are the use of
the io_select_request/io_select_timeout_request simpleroutines instead
of changing the API of io_select, and passing time_data_t by address
and not by value. The Hurd code uses time_data_t only in the functions
called by the MIG stub code, but internally converts them as soon as
possible to the standard struct timespec and consistently uses that
type everywhere else.

That completes work started last July, that also prompted the switch to
pthreads. Here is a list of relevant links :

- Original bug report :
- Debian local patch to force a minimum timeout :
- Debian local patch to allow a 0 timeout for some programs :
- Initial announcement of the cthreads based fix
  (cthreads turned out to be very impractical because of singly linked
  lists that were exposed in public headers and made random removal
  too expensive)
- Wiki open issue page :

The glibc patch still requires some comments and a proper changelog
entry before being applied.

Debian packages are available at my repository for testing :
deb http://ftp.sceen.net/debian-hurd experimental/
deb-src http://ftp.sceen.net/debian-hurd experimental/

Note that the hurd package depends on a new function in libpthread
(provided by the glibc packages), and at the same time, glibc depends on
the Hurd servers implementing the new io_select_timeout RPC. This means
that both must be upgraded at the same time, and you should restart your
system soon after.

Among the immediate benefits, vim (actually, when called with another
name such as view or through another program like dch or git) now
reacts properly. The gitk tool magically works again. Iceweasel no
longer suffers from threads randomly spinning in infinite loops.

Feedbacks are welcome.

Richard Braun

reply via email to

[Prev in Thread] Current Thread [Next in Thread]