> On Nov 10, 2016, at 1:22 PM, Chris Leech <[email protected]> wrote: > > On Thu, Nov 10, 2016 at 10:00:54AM -0800, The Lee-Man wrote: >> On Monday, November 7, 2016 at 11:22:23 AM UTC-7, Chris Leech wrote: >>> >>> Currently the iSCSI transport class synchronises target scanning and >>> unbinding with a host level mutex. For multi-session hosts (offloading >>> iSCSI HBAs) connecting to storage arrays that may implement one >>> target-per-lun, this can result in the target scan work for hundreds of >>> sessions being serialized behind a single mutex. With slow enough >>> response times, this can cause scan requests initiated from userspace to >>> block on the mutex long enough to trigger 120 sec hung task warnings. >>> >>> I can't see any reason not to move this to a session level mutex and let >>> the target scans run in parallel, speeding up connecting to a large >>> number of targets. Note that as iscsi_tcp creates a virtual host for >>> each session, software iSCSI is effectively doing this already. >>> >> >> I understood the reason for this mutex was to protect against the case >> where there are multiple paths to a target. In such cases, you can get >> simultaneous access to sysfs attributes (files), which can cause errors, >> i.e. two threads trying to write an attribute at the same time, or one >> changing an attribute while another reads or removes it. > > This particular mutex is only serializing scanning targets for devices, > and used in __iscsi_unbind_session to ensure that no scans are in > progress adding new scsi devices while we're trying to remove a target.
Hot unplug? > >> I worry that changing it will not address those issues. >> >> [Side note: we *really* need a test suite that somehow includes >> cases like this.] >> >>> <snip> -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
