linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/17] Create and use ida and idr helper routines
@ 2015-09-15 16:46 Lee Duncan
  2015-09-15 16:46 ` [PATCH 01/17] Add " Lee Duncan
                   ` (16 more replies)
  0 siblings, 17 replies; 28+ messages in thread
From: Lee Duncan @ 2015-09-15 16:46 UTC (permalink / raw)
  To: linux-scsi, linux-kernel
  Cc: Hannes Reinecke, Johannes Thumshirn, Christoph Hellwig,
	Lee Duncan, Kai.Makisara, Mike Snitzer, Doug Ledford, Ulf Hansson,
	Gerd Hoffmann, Samuel Ortiz, Alex Dubov, Joshua Morris,
	Matthew Wilcox

The idr index management library supplies two sets of routines
for managing monotonically increasing index numbers. The "ida"
set of routines manage allocating and freeing simple index
numbers. The "idr" set of routines add the ability to save
an arbitrary pointer with each index.

Both sets of routines are used throughout the kernel, and it
was noted that many of them use the same or similar calling
sequences, making a helper function a useful addition.

This set of patches adds some helper functions, defined
as inline in <linux/idr.h>. In addition, any of the clients
of these idr library functions that could benefit from
using these helper functions where modified to use them.

In addition to cleaning up the code in the clients of these
functions, the SCSI hosts module, which used to use a simple
atomic integer for index management is converted to using
the idr set of routines to manage its index values as
well as to simplify and speed up host number to instance
lookups.

I have functionally tested the SCSI host indexing change,
and I have compile tested all of the other changes. The
maintainers of each driver are cc-ed on the patch series,
where available.

Note: I did not mark this patch series as "v2" since
the scope of the patch set has grown considerably
since my first submissions.

Summary: There is one patch that adds helper functions, 11
patches that use the new "idr" helper functions, and 5 that
use the new "ida" helper functions.

Lee Duncan (17):
   1. Add ida and idr helper routines.
   2. Update scsi hosts to use idr for host number mgmt
   3. Update the st driver to use idr helper functions.
   4. Update the ch driver to use idr helper functions.
   5. Update the md driver to use idr helper functions.
   6. Update the infiniband uverbs driver to use idr helper functions.
   7. Update the memstick driver to use idr helper functions.
   8. Update the mmc driver to use idr helper functions.
   9. Update the virtgpu driver to use idr helper functions.
  10. Update the DCA DMA driver to use idr helper functions.
  11. Update the rtsx multifunction driver to use idr helper functions.
  12. Update the TI Flash Media driver to use idr helper functions.
  13. Update the SCSI disk driver to use ida helper functions.
  14. Update the rsxx flash adapter driver to use ida helper functions.
  15. Update the NVMe SSD driver to use ida helper functions.
  16. Update the Micron PCIe SSD driver to use ida helper functions.
  17. Update the ARM soc base driver to use ida helper functions.

 drivers/base/soc.c                   |  17 ++----
 drivers/block/mtip32xx/mtip32xx.c    |  22 ++------
 drivers/block/nvme-core.c            |  14 +----
 drivers/block/rsxx/core.c            |  16 +-----
 drivers/dca/dca-sysfs.c              |  19 ++-----
 drivers/gpu/drm/virtio/virtgpu_vq.c  |  15 ++----
 drivers/infiniband/core/uverbs_cmd.c |  12 +----
 drivers/md/dm.c                      |  22 ++------
 drivers/memstick/core/memstick.c     |  19 ++-----
 drivers/mfd/rtsx_pcr.c               |  13 ++---
 drivers/misc/tifm_core.c             |  17 ++----
 drivers/mmc/core/host.c              |  14 ++---
 drivers/scsi/ch.c                    |  14 ++---
 drivers/scsi/hosts.c                 |  59 ++++++++++----------
 drivers/scsi/sd.c                    |  20 ++-----
 drivers/scsi/st.c                    |  15 ++----
 include/linux/idr.h                  | 102 +++++++++++++++++++++++++++++++++++
 17 files changed, 182 insertions(+), 228 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 28+ messages in thread
* [PATCH 00/17] Create and use ida and idr helper routines [RESEND]
@ 2015-09-16 17:50 Lee Duncan
  2015-09-16 17:50 ` [PATCH 01/17] Add ida and idr helper routines Lee Duncan
  0 siblings, 1 reply; 28+ messages in thread
From: Lee Duncan @ 2015-09-16 17:50 UTC (permalink / raw)
  To: linux-scsi, James.Bottomley
  Cc: linux-kernel, hare, jthumshirn, hch, Lee Duncan, Kai.Makisara,
	Mike Snitzer, Doug Ledford, Ulf Hansson, Gerd Hoffmann,
	Samuel Ortiz, Alex Dubov, Joshua Morris, Matthew Wilcox

[Apologies if you see this twice. I had to resend it.]

The idr index management library supplies two sets of routines
for managing monotonically increasing index numbers. The "ida"
set of routines manage allocating and freeing simple index
numbers. The "idr" set of routines add the ability to save
an arbitrary pointer with each index.

Both sets of routines are used throughout the kernel, and it
was noted that many of them use the same or similar calling
sequences, making a helper function a useful addition.

This set of patches adds some helper functions, defined
as inline in <linux/idr.h>. In addition, any of the clients
of these idr library functions that could benefit from
using these helper functions where modified to use them.

In addition to cleaning up the code in the clients of these
functions, the SCSI hosts module, which used to use a simple
atomic integer for index management is converted to using
the idr set of routines to manage its index values as
well as to simplify and speed up host number to instance
lookups.

I have functionally tested the SCSI host indexing change,
and I have compile tested all of the other changes. The
maintainers of each driver are cc-ed on the patch series,
where available.

Note: I did not mark this patch series as "v2" since
the scope of the patch set has grown considerably
since my first submissions.

Summary: There is one patch that adds helper functions, 11
patches that use the new "idr" helper functions, and 5 that
use the new "ida" helper functions.

Lee Duncan (17):
   1. Add ida and idr helper routines.
   2. Update scsi hosts to use idr for host number mgmt
   3. Update the st driver to use idr helper functions.
   4. Update the ch driver to use idr helper functions.
   5. Update the md driver to use idr helper functions.
   6. Update the infiniband uverbs driver to use idr helper functions.
   7. Update the memstick driver to use idr helper functions.
   8. Update the mmc driver to use idr helper functions.
   9. Update the virtgpu driver to use idr helper functions.
  10. Update the DCA DMA driver to use idr helper functions.
  11. Update the rtsx multifunction driver to use idr helper functions.
  12. Update the TI Flash Media driver to use idr helper functions.
  13. Update the SCSI disk driver to use ida helper functions.
  14. Update the rsxx flash adapter driver to use ida helper functions.
  15. Update the NVMe SSD driver to use ida helper functions.
  16. Update the Micron PCIe SSD driver to use ida helper functions.
  17. Update the ARM soc base driver to use ida helper functions.

 drivers/base/soc.c                   |  17 ++----
 drivers/block/mtip32xx/mtip32xx.c    |  22 ++------
 drivers/block/nvme-core.c            |  14 +----
 drivers/block/rsxx/core.c            |  16 +-----
 drivers/dca/dca-sysfs.c              |  19 ++-----
 drivers/gpu/drm/virtio/virtgpu_vq.c  |  15 ++----
 drivers/infiniband/core/uverbs_cmd.c |  12 +----
 drivers/md/dm.c                      |  22 ++------
 drivers/memstick/core/memstick.c     |  19 ++-----
 drivers/mfd/rtsx_pcr.c               |  13 ++---
 drivers/misc/tifm_core.c             |  17 ++----
 drivers/mmc/core/host.c              |  14 ++---
 drivers/scsi/ch.c                    |  14 ++---
 drivers/scsi/hosts.c                 |  59 ++++++++++----------
 drivers/scsi/sd.c                    |  20 ++-----
 drivers/scsi/st.c                    |  15 ++----
 include/linux/idr.h                  | 102 +++++++++++++++++++++++++++++++++++
 17 files changed, 182 insertions(+), 228 deletions(-)

-- 
2.1.4

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

end of thread, other threads:[~2015-09-18 15:49 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15 16:46 [PATCH 00/17] Create and use ida and idr helper routines Lee Duncan
2015-09-15 16:46 ` [PATCH 01/17] Add " Lee Duncan
2015-09-15 18:20   ` James Bottomley
2015-09-15 18:27   ` Tejun Heo
2015-09-15 18:38     ` James Bottomley
2015-09-15 18:41       ` Tejun Heo
2015-09-18 15:42         ` Lee Duncan
2015-09-18 15:49           ` Tejun Heo
2015-09-15 16:46 ` [PATCH 02/17] Update scsi hosts to use idr for host number mgmt Lee Duncan
2015-09-15 16:46 ` [PATCH 03/17] Update the st driver to use idr helper functions Lee Duncan
2015-09-15 16:46 ` [PATCH 04/17] Update the ch " Lee Duncan
2015-09-15 16:46 ` [PATCH 05/17] Update the md " Lee Duncan
2015-09-15 18:05   ` Mike Snitzer
2015-09-17 20:51     ` Lee Duncan
2015-09-15 16:46 ` [PATCH 06/17] Update the infiniband uverbs " Lee Duncan
2015-09-15 16:46 ` [PATCH 07/17] Update the memstick " Lee Duncan
2015-09-15 16:46 ` [PATCH 08/17] Update the mmc " Lee Duncan
2015-09-16  6:48   ` Ulf Hansson
2015-09-15 16:46 ` [PATCH 09/17] Update the virtgpu " Lee Duncan
2015-09-15 16:46 ` [PATCH 10/17] Update the DCA DMA " Lee Duncan
2015-09-15 16:46 ` [PATCH 11/17] Update the rtsx multifunction " Lee Duncan
2015-09-15 16:46 ` [PATCH 12/17] Update the TI Flash Media " Lee Duncan
2015-09-15 16:46 ` [PATCH 13/17] Update the SCSI disk driver to use ida " Lee Duncan
2015-09-15 16:46 ` [PATCH 14/17] Update the rsxx flash adapter " Lee Duncan
2015-09-15 16:46 ` [PATCH 15/17] Update the NVMe SSD " Lee Duncan
2015-09-15 16:46 ` [PATCH 16/17] Update the Micron PCIe " Lee Duncan
2015-09-15 16:46 ` [PATCH 17/17] Update the ARM soc base " Lee Duncan
  -- strict thread matches above, loose matches on Subject: below --
2015-09-16 17:50 [PATCH 00/17] Create and use ida and idr helper routines [RESEND] Lee Duncan
2015-09-16 17:50 ` [PATCH 01/17] Add ida and idr helper routines Lee Duncan

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).