[commit: ghc] ghc-8.0: Allow limiting the number of GC threads (+RTS -qn<n>) (29f610d)
git at git.haskell.org
git at git.haskell.org
Thu Aug 25 16:37:04 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/29f610da83bc3e0c47747fae8d672269b8d7ea50/ghc
>---------------------------------------------------------------
commit 29f610da83bc3e0c47747fae8d672269b8d7ea50
Author: Simon Marlow <marlowsd at gmail.com>
Date: Sat Apr 9 20:45:50 2016 +0100
Allow limiting the number of GC threads (+RTS -qn<n>)
This allows the GC to use fewer threads than the number of capabilities.
At each GC, we choose some of the capabilities to be "idle", which means
that the thread running on that capability (if any) will sleep for the
duration of the GC, and the other threads will do its work. We choose
capabilities that are already idle (if any) to be the idle capabilities.
The idea is that this helps in the following situation:
* We want to use a large -N value so as to make use of hyperthreaded
cores
* We use a large heap size, so GC is infrequent
* But we don't want to use all -N threads in the GC, because that
thrashes the memory too much.
See docs for usage.
(cherry picked from commit 76ee260778991367b8dbf07ecf7afd31f826c824)
>---------------------------------------------------------------
29f610da83bc3e0c47747fae8d672269b8d7ea50
docs/users_guide/runtime_control.rst | 24 +++
includes/rts/Flags.h | 4 +
rts/Capability.c | 48 +++---
rts/Capability.h | 23 ++-
rts/RtsFlags.c | 20 +++
rts/Schedule.c | 277 ++++++++++++++++++++++++-----------
rts/Task.h | 20 ++-
rts/sm/GC.c | 4 +-
8 files changed, 299 insertions(+), 121 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 29f610da83bc3e0c47747fae8d672269b8d7ea50
More information about the ghc-commits
mailing list