[GHC] #10587: Suspending and unsuspending ghci kills and spawns threads
GHC
ghc-devs at haskell.org
Tue Jul 7 16:00:52 UTC 2015
#10587: Suspending and unsuspending ghci kills and spawns threads
---------------------------------+-----------------------------------------
Reporter: niteria | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: GHCi | Version: 7.10.1
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64 (amd64)
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
---------------------------------+-----------------------------------------
Changes (by niteria):
* owner: niteria =>
Comment:
I've tried to change it, so that the number of IO manager threads gets
decreased when number of capabilities decreases, but I couldn't come up
with a solution that satisfied me. The main problem is that the thread is
not the only resource associated with the IO manager, there are also
callback that should be executed in the future. If we stopped the thread
before its loop is empty, we would break the promise of executing that
callback.
This problem is also described here:
https://phabricator.haskell.org/rGHC12f3fef5ec52c1ec0958b674adcd981f48048428
I've considered:
* Checking if the loop is empty - I couldn't tell if all the
implementations support that, so I abandoned that idea
* Migrating the file descriptors and callbacks to another instance of IO
manager - the problem is that it isn't obvious which one to migrate to and
if we'd want to spread them across available ones.
@simonmar suggested just being less aggressive about killing spare
workers. I'm starting to like that idea.
I'm out of ideas and it's not really that urgent for me, so I'll suspend
working on this.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10587#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list