summaryrefslogtreecommitdiff
path: root/includes/rts/SpinLock.h
Commit message (Collapse)AuthorAgeFilesLines
* rts: drop unused 'SpinLockCount' typedefSergei Trofimovich2014-07-201-2/+0
| | | | | | | | | | | | | | Summary: Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: git grep, git log -SSpinLockCount, build test Reviewers: austin, simonmar Reviewed By: austin, simonmar Subscribers: phaskell, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D76
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-011-1/+1
|
* Deprecate lnat, and use StgWord insteadSimon Marlow2012-09-071-1/+1
| | | | | | | | | | | | lnat was originally "long unsigned int" but we were using it when we wanted a 64-bit type on a 64-bit machine. This broke on Windows x64, where long == int == 32 bits. Using types of unspecified size is bad, but what we really wanted was a type with N bits on an N-bit machine. StgWord is exactly that. lnat was mentioned in some APIs that clients might be using (e.g. StackOverflowHook()), so we leave it defined but with a comment to say that it's deprecated.
* When acquiring a spinlock, yieldThread() every 1000 spins (#3553, #3758)Simon Marlow2010-01-221-11/+18
| | | | | | | | | | | | This helps when the thread holding the lock has been descheduled, which is the main cause of the "last-core slowdown" problem. With this patch, I get much better results with -N8 on an 8-core box, although some benchmarks are still worse than with 7 cores. I also added a yieldThread() into the any_work() loop of the parallel GC when it has no work to do. Oddly, this seems to improve performance on the parallel GC benchmarks even when all the cores are busy. Perhaps it is due to reducing contention on the memory bus.
* Use "rep; nop" inside a spin-lock loop on x86/x86-64Simon Marlow2009-09-291-0/+2
| | | | | This helps on a hyperthreaded CPU by yielding to the other thread in a spinlock loop.
* Tidy up file headers and copyrights; point to the wiki for docsSimon Marlow2009-08-251-1/+6
| | | | | | | I've updated the wiki page about the RTS headers http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes to reflect the new layout and explain some of the rationale. All the header files now point to this page.
* RTS tidyup sweep, first phaseSimon Marlow2009-08-021-0/+105
The first phase of this tidyup is focussed on the header files, and in particular making sure we are exposinng publicly exactly what we need to, and no more. - Rts.h now includes everything that the RTS exposes publicly, rather than a random subset of it. - Most of the public header files have moved into subdirectories, and many of them have been renamed. But clients should not need to include any of the other headers directly, just #include the main public headers: Rts.h, HsFFI.h, RtsAPI.h. - All the headers needed for via-C compilation have moved into the stg subdirectory, which is self-contained. Most of the headers for the rest of the RTS APIs have moved into the rts subdirectory. - I left MachDeps.h where it is, because it is so widely used in Haskell code. - I left a deprecated stub for RtsFlags.h in place. The flag structures are now exposed by Rts.h. - Various internal APIs are no longer exposed by public header files. - Various bits of dead code and declarations have been removed - More gcc warnings are turned on, and the RTS code is more warning-clean. - More source files #include "PosixSource.h", and hence only use standard POSIX (1003.1c-1995) interfaces. There is a lot more tidying up still to do, this is just the first pass. I also intend to standardise the names for external RTS APIs (e.g use the rts_ prefix consistently), and declare the internal APIs as hidden for shared libraries.