linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/32] Refcounts and rbtrees to increase luns above 255
@ 2013-12-13 23:58 Andy Grover
  2013-12-13 23:58 ` [PATCH 01/32] target: Remove unused ua_dev_list member in struct se_ua Andy Grover
                   ` (32 more replies)
  0 siblings, 33 replies; 81+ messages in thread
From: Andy Grover @ 2013-12-13 23:58 UTC (permalink / raw)
  To: target-devel; +Cc: linux-scsi

Hi Nicholas,

This patchset uses krefs to refcount structures shared across threads.
LIO is full of these because configfs-based configuration actions can
be removing an object, even while that object is being used by a SCSI
command.

Using kref to free the struct on whichever thread drops the last
reference allows us to avoid busy-waiting in configfs removal functions.
Next, this set removes the statically-sized tpg lun and deve arrays in
favor of dynamically adding entries into rbtrees. This reduces memory
consumption and allows more than 255 luns per tpg and initiator mapping.

Except for some rbtree lookups, these changes are entirely in the
configuration paths of Lio. I have tested these as extensively as I can,
and it's ready for wider testing.

Note: patch 22 converts a percpu refcount to a normal kref. I'd argue
the benefit is really in the "refcount" part rather than the "percpu",
so a simpler kref does the job, but we might want to discuss this some
more.

Please review.

Thanks -- Regards -- Andy

p.s. https://github.com/agrover/linux.git for_nab

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

end of thread, other threads:[~2014-02-07 19:17 UTC | newest]

Thread overview: 81+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-13 23:58 [PATCH 0/32] Refcounts and rbtrees to increase luns above 255 Andy Grover
2013-12-13 23:58 ` [PATCH 01/32] target: Remove unused ua_dev_list member in struct se_ua Andy Grover
2013-12-16 20:39   ` Nicholas A. Bellinger
2013-12-13 23:58 ` [PATCH 02/32] target: Don't keep looping in report_luns if too big Andy Grover
2013-12-16 20:41   ` Nicholas A. Bellinger
2013-12-13 23:58 ` [PATCH 03/32] target: Allocate more room for port default groups Andy Grover
2013-12-16 20:43   ` Nicholas A. Bellinger
2013-12-13 23:58 ` [PATCH 04/32] target: Fix sizeof in kmalloc for some default_groups arrays Andy Grover
2013-12-16 20:43   ` Nicholas A. Bellinger
2013-12-13 23:58 ` [PATCH 05/32] target: Rename some list heads used as nodes Andy Grover
2013-12-16 20:45   ` Nicholas A. Bellinger
2013-12-13 23:58 ` [PATCH 06/32] target: Convert lu_gp_ref_cnt to kref Andy Grover
2013-12-16 20:52   ` Nicholas A. Bellinger
2014-02-05 22:02     ` Andy Grover
2014-02-06 23:51       ` Nicholas A. Bellinger
2014-02-07  2:56         ` Andy Grover
2014-02-07 19:17           ` Nicholas A. Bellinger
2013-12-13 23:58 ` [PATCH 07/32] target: Convert struct alua_lu_gp_member " Andy Grover
2013-12-16 20:56   ` Nicholas A. Bellinger
2013-12-13 23:58 ` [PATCH 08/32] target: Convert tg_pt_gp_ref_cnt " Andy Grover
2013-12-16 21:00   ` Nicholas A. Bellinger
2013-12-13 23:58 ` [PATCH 09/32] target: convert tg_pt_gp_mem_ref_cnt " Andy Grover
2013-12-16 21:08   ` Nicholas A. Bellinger
2013-12-13 23:58 ` [PATCH 10/32] target: Change sep_tg_pt_ref_cnt to use kref Andy Grover
2013-12-16 21:11   ` Nicholas A. Bellinger
2013-12-13 23:58 ` [PATCH 11/32] target: Convert se_dev_entry to kref Andy Grover
2013-12-16 21:15   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 12/32] target: Convert t10_pr_registration " Andy Grover
2013-12-16 21:20   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 13/32] target: Move spinlock inside core_release_port Andy Grover
2013-12-16 21:21   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 14/32] target: Remove extra percpu_ref_init Andy Grover
2013-12-16 21:23   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 15/32] target: Refer to u32 luns as unpacked_lun Andy Grover
2013-12-16 21:25   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 16/32] target: Rename core_tpg_{pre,post}_addlun for clarity Andy Grover
2013-12-16 21:29   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 17/32] target: Don't use void* when passing dev in core_tpg_add_lun Andy Grover
2013-12-16 21:29   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 18/32] target: More core_dev_del cleanups Andy Grover
2013-12-16 21:35   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 19/32] target: Convert to rbtree for se_dev_entry in se_node_acl Andy Grover
2013-12-16 21:40   ` Nicholas A. Bellinger
2013-12-17  1:00     ` Andy Grover
2013-12-17  1:54       ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 20/32] target: Convert to rbtree for se_lun list in se_portal_group Andy Grover
2013-12-16 21:42   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 21/32] target: Remove lun_link and device magic Andy Grover
2013-12-16 21:44   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 22/32] target: Convert percpu_ref to kref Andy Grover
2013-12-16 21:44   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 23/32] target: Add lun->lun_tpg pointer Andy Grover
2013-12-16 21:45   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 24/32] target: Remove tpg from core_dev_export/unexport params Andy Grover
2013-12-16 21:46   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 25/32] target: Call remove_lun instead of del_lun in fabric_port_unlink Andy Grover
2013-12-16 21:47   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 26/32] target: Convert tpg_pr_ref_count to kref Andy Grover
2013-12-16 21:50   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 27/32] target: Move call to remove_lun to the release function from drop_link Andy Grover
2013-12-16 21:51   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 28/32] target: Convert acl_pr_ref_count to kref Andy Grover
2013-12-16 21:58   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 29/32] target: Simplify params to core_tpg_del_initiator_node_acl Andy Grover
2013-12-16 22:00   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 30/32] target: Change nacl's session refcount to use existing refcount Andy Grover
2013-12-16 22:01   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 31/32] target: Don't release and re-acquire some spinlocks in loops Andy Grover
2013-12-16 22:01   ` Nicholas A. Bellinger
2013-12-13 23:59 ` [PATCH 32/32] target: Increase MAX_LUNS_PER_TPG to 16384 Andy Grover
2013-12-16  9:20   ` Hannes Reinecke
2013-12-16  9:24     ` Hannes Reinecke
2013-12-16 22:01   ` Nicholas A. Bellinger
2013-12-16 22:03 ` [PATCH 0/32] Refcounts and rbtrees to increase luns above 255 Nicholas A. Bellinger
2013-12-17  1:49   ` Andy Grover
2013-12-17  1:59     ` Nicholas A. Bellinger
2013-12-17  2:03       ` Andy Grover
2013-12-17  3:03         ` Nicholas A. Bellinger
2013-12-17 10:53   ` Hannes Reinecke
2013-12-17 17:10     ` Andy Grover
2013-12-17 21:25       ` Nicholas A. Bellinger

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