1. 08 5月, 2008 7 次提交
  2. 07 5月, 2008 2 次提交
    • R
      RDMA/cxgb3: Fix severe limit on userspace memory registration size · 273748cc
      Roland Dreier 提交于
      Currently, iw_cxgb3 is severely limited on the amount of userspace
      memory that can be registered in in a single memory region, which
      causes big problems for applications that expect to be able to
      register 100s of MB.
      
      The problem is that the driver uses a single kmalloc()ed buffer to
      hold the physical buffer list (PBL) for the entire memory region
      during registration, which means that 8 bytes of contiguous memory are
      required for each page of memory being registered.  For example, a 64
      MB registration will require 128 KB of contiguous memory with 4 KB
      pages, and it unlikely that such an allocation will succeed on a busy
      system.
      
      This is purely a driver problem: the temporary page list buffer is not
      needed by the hardware, so we can fix this by writing the PBL to the
      hardware in page-sized chunks rather than all at once.  We do this by
      splitting the memory registration operation up into several steps:
      
       - Allocate PBL space in adapter memory for the full registration
       - Copy PBL to adapter memory in chunks
       - Allocate STag and enable memory region
      
      This also allows several other cleanups to the __cxio_tpt_op()
      interface and related parts of the driver.
      
      This change leaves the reregister memory region and memory window
      operations broken, but they already didn't work due to other
      longstanding bugs, so fixing them will be left to a later patch.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      273748cc
    • R
      RDMA/cxgb3: Don't add PBL memory to gen_pool in chunks · 0e991336
      Roland Dreier 提交于
      Current iw_cxgb3 code adds PBL memory to the driver's gen_pool in 2 MB
      chunks.  This limits the largest single allocation that can be done to
      the same size, which means that with 4 KB pages, each of which takes 8
      bytes of PBL memory, the largest memory region that can be allocated
      is 1 GB (256K PBL entries * 4 KB/entry).
      
      Remove this limit by adding all the PBL memory in a single gen_pool
      chunk, if possible.  Add code that falls back to smaller chunks if
      gen_pool_add() fails, which can happen if there is not sufficient
      contiguous lowmem for the internal gen_pool bitmap.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      0e991336
  3. 06 5月, 2008 31 次提交