Refcounts and rbtrees to increase luns above 255
Status from this message: Applied to for-next.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/32 | target: Remove unused ua_dev_list member in struct se_uadrivers/ include/ | +0 | 1 reply | |
| 2/32 | target: Don't keep looping in report_luns if too bigdrivers/ | +1 | 1 reply | |
| 3/32 | target: Allocate more room for port default groupsdrivers/ | +1 | 1 reply | |
| 4/32 | target: Fix sizeof in kmalloc for some default_groups arraysdrivers/ drivers/ | +2 | 1 reply | |
| 5/32 | target: Rename some list heads used as nodesdrivers/ drivers/ drivers/ +10 more | +87 | 1 reply | |
| 6/32 | target: Convert lu_gp_ref_cnt to krefdrivers/ include/ | +21 | 5 replies | |
| 7/32 | target: Convert struct alua_lu_gp_member to krefdrivers/ include/ | +16 | 1 reply | |
| 8/32 | target: Convert tg_pt_gp_ref_cnt to krefdrivers/ include/ | +19 | 1 reply | |
| 9/32 | target: convert tg_pt_gp_mem_ref_cnt to krefdrivers/ include/ | +15 | 1 reply | |
| 10/32 | target: Change sep_tg_pt_ref_cnt to use krefdrivers/ drivers/ drivers/ +1 more | +17 | 1 reply | |
| 11/32 | target: Convert se_dev_entry to krefdrivers/ drivers/ drivers/ +2 more | +32 | 1 reply | |
| 12/32 | target: Convert t10_pr_registration to krefdrivers/ include/ | +42 | 1 reply | |
| 13/32 | target: Move spinlock inside core_release_portdrivers/ | +3 | 1 reply | |
| 14/32 | target: Remove extra percpu_ref_initdrivers/ | +0 | 1 reply | |
| 15/32 | target: Refer to u32 luns as unpacked_lundrivers/ | +8 | 1 reply | |
| 16/32 | target: Rename core_tpg_{pre,post}_addlun for claritydrivers/ drivers/ drivers/ | +7 | 1 reply | |
| 17/32 | target: Don't use void* when passing dev in core_tpg_add_lundrivers/ drivers/ | +3 | 1 reply | |
| 18/32 | target: More core_dev_del cleanupsdrivers/ drivers/ drivers/ +1 more | +20 | 1 reply | |
| 19/32 | target: Convert to rbtree for se_dev_entry in se_node_acldrivers/ drivers/ drivers/ +6 more | +222 | 3 replies | |
| 20/32 | target: Convert to rbtree for se_lun list in se_portal_groupdrivers/ drivers/ drivers/ +4 more | +116 | 1 reply | |
| 21/32 | target: Remove lun_link and device magicdrivers/ drivers/ drivers/ +1 more | +0 | 1 reply | |
| 22/32 | target: Convert percpu_ref to krefdrivers/ drivers/ drivers/ +2 more | +18 | 1 reply | |
| 23/32 | target: Add lun->lun_tpg pointerdrivers/ include/ | +3 | 1 reply | |
| 24/32 | target: Remove tpg from core_dev_export/unexport paramsdrivers/ drivers/ drivers/ | +11 | 1 reply | |
| 25/32 | target: Call remove_lun instead of del_lun in fabric_port_unlinkdrivers/ | +1 | 1 reply | |
| 26/32 | target: Convert tpg_pr_ref_count to krefdrivers/ drivers/ drivers/ +2 more | +26 | 1 reply | |
| 27/32 | target: Move call to remove_lun to the release function from drop_linkdrivers/ | +9 | 1 reply | |
| 28/32 | target: Convert acl_pr_ref_count to krefDocumentation/ drivers/ drivers/ +10 more | +41 | 1 reply | |
| 29/32 | target: Simplify params to core_tpg_del_initiator_node_aclDocumentation/ drivers/ drivers/ +7 more | +12 | 1 reply | |
| 30/32 | target: Change nacl's session refcount to use existing refcountdrivers/ drivers/ include/ +1 more | +2 | 1 reply | |
| 31/32 | target: Don't release and re-acquire some spinlocks in loopsdrivers/ drivers/ | +0 | 1 reply | |
| 32/32 | target: Increase MAX_LUNS_PER_TPG to 16384drivers/ include/ | +8 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/32] Refcounts and rbtrees to increase luns above 255
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