]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r267643, r267873, r268391, r268398:
authormav <mav@FreeBSD.org>
Sat, 12 Jul 2014 04:34:39 +0000 (04:34 +0000)
committermav <mav@FreeBSD.org>
Sat, 12 Jul 2014 04:34:39 +0000 (04:34 +0000)
commitfe5b2cf89fbe6cf353aa17edbcf58016d6c79e37
tree6b02b89d680036a4e6397d526fe0c324ec7e159d
parent48e8be2fd2d78a1492d044dc7536d84e09044893
MFC r267643, r267873, r268391, r268398:
Introduce fine-grained CTL locking to improve SMP scalability.

Split global ctl_lock, historically protecting most of CTL context:
 - remaining ctl_lock now protects lists of fronends and backends;
 - per-LUN lun_lock(s) protect LUN-specific information;
 - per-thread queue_lock(s) protect request queues.
This allows to radically reduce congestion on ctl_lock.

Create multiple worker threads, depending on number of CPUs, and assign
each LUN to one of them.  This allows to spread load between multiple CPUs,
still avoiging congestion on queues and LUNs locks.

On 40-core server, exporting 5 LUNs, each backed by gstripe of SATA SSDs,
accessed via 6 iSCSI connections, this change improves peak request rate
from 250K to 680K IOPS.

Sponsored by: iXsystems, Inc.
sys/cam/ctl/ctl.c
sys/cam/ctl/ctl.h
sys/cam/ctl/ctl_io.h
sys/cam/ctl/ctl_private.h