12 Jul, 2019

1 commit

  • Pull SCSI scatter-gather list updates from James Bottomley:
    "This topic branch covers a fundamental change in how our sg lists are
    allocated to make mq more efficient by reducing the size of the
    preallocated sg list.

    This necessitates a large number of driver changes because the
    previous guarantee that if a driver specified SG_ALL as the size of
    its scatter list, it would get a non-chained list and didn't need to
    bother with scatterlist iterators is now broken and every driver
    *must* use scatterlist iterators.

    This was broken out as a separate topic because we need to convert all
    the drivers before pulling the trigger and unconverted drivers kept
    being found, necessitating a rebase"

    * tag 'scsi-sg' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (21 commits)
    scsi: core: don't preallocate small SGL in case of NO_SG_CHAIN
    scsi: lib/sg_pool.c: clear 'first_chunk' in case of no preallocation
    scsi: core: avoid preallocating big SGL for data
    scsi: core: avoid preallocating big SGL for protection information
    scsi: lib/sg_pool.c: improve APIs for allocating sg pool
    scsi: esp: use sg helper to iterate over scatterlist
    scsi: NCR5380: use sg helper to iterate over scatterlist
    scsi: wd33c93: use sg helper to iterate over scatterlist
    scsi: ppa: use sg helper to iterate over scatterlist
    scsi: pcmcia: nsp_cs: use sg helper to iterate over scatterlist
    scsi: imm: use sg helper to iterate over scatterlist
    scsi: aha152x: use sg helper to iterate over scatterlist
    scsi: s390: zfcp_fc: use sg helper to iterate over scatterlist
    scsi: staging: unisys: visorhba: use sg helper to iterate over scatterlist
    scsi: usb: image: microtek: use sg helper to iterate over scatterlist
    scsi: pmcraid: use sg helper to iterate over scatterlist
    scsi: ipr: use sg helper to iterate over scatterlist
    scsi: mvumi: use sg helper to iterate over scatterlist
    scsi: lpfc: use sg helper to iterate over scatterlist
    scsi: advansys: use sg helper to iterate over scatterlist
    ...

    Linus Torvalds
     

21 Jun, 2019

2 commits

  • If user doesn't ask to preallocate by passing zero 'nents_first_chunk' to
    sg_alloc_table_chained, we need to make sure that 'first_chunk' is cleared.
    Otherwise, __sg_alloc_table() still may think that the 1st SGL should be
    from the preallocation.

    Fixes the issue by clearing 'first_chunk' in sg_alloc_table_chained() if
    'nents_first_chunk' is zero.

    Cc: Christoph Hellwig
    Cc: Bart Van Assche
    Cc: Ewan D. Milne
    Cc: Hannes Reinecke
    Cc: Guenter Roeck
    Reported-by: Guenter Roeck
    Tested-by: Guenter Roeck
    Signed-off-by: Ming Lei
    Signed-off-by: Martin K. Petersen

    Ming Lei
     
  • sg_alloc_table_chained() currently allows the caller to provide one
    preallocated SGL and returns if the requested number isn't bigger than
    size of that SGL. This is used to inline an SGL for an IO request.

    However, scattergather code only allows that size of the 1st preallocated
    SGL to be SG_CHUNK_SIZE(128). This means a substantial amount of memory
    (4KB) is claimed for the SGL for each IO request. If the I/O is small, it
    would be prudent to allocate a smaller SGL.

    Introduce an extra parameter to sg_alloc_table_chained() and
    sg_free_table_chained() for specifying size of the preallocated SGL.

    Both __sg_free_table() and __sg_alloc_table() assume that each SGL has the
    same size except for the last one. Change the code to allow both functions
    to accept a variable size for the 1st preallocated SGL.

    [mkp: attempted to clarify commit desc]

    Cc: Christoph Hellwig
    Cc: Bart Van Assche
    Cc: Ewan D. Milne
    Cc: Hannes Reinecke
    Cc: Sagi Grimberg
    Cc: Chuck Lever
    Cc: netdev@vger.kernel.org
    Cc: linux-nvme@lists.infradead.org
    Suggested-by: Christoph Hellwig
    Signed-off-by: Ming Lei
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Ming Lei
     

21 May, 2019

1 commit

  • Add SPDX license identifiers to all files which:

    - Have no license information of any form

    - Have EXPORT_.*_SYMBOL_GPL inside which was used in the
    initial scan/conversion to ignore the file

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

31 Oct, 2018

1 commit


16 Apr, 2016

1 commit