1. 20 12月, 2011 1 次提交
  2. 29 11月, 2011 1 次提交
  3. 09 11月, 2011 1 次提交
  4. 05 11月, 2011 1 次提交
    • M
      IB/qib: Fix panic in RC error flushing logic · 30ab7e23
      Mike Marciniszyn 提交于
      The following panic can occur when flushing a QP:
      
          RIP: 0010:[<ffffffffa0168e8b>]  [<ffffffffa0168e8b>] qib_send_complete+0x3b/0x190 [ib_qib]
          RSP: 0018:ffff8803cdc6fc90  EFLAGS: 00010046
          RAX: 0000000000000000 RBX: ffff8803d84ba000 RCX: 0000000000000000
          RDX: 0000000000000005 RSI: ffffc90015a53430 RDI: ffff8803d84ba000
          RBP: ffff8803cdc6fce0 R08: ffff8803cdc6fc90 R09: 0000000000000001
          R10: 00000000ffffffff R11: 0000000000000000 R12: ffff8803d84ba0c0
          R13: ffff8803d84ba5cc R14: 0000000000000800 R15: 0000000000000246
          FS:  0000000000000000(0000) GS:ffff880036600000(0000) knlGS:0000000000000000
          CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
          CR2: 0000000000000034 CR3: 00000003e44f9000 CR4: 00000000000406f0
          DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
          DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
          Process qib/0 (pid: 1350, threadinfo ffff8803cdc6e000, task ffff88042728a100)
          Stack:
           53544c5553455201 0000000100000005 0000000000000000 ffff8803d84ba000
           0000000000000000 0000000000000000 0000000000000000 0000000000000000
           0000000000000000 0000000000000001 ffff8803cdc6fd30 ffffffffa0165d7a
          Call Trace:
           [<ffffffffa0165d7a>] qib_make_rc_req+0x36a/0xe80 [ib_qib]
           [<ffffffffa0165a10>] ?  qib_make_rc_req+0x0/0xe80 [ib_qib]
           [<ffffffffa01698b3>] qib_do_send+0xf3/0xb60 [ib_qib]
           [<ffffffff814db757>] ? thread_return+0x4e/0x777
           [<ffffffffa01697c0>] ? qib_do_send+0x0/0xb60 [ib_qib]
           [<ffffffff81088bf0>] worker_thread+0x170/0x2a0
           [<ffffffff8108e530>] ?  autoremove_wake_function+0x0/0x40
           [<ffffffff81088a80>] ? worker_thread+0x0/0x2a0
           [<ffffffff8108e1c6>] kthread+0x96/0xa0
           [<ffffffff8100c1ca>] child_rip+0xa/0x20
           [<ffffffff8108e130>] ? kthread+0x0/0xa0
           [<ffffffff8100c1c0>] ? child_rip+0x0/0x20
          RIP  [<ffffffffa0168e8b>] qib_send_complete+0x3b/0x190 [ib_qib]
      
      The RC error state flush logic in qib_make_rc_req() could return all
      of the acked wqes and potentially have emptied the queue.  It would
      then unconditionally try return a flush completion via
      qib_send_complete() for an invalid wqe, or worse a valid one that is
      not queued. The panic results when the completion code tries to
      maintain an MR reference count for a NULL MR.
      
      This fix modifies logic to only send one completion per
      qib_make_rc_req() call and changing the completion status from
      IB_WC_SUCCESS to IB_WC_WR_FLUSH_ERR as the completions progress.
      
      The outer loop will call as many times as necessary to flush the queue.
      Reviewed-by: NRam Vepa <ram.vepa@qlogic.com>
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@qlogic.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      30ab7e23
  5. 01 11月, 2011 5 次提交
  6. 22 10月, 2011 8 次提交
  7. 14 10月, 2011 1 次提交
  8. 07 10月, 2011 1 次提交
  9. 23 7月, 2011 1 次提交
    • M
      IB/qib: Defer HCA error events to tasklet · e67306a3
      Mike Marciniszyn 提交于
      With ib_qib options:
      
          options ib_qib krcvqs=1 pcie_caps=0x51 rcvhdrcnt=4096 singleport=1 ibmtu=4
      
      a run of ib_write_bw -a yields the following:
      
          ------------------------------------------------------------------
           #bytes     #iterations    BW peak[MB/sec]    BW average[MB/sec]
           1048576   5000           2910.64            229.80
          ------------------------------------------------------------------
      
      The top cpu use in a profile is:
      
          CPU: Intel Architectural Perfmon, speed 2400.15 MHz (estimated)
          Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask
          of 0x00 (No unit mask) count 1002300
          Counted LLC_MISSES events (Last level cache demand requests from this core that
          missed the LLC) with a unit mask of 0x41 (No unit mask) count 10000
          samples  %        samples  %        app name                 symbol name
          15237    29.2642  964      17.1195  ib_qib.ko                qib_7322intr
          12320    23.6618  1040     18.4692  ib_qib.ko                handle_7322_errors
          4106      7.8860  0              0  vmlinux                  vsnprintf
      
      
      Analysis of the stats, profile, the code, and the annotated profile indicate:
       - All of the overflow interrupts (one per packet overflow) are
         serviced on CPU0 with no mitigation on the frequency.
       - All of the receive interrupts are being serviced by CPU0.  (That is
         the way truescale.cmds statically allocates the kctx IRQs to CPU)
       - The code is spending all of its time servicing QIB_I_C_ERROR
         RcvEgrFullErr interrupts on CPU0, starving the packet receive
         processing.
       - The decode_err routine is very inefficient, using a printf variant
         to format a "%s" and continues to loop when the errs mask has been
         cleared.
       - Both qib_7322intr and handle_7322_errors read pci registers, which
         is very inefficient.
      
      The fix does the following:
       - Adds a tasklet to service QIB_I_C_ERROR
       - Replaces the very inefficient scnprintf() with a memcpy().  A field
         is added to qib_hwerror_msgs to save the sizeof("string") at
         compile time so that a strlen is not needed during err_decode().
       - The most frequent errors (Overflows) are serviced first to exit the
         loop as early as possible.
       - The loop now exits as soon as the errs mask is clear rather than
         fruitlessly looping through the msp array.
      
      With this fix the performance changes to:
      
          ------------------------------------------------------------------
           #bytes     #iterations    BW peak[MB/sec]    BW average[MB/sec]
           1048576   5000           2990.64            2941.35
          ------------------------------------------------------------------
      
      During testing of the error handling overflow patch, it was determined
      that some CPU's were slower when servicing both overflow and receive
      interrupts on CPU0 with different MSI interrupt vectors.
      
      This patch adds an option (krcvq01_no_msi) to not use a dedicated MSI
      interrupt for kctx's < 2 and to service them on the default interrupt.
      For some CPUs, the cost of the interrupt enter/exit is more costly
      than then the additional PCI read in the default handler.
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@qlogic.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      e67306a3
  10. 19 7月, 2011 7 次提交
  11. 18 6月, 2011 1 次提交
  12. 21 5月, 2011 1 次提交
  13. 12 5月, 2011 1 次提交
  14. 10 5月, 2011 1 次提交
  15. 27 4月, 2011 1 次提交
  16. 31 3月, 2011 1 次提交
  17. 18 3月, 2011 1 次提交
    • H
      mm: export __get_user_pages · 0014bd99
      Huang Ying 提交于
      In most cases, get_user_pages and get_user_pages_fast should be used
      to pin user pages in memory.  But sometimes, some special flags except
      FOLL_GET, FOLL_WRITE and FOLL_FORCE are needed, for example in
      following patch, KVM needs FOLL_HWPOISON.  To support these users,
      __get_user_pages is exported directly.
      
      There are some symbol name conflicts in infiniband driver, fixed them too.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Michel Lespinasse <walken@google.com>
      CC: Roland Dreier <roland@kernel.org>
      CC: Ralph Campbell <infinipath@qlogic.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      0014bd99
  18. 15 3月, 2011 2 次提交
  19. 23 2月, 2011 1 次提交
  20. 18 2月, 2011 1 次提交
    • M
      IB/qib: Prevent double completions after a timeout or RNR error · c0af2c05
      Mike Marciniszyn 提交于
      There is a double completion associated with error handling for RC QPs.
      
      The sequence is:
      
       - The do_rc_ack() routine fields an RNR nack and there are 0
         rnr_retries configured on the QP.
       - qib_error_qp() stops the pending timer
       - qib_rc_send_complete() is called from sdma_complete()
       - qib_rc_send_complete() starts the timer because the msb of the psn
         just completed says an ack is needed.
       - a bunch of flushes occur as ipoib posts WQEs to an error'ed QP
       - rc_timeout() calls qib_restart_rc()
       - qib_restart_rc() calls qib_send_complete() with a
         IB_WC_RETRY_EXC_ERR on a wqe that has already been completed in the
         past
      
      The fix avoids starting the timer since another packet will never
      arrive.
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@qlogic.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      c0af2c05
  21. 11 2月, 2011 1 次提交
    • M
      IB/qib: Fix double add_timer() · 414ed90c
      Mike Marciniszyn 提交于
      The following panic BUG_ON occurs during qib testing:
      
          Kernel BUG at include/linux/timer.h:82
      
          RIP  [<ffffffff881f7109>] :ib_qib:start_timer+0x73/0x89
           RSP <ffffffff80425bd0>
           <0>Kernel panic - not syncing: Fatal exception
           <0>Dumping qib trace buffer from panic
          qib_set_lid INFO: IB0:1 got a lid: 0xf8
          Done dumping qib trace buffer
          BUG: warning at kernel/panic.c:137/panic() (Tainted: G
      
      The flaw is due to a missing state test when processing responses that
      results in an add_timer() call when the same timer is already queued.
      This code was executing in parallel with a QP destroy on another CPU
      that had changed the state to reset, but the missing test caused to
      response handling code to run on into the panic.
      Signed-off-by: NMike Marciniszyn <mike.marciniszyn@qlogic.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      414ed90c
  22. 29 1月, 2011 1 次提交