1. 24 Aug, 2014 6 commits
    • Dmitriy Vyukov's avatar
      runtime: fix races on mheap.allspans · 7f223e3b
      Dmitriy Vyukov authored
      This is based on the crash dump provided by Alan
      and on mental experiments:
      
      sweep 0 74
      fatal error: gc: unswept span
      runtime stack:
      runtime.throw(0x9df60d)
      markroot(0xc208002000, 0x3)
      runtime.parfordo(0xc208002000)
      runtime.gchelper()
      
      I think that when we moved all stacks into heap,
      we introduced a bunch of bad data races. This was later
      worsened by parallel stack shrinking.
      
      Observation 1: exitsyscall can allocate a stack from heap at any time (including during STW).
      Observation 2: parallel stack shrinking can (surprisingly) grow heap during marking.
      Consider that we steadily grow stacks of a number of goroutines from 8K to 16K.
      And during GC they all can be shrunk back to 8K. Shrinking will allocate lots of 8K
      stacks, and we do not necessary have that many in heap at this moment. So shrinking
      can grow heap as well.
      
      Consequence: any access to mheap.allspans in GC (and otherwise) must take heap lock.
      This is not true in several places.
      
      Fix this by protecting accesses to mheap.allspans and introducing allspans cache for marking,
      similar to what we use for sweeping.
      
      LGTM=rsc
      R=golang-codereviews, rsc
      CC=adonovan, golang-codereviews, khr, rlh
      https://golang.org/cl/126510043
      7f223e3b
    • Dmitriy Vyukov's avatar
      runtime: cache unrolled GC bitmask · b91223ed
      Dmitriy Vyukov authored
      Cache unrolled GC bitmask for types up to 64/32K on 64/32-bit systems,
      this corresponds to up to 4K cached bitmask.
      Perf builders say that 2% of time is spent in unrollgcproginplace_m/unrollgcprog1
      on http benchmark:
      http://goperfd.appspot.com/log/f42045f45bf61a0da53b724a7c8567824a0ad6c9
      
      LGTM=rsc
      R=golang-codereviews, rsc
      CC=golang-codereviews, khr, rlh
      https://golang.org/cl/122680043
      b91223ed
    • Dmitriy Vyukov's avatar
      runtime: convert sigqueue to Go · 651d0cf2
      Dmitriy Vyukov authored
      LGTM=rsc
      R=golang-codereviews, rsc
      CC=golang-codereviews, khr
      https://golang.org/cl/132090043
      651d0cf2
    • Dmitriy Vyukov's avatar
      runtime: convert parfor to Go · 98bebcc9
      Dmitriy Vyukov authored
      LGTM=rsc
      R=golang-codereviews, rsc
      CC=golang-codereviews, khr
      https://golang.org/cl/132100043
      98bebcc9
    • Russ Cox's avatar
      runtime: adjust errorCString definition to avoid allocation · 48452a27
      Russ Cox authored
      The low-level implementation of divide on ARM assumes that
      it can panic with an error created by newErrorCString without
      allocating. If we make interface data words require pointer values,
      the current definition would require an allocation when stored
      in an interface. Changing the definition to use unsafe.Pointer
      instead of uintptr avoids the allocation. This change is okay
      because the field really is a pointer (to a C string in rodata).
      
      Update #8405.
      
      This should make CL 133830043 safe to try again.
      
      LGTM=bradfitz
      R=golang-codereviews, bradfitz
      CC=dave, golang-codereviews, r
      https://golang.org/cl/133820043
      48452a27
    • Dave Cheney's avatar
      undo CL 130240043 / b09f70c301a5 · 5b70b712
      Dave Cheney authored
      This change broke divmod.go on all arm platforms.
      
      ««« original CL description
      cmd/gc: change interface representation: only pointers in data word
      
      Note that there are various cleanups that can be made if we keep
      this change, but I do not want to start making changes that
      depend on this one until the 1.4 cycle closes.
      
      Fixes #8405.
      
      LGTM=r
      R=golang-codereviews, adg, r, bradfitz
      CC=golang-codereviews, iant
      https://golang.org/cl/130240043
      »»»
      
      LGTM=rsc
      R=rsc
      CC=golang-codereviews
      https://golang.org/cl/133810043
      5b70b712
  2. 23 Aug, 2014 4 commits
  3. 22 Aug, 2014 10 commits
  4. 21 Aug, 2014 19 commits
  5. 20 Aug, 2014 1 commit