linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0/1] Update SCSI hosts to use idr for host number mgmt
@ 2015-10-05 23:01 Lee Duncan
  2015-10-05 23:01 ` [PATCHv2 1/1] SCSI: update hosts module to use idr index management Lee Duncan
  0 siblings, 1 reply; 8+ messages in thread
From: Lee Duncan @ 2015-10-05 23:01 UTC (permalink / raw)
  To: linux-scsi, linux-kernel
  Cc: Lee Duncan, James Bottomley, Tejun Heo, Hannes Reinecke,
	Johannes Thumshirn, Christoph Hellwig

This patch updates the SCSI hosts module to use the idr
index-management routines to manage its host_no index instead
of using an ATOMIC integer. This means that host numbers
can now be reclaimed and re-used.

It also updates the hosts module to use the idr routine idr_find()
to lookup hosts based on the host number, hopefully speeding
up said lookup.

After noticing that my idr calling sequences where very close
to those in other modules, I considered creating some idr helper
functions (and using them), but because idr usage almost always
requires the caller to manage their own locks, I gave up on
this approach (as suggested by Tejon -- thank you).

Lee Duncan (1):
  SCSI: update hosts module to use idr index management

 drivers/scsi/hosts.c | 60 +++++++++++++++++++++++++---------------------------
 1 file changed, 29 insertions(+), 31 deletions(-)

-- 
2.1.4


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

end of thread, other threads:[~2015-10-07 23:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-05 23:01 [PATCHv2 0/1] Update SCSI hosts to use idr for host number mgmt Lee Duncan
2015-10-05 23:01 ` [PATCHv2 1/1] SCSI: update hosts module to use idr index management Lee Duncan
2015-10-06  9:40   ` Christoph Hellwig
2015-10-06 17:14     ` Lee Duncan
2015-10-06 17:17       ` James Bottomley
2015-10-07 20:23         ` Hannes Reinecke
2015-10-07 23:39           ` James Bottomley
2015-10-06 13:00   ` Hannes Reinecke

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