rts: Add api to pin a thread to a numa node but without fixing a capability
authorDarshan Kapashi <darshankapashi@gmail.com>
Thu, 10 Nov 2016 20:21:08 +0000 (15:21 -0500)
committerBen Gamari <ben@smart-cactus.org>
Thu, 10 Nov 2016 20:25:40 +0000 (15:25 -0500)
commit122d826d1d1b7ba6e73866331863fa1e0b3e99ea
tree77c2167cbe4ad0b48c64ae60aa82bc654ad9088e
parentbef7e784d037f720697a215b9e21f13b385e6d3e
rts: Add api to pin a thread to a numa node but without fixing a capability

`rts_setInCallCapability` sets the thread affinity as well as pins the
numa node. We should also have the ability to set the numa node without
setting the capability affinity. `rts_pinNumaNodeForCapability` function
is added and exported via `RtsAPI.h`.

Previous callers of `rts_setInCallCapability` should now also call
`rts_pinNumaNodeForCapability` to get the same effect as before.

Test Plan:
  ./validate

Reviewers: austin, simonmar, bgamari

Reviewed By: simonmar, bgamari

Subscribers: thomie, niteria

Differential Revision: https://phabricator.haskell.org/D2637

GHC Trac Issues: #12764
includes/RtsAPI.h
rts/Task.c