1. 24 7月, 2013 3 次提交
  2. 09 7月, 2013 1 次提交
  3. 01 7月, 2013 8 次提交
  4. 10 6月, 2013 1 次提交
    • M
      powerpc/perf: Fix deadlock caused by calling printk() in PMU exception · 6772faa1
      Michael Ellerman 提交于
      In commit bc09c219 "Fix finding overflowed PMC in interrupt" we added
      a printk() to the PMU exception handler. Unfortunately that is not safe.
      
      The problem is that the PMU exception may run even when interrupts are
      soft disabled, aka NMI context. We do this so that we can profile parts
      of the kernel that have interrupts soft-disabled.
      
      But by calling printk() from the exception handler, we can potentially
      deadlock in the printk code on logbuf_lock, eg:
      
        [c00000038ba575c0] c000000000081928 .vprintk_emit+0xa8/0x540
        [c00000038ba576a0] c0000000007bcde8 .printk+0x48/0x58
        [c00000038ba57710] c000000000076504 .perf_event_interrupt+0x2d4/0x490
        [c00000038ba57810] c00000000001f6f8 .performance_monitor_exception+0x48/0x60
        [c00000038ba57880] c0000000000032cc performance_monitor_common+0x14c/0x180
        --- Exception: f01 (Performance Monitor) at c0000000007b25d4 ._raw_spin_lock_irq
        +0x64/0xc0
        [c00000038ba57bf0] c00000000007ed90 .devkmsg_read+0xd0/0x5a0
        [c00000038ba57d00] c0000000001c2934 .vfs_read+0xc4/0x1e0
        [c00000038ba57d90] c0000000001c2cd8 .SyS_read+0x58/0xd0
        [c00000038ba57e30] c000000000009d54 syscall_exit+0x0/0x98
        --- Exception: c01 (System Call) at 00001fffffbf6f7c
        SP (3ffff6d4de10) is in userspace
      
      Fix it by making sure we only call printk() when we are not in NMI
      context.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Cc: <stable@vger.kernel.org> # 3.9
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      6772faa1
  5. 01 6月, 2013 2 次提交
  6. 29 5月, 2013 1 次提交
  7. 14 5月, 2013 3 次提交
  8. 26 4月, 2013 9 次提交
  9. 14 3月, 2013 1 次提交
  10. 01 2月, 2013 3 次提交
  11. 29 1月, 2013 1 次提交
  12. 10 1月, 2013 3 次提交
    • M
      powerpc/perf: Fix for PMCs not making progress · e13e895f
      Michael Neuling 提交于
      On POWER7 when we have really small counts left before overflow, we can take a
      PMU IRQ, but the PMC gets wound back to just before the overflow.
      
      If the kernel is setting the PMC to a value just before the overflow, we can
      get interrupted again without the PMC making any progress (ie another buggy
      overflow).  In this case, we can end up making no forward progress, with the
      PMC interrupt returning us to the same count over and over.
      
      The below detects when we are making no forward progress (ie. delta = 0) and
      then increases the amount left before the overflow.  This stops us from locking
      up.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Reviewed-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      cc: Paul Mackerras <paulus@samba.org>
      cc: Anton Blanchard <anton@samba.org>
      cc: Linux PPC dev <linuxppc-dev@ozlabs.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e13e895f
    • M
      powerpc/perf: Fix finding overflowed PMC in interrupt · bc09c219
      Michael Neuling 提交于
      If a PMC is about to overflow on a counter that's on an active perf event
      (ie. less than 256 from the end) and a _different_ PMC overflows just at this
      time (a PMC that's not on an active perf event), we currently mark the event as
      found, but in reality it's not as it's likely the other PMC that caused the
      IRQ.  Since we mark it as found the second catch all for overflows doesn't run,
      and we don't reset the overflowing PMC ever.  Hence we keep hitting that same
      PMC IRQ over and over and don't reset the actual overflowing counter.
      
      This is a rewrite of the perf interrupt handler for book3s to get around this.
      We now check to see if any of the PMCs have actually overflowed (ie >=
      0x80000000).  If yes, record it for active counters and just reset it for
      inactive counters.  If it's not overflowed, then we check to see if it's one of
      the buggy power7 counters and if it is, record it and continue.  If none of the
      PMCs match this, then we make note that we couldn't find the PMC that caused
      the IRQ.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Reviewed-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      cc: Paul Mackerras <paulus@samba.org>
      cc: Anton Blanchard <anton@samba.org>
      cc: Linux PPC dev <linuxppc-dev@ozlabs.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      bc09c219
    • C
      powerpc/perf: Add stalled-cycles events · 15fab56e
      Chris Freehill 提交于
      Support for stalled-cycles-frontend and stalled-cycles-backend is
      added for e500-based processors.
      
      The following mappings are used:
      
      stalled-cycles-frontend or idle-cycles-frontend:
      Com:18 Cycles decode stalled
      
      stalled-cycles-backend or idle-cycles-backend
      Com:19 cycles issue stalled
      Signed-off-by: NChris Freehill <chrisf@freescale.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      15fab56e
  13. 15 11月, 2012 1 次提交
  14. 18 10月, 2012 1 次提交
  15. 27 9月, 2012 1 次提交
  16. 05 9月, 2012 1 次提交