09 Dec, 2006

1 commit

  • This facility provides three entry points:

    ilog2() Log base 2 of unsigned long
    ilog2_u32() Log base 2 of u32
    ilog2_u64() Log base 2 of u64

    These facilities can either be used inside functions on dynamic data:

    int do_something(long q)
    {
    ...;
    y = ilog2(x)
    ...;
    }

    Or can be used to statically initialise global variables with constant values:

    unsigned n = ilog2(27);

    When performing static initialisation, the compiler will report "error:
    initializer element is not constant" if asked to take a log of zero or of
    something not reducible to a constant. They treat negative numbers as
    unsigned.

    When not dealing with a constant, they fall back to using fls() which permits
    them to use arch-specific log calculation instructions - such as BSR on
    x86/x86_64 or SCAN on FRV - if available.

    [akpm@osdl.org: MMC fix]
    Signed-off-by: David Howells
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Herbert Xu
    Cc: David Howells
    Cc: Wojtek Kaniewski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

04 Dec, 2006

1 commit


29 Sep, 2006

1 commit

  • iSER uses the DMA mapping api to map the page holding the
    SCSI command data to the HCA DMA address space. When the
    command data is not aligned for RDMA, the data is copied
    to/from an allocated buffer which in turn is used for
    executing this command. The pages associated with the
    command must be unmapped before being touched.

    Signed-off-by: Erez Zilber
    Signed-off-by: Roland Dreier

    Erez Zilber
     

23 Sep, 2006

4 commits

  • Fast Memory Registration (fmr) is used to register for rdma an sg whose
    elements are not linearly sequential after dma mapping.

    The IB verbs layer provides an "all dma memory MR (memory region)" which
    can be used for RDMA-ing a dma linearly sequential buffer.

    Change the code to use the dma mr instead of doing fmr when dma mapping
    produces a single dma entry sg.

    Signed-off-by: Erez Zilber
    Signed-off-by: Roland Dreier

    Erez Zilber
     
  • fix and add some debug prints related to iser
    handling of memory for rdma.

    Signed-off-by: Erez Zilber
    Signed-off-by: Roland Dreier

    Erez Zilber
     
  • As iser is able to use at most one rdma operation for the
    execution of a scsi command, and registration of the sg
    associated with scsi command has its restrictions, the code
    checks if an sg is "aligned for rdma".

    Alignment for rdma is measured in "fmr page" units whose
    possible resolutions are different between HCAs and can be
    smaller, equal or bigger to the system page size.

    When the system page size is bigger than 4KB (eg the default
    with ia64 kernels) there a bigger chance that an sg would be
    aligned for rdma if the fmr page size is 4KB.

    Change the code to create FMR whose pages are of size 4KB
    and to take that into account when processing the sg.

    Signed-off-by: Erez Zilber
    Signed-off-by: Roland Dreier

    Erez Zilber
     
  • dma mapping may include a "compaction" of the sg associated with scsi command.
    Hence, the size of the maximal prefix of the SG which is aligned for rdma must be
    compared against the length of the dma mapped sg (mem->dma_nents) and not against
    the size of it before it was mapped (mem->size).

    Signed-off-by: Erez Zilber
    Signed-off-by: Roland Dreier

    Erez Zilber
     

22 Jun, 2006

1 commit

  • This file contains the processing carried over an SG list associated with
    a SCSI command such that it can be registered with the IB verbs. The
    registration produces a network virtual address (VA) and a remote access
    key (RKEY or STAG in iSER spec notation) which are used by the target for
    its RDMA operation.

    Signed-off-by: Or Gerlitz
    Signed-off-by: Roland Dreier

    Or Gerlitz