[GHC] #8733: I/O manager causes unnecessary syscalls in send/recv loops

GHC ghc-devs at haskell.org
Sun Feb 9 08:56:39 UTC 2014


#8733: I/O manager causes unnecessary syscalls in send/recv loops
--------------------------------------------+------------------------------
        Reporter:  tibbe                    |            Owner:
            Type:  bug                      |           Status:  new
        Priority:  normal                   |        Milestone:  7.10.1
       Component:  Runtime System           |          Version:  7.6.3
      Resolution:                           |         Keywords:
Operating System:  Unknown/Multiple         |     Architecture:
 Type of failure:  Runtime performance bug  |  Unknown/Multiple
       Test Case:                           |       Difficulty:  Unknown
        Blocking:                           |       Blocked By:
                                            |  Related Tickets:
--------------------------------------------+------------------------------

Comment (by hvr):

 Replying to [comment:16 AndreasVoellmy]:
 > When you say simplify, what are you comparing to? Is there some
 implementation of those functions that you are thinking of?

 Your suggestion of using the new `threadWait*STM` functions seems to be
 already an improvement over the naive `timeout`+`threadWait{Read,Write}`
 approach.

 I was originally thinking of a more low-level approach: Since
 `epoll`/`select` and similar OS sys-calls take a `timeout`-argument, that
 argument would be set according to the earliest due pending
 `threadWait*WithTimeout` calls when the need arises to actually call
 `epoll` to wait for new I/O events. Or does this implicitly happen anyway
 when using `registerDelay` which goes through the `TimeManager`?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8733#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list