summaryrefslogtreecommitdiff
path: root/rts/StgStartup.cmm
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-03-13 10:45:16 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-03-13 10:45:16 +0000
commit304e7fb703e7afddc1ef9be6aab6505e36b63b06 (patch)
tree578332aa77e0c1c2d176218d23ae0beb0afd98af /rts/StgStartup.cmm
parentc197fe602ed4aadf09affe0cdc18e7158d262012 (diff)
downloadhaskell-304e7fb703e7afddc1ef9be6aab6505e36b63b06.tar.gz
Instead of a separate context-switch flag, set HpLim to zero
This reduces the latency between a context-switch being triggered and the thread returning to the scheduler, which in turn should reduce the cost of the GC barrier when there are many cores. We still retain the old context_switch flag which is checked at the end of each block of allocation. The idea is that setting HpLim may fail if the the target thread is modifying HpLim at the same time; the context_switch flag is a fallback. It also allows us to "context switch soon" without forcing an immediate switch, which can be costly.
Diffstat (limited to 'rts/StgStartup.cmm')
-rw-r--r--rts/StgStartup.cmm4
1 files changed, 1 insertions, 3 deletions
diff --git a/rts/StgStartup.cmm b/rts/StgStartup.cmm
index 16e5c62801..c3c0bc3dd7 100644
--- a/rts/StgStartup.cmm
+++ b/rts/StgStartup.cmm
@@ -28,9 +28,7 @@
ASSERT(Hp != 0); \
ASSERT(Sp != 0); \
ASSERT(SpLim != 0); \
- ASSERT(HpLim != 0); \
- ASSERT(SpLim - WDS(RESERVED_STACK_WORDS) <= Sp); \
- ASSERT(HpLim >= Hp);
+ ASSERT(SpLim - WDS(RESERVED_STACK_WORDS) <= Sp);
/* -----------------------------------------------------------------------------
Returning from the STG world.