linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/21] Introduce common scatterlist map function
@ 2017-04-25 18:20 Logan Gunthorpe
  2017-04-25 18:20 ` [PATCH v2 01/21] scatterlist: Introduce sg_map helper functions Logan Gunthorpe
                   ` (20 more replies)
  0 siblings, 21 replies; 46+ messages in thread
From: Logan Gunthorpe @ 2017-04-25 18:20 UTC (permalink / raw)
  To: linux-kernel, linux-crypto, linux-media, dri-devel, intel-gfx,
	linux-raid, linux-mmc, linux-nvdimm, linux-scsi, open-iscsi,
	megaraidlinux.pdl, sparmaintainer, devel, target-devel, netdev,
	linux-rdma, dm-devel
  Cc: Christoph Hellwig, Martin K. Petersen, James E.J. Bottomley,
	Jens Axboe, Greg Kroah-Hartman, Dan Williams, Ross Zwisler,
	Matthew Wilcox, Sumit Semwal, Stephen Bates, Logan Gunthorpe

Changes since v1:

* Rebased onto next-20170424
* Removed the _offset version of these functions per Christoph's
  suggestion
* Added an SG_MAP_MUST_NOT_FAIL flag which will BUG_ON in future cases
  that can't gracefully fail. This removes a bunch of the noise added
  in v1 to a couple of the drivers. (Per David Laight's suggestion)
  This flag is only meant for old code
* Split the libiscsi patch into two (per Christoph's suggestion)
  the prep patch (patch 2 in this series) has already been
  sent separately
* Fixed a locking mistake in the target patch (pointed out by a bot)
* Dropped the nvmet patch and handled it with a different patch
  that has been sent separately
* Dropped the chcr patch as they have already removed the code that
  needed to be changed

I'm still hoping to only get Patch 1 in the series merged. (Any
volunteers?) I'm willing to chase down the maintainers for the remaining
patches separately after the first patch is in.

The patchset is based on next-20170424 and can be found in the sg_map_v2
branch from this git tree:

https://github.com/sbates130272/linux-p2pmem.git

--

Hi Everyone,

As part of my effort to enable P2P DMA transactions with PCI cards,
we've identified the need to be able to safely put IO memory into
scatterlists (and eventually other spots). This probably involves a
conversion from struct page to pfn_t but that migration is a ways off
and those decisions are yet to be made.

As an initial step in that direction, I've started cleaning up some of the
scatterlist code by trying to carve out a better defined layer between it
and it's users. The longer term goal would be to remove sg_page or replace
it with something that can potentially fail.

This patchset is the first step in that effort. I've introduced
a common function to map scatterlist memory and converted all the common
kmap(sg_page()) cases. This removes about 66 sg_page calls (of ~331).

Seeing this is a fairly large cleanup set that touches a wide swath of
the kernel I have limited the people I've sent this to. I'd suggest we look
toward merging the first patch and then I can send the individual subsystem
patches on to their respective maintainers and get them merged
independantly. (This is to avoid the conflicts I created with my last
cleanup set... Sorry) Though, I'm certainly open to other suggestions to get
it merged.

Logan Gunthorpe (21):
  scatterlist: Introduce sg_map helper functions
  libiscsi: Add an internal error code
  libiscsi: Make use of new the sg_map helper function
  target: Make use of the new sg_map function at 16 call sites
  drm/i915: Make use of the new sg_map helper function
  crypto: hifn_795x: Make use of the new sg_map helper function
  crypto: shash, caam: Make use of the new sg_map helper function
  dm-crypt: Make use of the new sg_map helper in 4 call sites
  staging: unisys: visorbus: Make use of the new sg_map helper function
  RDS: Make use of the new sg_map helper function
  scsi: ipr, pmcraid, isci: Make use of the new sg_map helper
  scsi: hisi_sas, mvsas, gdth: Make use of the new sg_map helper
    function
  scsi: arcmsr, ips, megaraid: Make use of the new sg_map helper
    function
  scsi: libfc, csiostor: Change to sg_copy_buffer in two drivers
  xen-blkfront: Make use of the new sg_map helper function
  mmc: sdhci: Make use of the new sg_map helper function
  mmc: spi: Make use of the new sg_map helper function
  mmc: tmio: Make use of the new sg_map helper function
  mmc: sdricoh_cs: Make use of the new sg_map helper function
  mmc: tifm_sd: Make use of the new sg_map helper function
  memstick: Make use of the new sg_map helper function

 crypto/shash.c                                  |   9 ++-
 drivers/block/xen-blkfront.c                    |  20 ++---
 drivers/crypto/caam/caamalg.c                   |   8 +-
 drivers/crypto/hifn_795x.c                      |  32 +++++---
 drivers/gpu/drm/i915/i915_gem.c                 |  27 ++++---
 drivers/md/dm-crypt.c                           |  39 ++++++---
 drivers/memstick/host/jmb38x_ms.c               |  11 +--
 drivers/memstick/host/tifm_ms.c                 |  11 +--
 drivers/mmc/host/mmc_spi.c                      |  26 ++++--
 drivers/mmc/host/sdhci.c                        |  14 ++--
 drivers/mmc/host/sdricoh_cs.c                   |  14 ++--
 drivers/mmc/host/tifm_sd.c                      |  50 +++++++-----
 drivers/mmc/host/tmio_mmc.h                     |   7 +-
 drivers/mmc/host/tmio_mmc_pio.c                 |  12 +++
 drivers/scsi/arcmsr/arcmsr_hba.c                |  16 +++-
 drivers/scsi/csiostor/csio_scsi.c               |  54 +------------
 drivers/scsi/cxgbi/libcxgbi.c                   |   5 ++
 drivers/scsi/gdth.c                             |   9 ++-
 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c          |  14 ++--
 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c          |  13 ++-
 drivers/scsi/ipr.c                              |  27 ++++---
 drivers/scsi/ips.c                              |   8 +-
 drivers/scsi/isci/request.c                     |  42 ++++++----
 drivers/scsi/libfc/fc_libfc.c                   |  49 +++--------
 drivers/scsi/libiscsi_tcp.c                     |  32 +++++---
 drivers/scsi/megaraid.c                         |   9 ++-
 drivers/scsi/mvsas/mv_sas.c                     |  10 +--
 drivers/scsi/pmcraid.c                          |  19 +++--
 drivers/staging/unisys/visorhba/visorhba_main.c |  12 +--
 drivers/target/iscsi/iscsi_target.c             |  29 ++++---
 drivers/target/target_core_rd.c                 |   3 +-
 drivers/target/target_core_sbc.c                | 103 +++++++++++++++---------
 drivers/target/target_core_transport.c          |  18 +++--
 drivers/target/target_core_user.c               |  45 ++++++++---
 include/linux/scatterlist.h                     |  85 +++++++++++++++++++
 include/scsi/libiscsi_tcp.h                     |   3 +-
 include/target/target_core_backend.h            |   4 +-
 net/rds/ib_recv.c                               |   8 +-
 38 files changed, 553 insertions(+), 344 deletions(-)

--
2.1.4

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2017-04-28 19:02 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-25 18:20 [PATCH v2 00/21] Introduce common scatterlist map function Logan Gunthorpe
2017-04-25 18:20 ` [PATCH v2 01/21] scatterlist: Introduce sg_map helper functions Logan Gunthorpe
2017-04-26  7:44   ` Christoph Hellwig
2017-04-26 18:11     ` Logan Gunthorpe
2017-04-27  6:53       ` Christoph Hellwig
2017-04-27 15:27         ` Jason Gunthorpe
2017-04-27 15:57           ` Logan Gunthorpe
2017-04-27 15:44         ` Logan Gunthorpe
2017-04-27 20:13     ` Logan Gunthorpe
2017-04-26  8:59   ` Christian König
2017-04-26 23:30     ` Logan Gunthorpe
2017-04-25 18:20 ` [PATCH v2 02/21] libiscsi: Add an internal error code Logan Gunthorpe
2017-04-26  7:48   ` Christoph Hellwig
2017-04-25 18:20 ` [PATCH v2 03/21] libiscsi: Make use of new the sg_map helper function Logan Gunthorpe
2017-04-25 18:20 ` [PATCH v2 04/21] target: Make use of the new sg_map function at 16 call sites Logan Gunthorpe
2017-04-25 18:20 ` [PATCH v2 05/21] drm/i915: Make use of the new sg_map helper function Logan Gunthorpe
2017-04-25 18:20 ` [PATCH v2 06/21] crypto: hifn_795x: " Logan Gunthorpe
2017-04-25 18:20 ` [PATCH v2 07/21] crypto: shash, caam: " Logan Gunthorpe
2017-04-27  3:56   ` Herbert Xu
2017-04-27 15:45     ` Logan Gunthorpe
2017-04-28  6:30       ` Herbert Xu
2017-04-28 16:53         ` Logan Gunthorpe
2017-04-28 17:51           ` Herbert Xu
2017-04-28 19:01             ` Logan Gunthorpe
2017-04-25 18:20 ` [PATCH v2 08/21] dm-crypt: Make use of the new sg_map helper in 4 call sites Logan Gunthorpe
2017-04-25 18:20 ` [PATCH v2 09/21] staging: unisys: visorbus: Make use of the new sg_map helper function Logan Gunthorpe
2017-04-25 18:20 ` [PATCH v2 10/21] RDS: " Logan Gunthorpe
2017-04-25 18:20 ` [PATCH v2 11/21] scsi: ipr, pmcraid, isci: Make use of the new sg_map helper Logan Gunthorpe
2017-04-25 18:20 ` [PATCH v2 12/21] scsi: hisi_sas, mvsas, gdth: Make use of the new sg_map helper function Logan Gunthorpe
2017-04-25 18:21 ` [PATCH v2 13/21] scsi: arcmsr, ips, megaraid: " Logan Gunthorpe
2017-04-25 18:21 ` [PATCH v2 14/21] scsi: libfc, csiostor: Change to sg_copy_buffer in two drivers Logan Gunthorpe
2017-04-25 18:21 ` [PATCH v2 15/21] xen-blkfront: Make use of the new sg_map helper function Logan Gunthorpe
2017-04-26  7:37   ` Roger Pau Monné
2017-04-27 20:19     ` Logan Gunthorpe
2017-04-27 20:53       ` Jason Gunthorpe
2017-04-27 21:53         ` Logan Gunthorpe
2017-04-27 22:11           ` Jason Gunthorpe
2017-04-27 23:03             ` Logan Gunthorpe
2017-04-27 23:20               ` Jason Gunthorpe
2017-04-27 23:29                 ` Logan Gunthorpe
2017-04-25 18:21 ` [PATCH v2 16/21] mmc: sdhci: " Logan Gunthorpe
2017-04-25 18:21 ` [PATCH v2 17/21] mmc: spi: " Logan Gunthorpe
2017-04-25 18:21 ` [PATCH v2 18/21] mmc: tmio: " Logan Gunthorpe
2017-04-25 18:21 ` [PATCH v2 19/21] mmc: sdricoh_cs: " Logan Gunthorpe
2017-04-25 18:21 ` [PATCH v2 20/21] mmc: tifm_sd: " Logan Gunthorpe
2017-04-25 18:21 ` [PATCH v2 21/21] memstick: " Logan Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).