1. 03 6月, 2014 1 次提交
  2. 10 12月, 2013 1 次提交
    • J
      mlx4_core: Roll back round robin bitmap allocation commit for CQs, SRQs, and MPTs · 7c6d74d2
      Jack Morgenstein 提交于
      Commit f4ec9e95 "mlx4_core: Change bitmap allocator to work in round-robin fashion"
      introduced round-robin allocation (via bitmap) for all resources which allocate
      via a bitmap.
      
      Round robin allocation is desirable for mcgs, counters, pd's, UARs, and xrcds.
      These are simply numbers, with no involvement of ICM memory mapping.
      
      Round robin is required for QPs, since we had a problem with immediate
      reuse of a 24-bit QP number (commit f4ec9e95).
      
      However, for other resources which use the bitmap allocator and involve
      mapping ICM memory -- MPTs, CQs, SRQs -- round-robin is not desirable.
      
      What happens in these cases is the following:
      
      ICM memory is allocated and mapped in chunks of 256K.
      
      Since the resource allocation index goes up monotonically, the allocator
      will eventually require mapping a new chunk. Now, chunks are also unmapped
      when their reference count goes back to zero.  Thus, if a single app is
      running and starts/exits frequently we will have the following situation:
      
      When the app starts, a new chunk must be allocated and mapped.
      
      When the app exits, the chunk reference count goes back to zero, and the
      chunk is unmapped and freed. Therefore, the app must pay the cost of allocation
      and mapping of ICM memory each time it runs (although the price is paid only when
      allocating the initial entry in the new chunk).
      
      For apps which allocate MPTs/SRQs/CQs and which operate as described above,
      this presented a performance problem.
      
      We therefore roll back the round-robin allocator modification for MPTs, CQs, SRQs.
      Reported-by: NMatthew Finlay <matt@mellanox.com>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c6d74d2
  3. 15 5月, 2012 1 次提交
    • J
      mlx4_core: Change bitmap allocator to work in round-robin fashion · f4ec9e95
      Jack Morgenstein 提交于
      Under most circumstances, the bitmap allocator does not allocate the
      same full 24-bit QP number immediately after a QP is destroyed.
      
      This works by using the upper bits of a 24-bit QP number, beyond the
      number of QPs that are actually available in the low level driver.
      For example, say that the HCA is willing to allocate a maximum of 64K
      qps.  We use the bits 23..16 as a "counter" which is incremented by 1
      at each allocation so that even if the same physical QP is
      re-allocated, it will not receive the same 24-bit QP number.
      
      However, we have seen the following scenario:
      1. Allocate, say, 255 QPs in succession.  This will cause a wrap of the "counter".
      2. Destroy the first QP allocated, then allocate a new QP.  The new QP,
         because of the counter wraparound, will get the same FULL QP number as
         the QP just destroyed!
      
      This is a problem because packets in transit can be erroneously
      delivered to the new QP when they were meant for the old (destroyed)
      QP, because the full QP number of the new QP is identical to the
      destroyed QP.  (The "counter" mechanism is meant to prevent this by
      having the full 24-bit QP numbers differ even if the physical QP on
      the HCA is the same.  As we see above, however, this mechanism does
      not always work).
      
      The best fix for this problem is to allocate QPs in round-robin mode,
      so that the physical QP numbers are not immediately re-used.
      Found-by: NMatthew Finlay <matt@mellanox.com>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      f4ec9e95
  4. 01 11月, 2011 1 次提交
  5. 11 8月, 2011 1 次提交
  6. 24 3月, 2011 1 次提交
  7. 11 1月, 2011 1 次提交
  8. 29 8月, 2010 1 次提交
    • A
      mlx4: use bitmap library · e27cd4f8
      Akinobu Mita 提交于
      Replace loops calling set_bit() and clear_bit() with bitmap_set() and
      bitmap_clear().
      
      Unlike loops calling set_bit() and clear_bit(), bitmap_set() and
      bitmap_clear() are not atomic. But this is ok.
      Because the bitmap operations are protected by bitmap->lock
      except for initialization of the bitmap in mlx4_bitmap_init().
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Roland Dreier <rolandd@cisco.com>
      Cc: netdev@vger.kernel.org
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e27cd4f8
  9. 18 8月, 2010 1 次提交
  10. 16 12月, 2009 1 次提交
  11. 23 10月, 2008 1 次提交
  12. 11 10月, 2008 1 次提交
  13. 25 9月, 2008 1 次提交
    • A
      drivers/net/mlx4/alloc.c needs mm.h · 6526128c
      Andrew Morton 提交于
      sparc32 allmodconfig with linux-next:
      
      drivers/net/mlx4/alloc.c: In function 'mlx4_buf_alloc':
      drivers/net/mlx4/alloc.c:164: error: 'PAGE_KERNEL' undeclared (first use in this function)
      drivers/net/mlx4/alloc.c:164: error: (Each undeclared identifier is reported only once
      drivers/net/mlx4/alloc.c:164: error: for each function it appears in.)
      
      this is due to some header shuffle in linux-next.  I didn't look to see what
      it was.  I'd sugges that this patch be merged ahead of a linux-next merge to
      avoid bisection breaks.
      
      We strictly only need asm/pgtable.h, but going direct to asm includes always
      seems grubby.
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6526128c
  14. 26 7月, 2008 1 次提交
  15. 26 4月, 2008 1 次提交
  16. 24 4月, 2008 1 次提交
  17. 12 2月, 2008 1 次提交
    • O
      mlx4_core: Fix build break (missing include) · 29c27112
      Olof Johansson 提交于
      Commit 313abe55 ("mlx4_core: For 64-bit systems, vmap() kernel queue
      buffers") caused this to pop up on powerpc allyesconfig, looks like a
      missing include file:
      
          drivers/net/mlx4/alloc.c: In function 'mlx4_buf_alloc':
          drivers/net/mlx4/alloc.c:162: error: implicit declaration of function 'vmap'
          drivers/net/mlx4/alloc.c:162: error: 'VM_MAP' undeclared (first use in this function)
          drivers/net/mlx4/alloc.c:162: error: (Each undeclared identifier is reported only once
          drivers/net/mlx4/alloc.c:162: error: for each function it appears in.)
          drivers/net/mlx4/alloc.c:162: warning: assignment makes pointer from integer without a cast
          drivers/net/mlx4/alloc.c: In function 'mlx4_buf_free':
          drivers/net/mlx4/alloc.c:187: error: implicit declaration of function 'vunmap'
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      29c27112
  18. 07 2月, 2008 2 次提交
  19. 14 11月, 2007 1 次提交
  20. 30 5月, 2007 1 次提交
  21. 16 5月, 2007 1 次提交
  22. 09 5月, 2007 1 次提交
    • R
      IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters · 225c7b1f
      Roland Dreier 提交于
      Add an InfiniBand driver for Mellanox ConnectX adapters.  Because
      these adapters can also be used as ethernet NICs and Fibre Channel 
      HBAs, the driver is split into two modules: 
       
        mlx4_core: Handles low-level things like device initialization and 
          processing firmware commands.  Also controls resource allocation 
          so that the InfiniBand, ethernet and FC functions can share a 
          device without stepping on each other. 
       
        mlx4_ib: Handles InfiniBand-specific things; plugs into the 
          InfiniBand midlayer. 
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      225c7b1f