This project is mirrored from https://gitlab.haskell.org/ghc/ghc.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 16 Mar, 2006 1 commit
  2. 15 Mar, 2006 1 commit
    • Simon Marlow's avatar
      Improvements to shutting down of the runtime · 5638488b
      Simon Marlow authored
      Yet another attempt at shutdown & interruption.  This one appears to
      work better; ^C is more responsive in multi threaded / SMP, and I
      fixed one case where the runtime wasn't responding to ^C at all.
      5638488b
  3. 13 Mar, 2006 1 commit
  4. 10 Mar, 2006 1 commit
  5. 07 Mar, 2006 1 commit
  6. 22 Feb, 2006 1 commit
  7. 12 Feb, 2006 1 commit
  8. 09 Feb, 2006 1 commit
    • Simon Marlow's avatar
      Merge the smp and threaded RTS ways · eba7b660
      Simon Marlow authored
      Now, the threaded RTS also includes SMP support.  The -smp flag is a
      synonym for -threaded.  The performance implications of this are small
      to negligible, and it results in a code cleanup and reduces the number
      of combinations we have to test.
      eba7b660
  9. 08 Feb, 2006 1 commit
    • Simon Marlow's avatar
      make the smp way RTS-only, normal libraries now work with -smp · beb5737b
      Simon Marlow authored
      We had to bite the bullet here and add an extra word to every thunk,
      to enable running ordinary libraries on SMP.  Otherwise, we would have
      needed to ship an extra set of libraries with GHC 6.6 in addition to
      the two sets we already ship (normal + profiled), and all Cabal
      packages would have to be compiled for SMP too.  We decided it best
      just to take the hit now, making SMP easily accessible to everyone in
      GHC 6.6.
      
      Incedentally, although this increases allocation by around 12% on
      average, the performance hit is around 5%, and much less if your inner
      loop doesn't use any laziness.
      beb5737b
  10. 23 Jan, 2006 1 commit
    • Simon Marlow's avatar
      implement clean/dirty TSOs · 9d909b3b
      Simon Marlow authored
      Along the lines of the clean/dirty arrays and IORefs implemented
      recently, now threads are marked clean or dirty depending on whether
      they need to be scanned during a minor GC or not.  This should speed
      up GC when there are lots of threads, especially if most of them are
      idle.
      9d909b3b
  11. 18 Jan, 2006 1 commit
  12. 28 Nov, 2005 1 commit
  13. 25 Nov, 2005 2 commits
  14. 24 Nov, 2005 1 commit
  15. 21 Nov, 2005 1 commit
  16. 18 Nov, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-11-18 15:24:12 by simonmar] · c5cd2343
      simonmar authored
      Two improvements to the SMP runtime:
      
        - support for 'par', aka sparks.  Load balancing is very primitive
          right now, but I have seen programs that go faster using par.
      
        - support for backing off when a thread is found to be duplicating
          a computation currently underway in another thread.  This also
          fixes some instability in SMP, because it turned out that when
          an update frame points to an indirection, which can happen if
          a thunk is under evaluation in multiple threads, then after GC
          has shorted out the indirection the update will trash the value.
          Now we suspend the duplicate computation to the heap before this
          can happen.
      
      Additionally:
      
        - stack squeezing is separate from lazy blackholing, and now only
          happens if there's a reasonable amount of squeezing to be done
          in relation to the number of words of stack that have to be moved.
          This means we won't try to shift 10Mb of stack just to save 2
          words at the bottom (it probably never happened, but still).
      
        - update frames are now marked when they have been visited by lazy
          blackholing, as per the SMP paper.
      
        - cleaned up raiseAsync() a bit.
      c5cd2343
  17. 08 Nov, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-11-08 15:07:08 by simonmar] · cbc83989
      simonmar authored
      SMP bugfix: if the thread we were just running blocked, then we are in
      a delicate state - we don't necessarily have access to the TSO we were
      just running, because we relinquished it when we put it on whatever
      blocking queue it is on.  It might even be running already.
      
      Previously I made the scheduler quickly loop again in this case.
      However, I made it loop too quickly: we should be sure to set the
      blackholes_need_checking flag if necessary, otherwise we can miss some
      wakeups.
      cbc83989
    • simonmar's avatar
      [project @ 2005-11-08 10:44:22 by simonmar] · 6e4e6a2a
      simonmar authored
      raiseAsync: fix bug that can cause a scavenge_stack panic for a thread
      that has just been killed.
      6e4e6a2a
  18. 07 Nov, 2005 1 commit
  19. 04 Nov, 2005 2 commits
  20. 03 Nov, 2005 2 commits
  21. 02 Nov, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-11-02 13:04:55 by simonmar] · db2468da
      simonmar authored
      when shutting down, don't allow a worker to exit until the run queue
      is empty, because the thread in exitScheduler() is waiting for this.
      db2468da
    • simonmar's avatar
      [project @ 2005-11-02 12:26:21 by simonmar] · d9dfeb2a
      simonmar authored
      scheduleHandleStackOverflow: fix bug in non-threaded RTS - if
      (task->tso != NULL), then (task->tso) is not necessarily the TSO we
      are running (in the threaded RTS it is).
      
      Also fix a few non-threaded warnings while I'm here.
      d9dfeb2a
  22. 27 Oct, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-10-27 15:26:06 by simonmar] · 677c6345
      simonmar authored
      - Very simple work-sharing amongst Capabilities: whenever a Capability
        detects that it has more than 1 thread in its run queue, it runs
        around looking for empty Capabilities, and shares the threads on its
        run queue equally with the free Capabilities it finds.
      
      - unlock the garbage collector's mutable lists, by having private
        mutable lists per capability (and per generation).  The private
        mutable lists are moved onto the main mutable lists at each GC.
        This pulls the old-generation update code out of the storage manager
        mutex, which is one of the last remaining causes of (alleged) contention.
      
      - Fix some problems with synchronising when a GC is required.  We should
        synchronise quicker now.
      677c6345
  23. 26 Oct, 2005 4 commits
    • simonmar's avatar
      [project @ 2005-10-26 15:36:06 by simonmar] · 9348149e
      simonmar authored
      Package up the various properties of Capabilities/Tasks that we were
      asserting all over the place, and put them in a single macro
      ASSERT_CAPABILITY_INVARIANTS().
      9348149e
    • simonmar's avatar
      [project @ 2005-10-26 15:20:59 by simonmar] · 05fa9867
      simonmar authored
      - forkProcess fix: add a forgotten rts_unlock()
      - add a couple more ASSERTs
      05fa9867
    • simonmar's avatar
      [project @ 2005-10-26 11:41:51 by simonmar] · 48d21c1f
      simonmar authored
      fix to previous change: allow workers to exit
      48d21c1f
    • simonmar's avatar
      [project @ 2005-10-26 10:42:54 by simonmar] · 7c82b4a8
      simonmar authored
      - change the type of StgRun(): now we return the Capability that the
        thread currently holds.  The return status of the thread is now
        stored in cap->r.rRet (a new slot in the reg table).
      
        This was necessary because on return from StgRun(), the current
        TSO may be blocked, so it no longer belongs to us.  If it is a bound
        thread, then the Task may have been already woken up on another
        Capability, so the scheduler can't use task->cap to find the
        capability it currently owns.
      
      - when shutting down, allow a bound thread to remove its TSO from
        the run queue when exiting (eliminates an error condition in
        releaseCapability()).
      7c82b4a8
  24. 21 Oct, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-10-21 14:02:17 by simonmar] · 03a9ff01
      simonmar authored
      Big re-hash of the threaded/SMP runtime
      
      This is a significant reworking of the threaded and SMP parts of
      the runtime.  There are two overall goals here:
      
        - To push down the scheduler lock, reducing contention and allowing
          more parts of the system to run without locks.  In particular,
          the scheduler does not require a lock any more in the common case.
      
        - To improve affinity, so that running Haskell threads stick to the
          same OS threads as much as possible.
      
      At this point we have the basic structure working, but there are some
      pieces missing.  I believe it's reasonably stable - the important
      parts of the testsuite pass in all the (normal,threaded,SMP) ways.
      
      In more detail:
      
        - Each capability now has a run queue, instead of one global run
          queue.  The Capability and Task APIs have been completely
          rewritten; see Capability.h and Task.h for the details.
      
        - Each capability has its own pool of worker Tasks.  Hence, Haskell
          threads on a Capability's run queue will run on the same worker
          Task(s).  As long as the OS is doing something reasonable, this
          should mean they usually stick to the same CPU.  Another way to
          look at this is that we're assuming each Capability is associated
          with a fixed CPU.
      
        - What used to be StgMainThread is now part of the Task structure.
          Every OS thread in the runtime has an associated Task, and it
          can ask for its current Task at any time with myTask().
      
        - removed RTS_SUPPORTS_THREADS symbol, use THREADED_RTS instead
          (it is now defined for SMP too).
      
        - The RtsAPI has had to change; we must explicitly pass a Capability
          around now.  The previous interface assumed some global state.
          SchedAPI has also changed a lot.
      
        - The OSThreads API now supports thread-local storage, used to
          implement myTask(), although it could be done more efficiently
          using gcc's __thread extension when available.
      
        - I've moved some POSIX-specific stuff into the posix subdirectory,
          moving in the direction of separating out platform-specific
          implementations.
      
        - lots of lock-debugging and assertions in the runtime.  In particular,
          when DEBUG is on, we catch multiple ACQUIRE_LOCK()s, and there is
          also an ASSERT_LOCK_HELD() call.
      
      What's missing so far:
      
        - I have almost certainly broken the Win32 build, will fix soon.
      
        - any kind of thread migration or load balancing.  This is high up
          the agenda, though.
      
        - various performance tweaks to do
      
        - throwTo and forkProcess still do not work in SMP mode
      03a9ff01
  25. 20 Oct, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-10-20 11:45:19 by simonmar] · 4f0f4342
      simonmar authored
      changes to exitScheduler(): instead of waiting for all the tasks to
      stop, which is unreasonable, we just wait for the run queue to drain.
      This is much quicker, but not ideal (see comments).
      4f0f4342
  26. 12 Oct, 2005 1 commit
  27. 16 Sep, 2005 1 commit
  28. 12 Sep, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-09-12 16:00:43 by simonmar] · ff05c281
      simonmar authored
      raiseAsync_: raise_info closure is header + MIN_UPD_SIZE, not header +
      1 words.  (MIN_UPD_SIZE is 1 in the HEAD so this has no effect, but
      it'll make a difference on STABLE).
      ff05c281
  29. 24 Aug, 2005 1 commit
  30. 12 Jul, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-07-12 13:34:03 by simonmar] · f85ef2f1
      simonmar authored
      schedulDoGC: when traversing the all_threads list checking for invalid
      transactions we were bogusly following the link field rather than the
      global_link field.
      f85ef2f1
  31. 11 Jul, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-07-11 12:29:28 by simonmar] · b8105b2b
      simonmar authored
      awakenBlockedQueue(): check for NULL.  This is a hack to workaround a
      bug that occurs when async exceptions, unsafePerformIO, and
      interruptible operations are used together.  See the comment in
      Exceptions.cmm and bug #1235728 for more details.
      b8105b2b
  32. 28 Jun, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-06-28 13:44:28 by simonmar] · 9c1b774a
      simonmar authored
      Add a comment that grabbing all the capabilities before GC causes the
      thread->capability hash table to acquire multiple entries for the
      current thread, which seems to be harmless.
      9c1b774a