[GHC] #13497: GHC does not use select()/poll() correctly on non-Linux platforms
GHC
ghc-devs at haskell.org
Fri Mar 31 13:21:13 UTC 2017
#13497: GHC does not use select()/poll() correctly on non-Linux platforms
-------------------------------------+-------------------------------------
Reporter: nh2 | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime System | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #8684, #12912 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by nh2):
Reading the aforementioned
[https://github.com/ghc/ghc/commit/0b79d5cd4687dacf7efd430df7fba9d9a5a5ce32
#diff-dce00d71def2bd086622a775b0723323R71 commit] in detail, it seems that
the code currently doesn't do what the code may not follow the intents
expressed in the comments:
{{{
+ * The timer interrupt transitions ACTIVITY_YES into
+ * ACTIVITY_MAYBE_NO, waits for RtsFlags.GcFlags.idleGCDelayTime,
+ * and then:
+ * - if idle GC is no, set ACTIVITY_INACTIVE and wakeUpRts()
+ * - if idle GC is off, set ACTIVITY_DONE_GC and stopTimer()
}}}
[https://github.com/ghc/ghc/blob/380b25ea4754c2aea683538ffdb179f8946219a0/rts/Timer.c#L66
Code:]
{{{
if (RtsFlags.GcFlags.doIdleGC) {
recent_activity = ACTIVITY_INACTIVE;
#ifdef THREADED_RTS
...
}}}
It depends on what `if idle GC is no` (read: `on`) means. In many places I
have read that idle GC can really only be "on" in the threaded RTS. In
that case, the code does not implement the comment, as it sets
`ACTIVITY_INACTIVE` even when we're not in the threaded RTS.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13497#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list