* dev_loss_tmo behavior question @ 2010-07-27 21:11 Mike Christie 2010-07-28 8:45 ` Christof Schmitt 2010-07-28 16:07 ` James Smart 0 siblings, 2 replies; 7+ messages in thread From: Mike Christie @ 2010-07-27 21:11 UTC (permalink / raw) To: James Smart, brking, Andrew Vasquez, SCSI Mailing List, "Desai, Kashyap" <Kashyap. Hi FC driver developers, I am trying to figure out what is the correct behavior when setting dev_loss_tmo. With lpfc, qla2xx, and ibmfc if I set dev_loss_tmo using /sys/class/fc_remote_port/rport-xx/dev_loss_tmo, and then we add devices the slave_configure functions for these drivers reset the dev_loss_tmo to a driver value. The addition of devs could be from something like a user rescan, or from a scan started by a remote port addition. With fcoe, fnic, mptfc, bfa and zfcp the dev_loss_tmo value set from sysfs will not be reset by a driver value on rescans. Which drivers should be changed? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: dev_loss_tmo behavior question 2010-07-27 21:11 dev_loss_tmo behavior question Mike Christie @ 2010-07-28 8:45 ` Christof Schmitt 2010-07-28 16:07 ` James Smart 1 sibling, 0 replies; 7+ messages in thread From: Christof Schmitt @ 2010-07-28 8:45 UTC (permalink / raw) To: Mike Christie Cc: James Smart, brking, Andrew Vasquez, SCSI Mailing List, Desai, Kashyap, Giridhar Malavali, Love, Robert W, Jing Huang On Tue, Jul 27, 2010 at 04:11:48PM -0500, Mike Christie wrote: > Hi FC driver developers, > > I am trying to figure out what is the correct behavior when setting > dev_loss_tmo. > > With lpfc, qla2xx, and ibmfc if I set dev_loss_tmo using > /sys/class/fc_remote_port/rport-xx/dev_loss_tmo, and then we add > devices the slave_configure functions for these drivers reset the > dev_loss_tmo to a driver value. > > The addition of devs could be from something like a user rescan, or > from a scan started by a remote port addition. > > With fcoe, fnic, mptfc, bfa and zfcp the dev_loss_tmo value set from > sysfs will not be reset by a driver value on rescans. > > Which drivers should be changed? At least for zfcp, i don't see a reason for the driver to change the value for dev_loss_tmo. A user could delete the SCSI device at any time from userspace (echo 1 > /sys/.../delete), so the driver has to be able to handle the device removal at any time. And then it should not matter if the removal is triggered from userspace or from the FC transport's dev_loss_tmo. Christof ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: dev_loss_tmo behavior question 2010-07-27 21:11 dev_loss_tmo behavior question Mike Christie 2010-07-28 8:45 ` Christof Schmitt @ 2010-07-28 16:07 ` James Smart 2010-07-28 16:57 ` Andrew Vasquez 1 sibling, 1 reply; 7+ messages in thread From: James Smart @ 2010-07-28 16:07 UTC (permalink / raw) To: Mike Christie Cc: brking@linux.vnet.ibm.com, Andrew Vasquez, SCSI Mailing List, Desai, Kashyap, Giridhar Malavali, Christof Schmitt, Love, Robert W, Jing Huang, Smart, James Mike Christie wrote: > Hi FC driver developers, > > I am trying to figure out what is the correct behavior when setting > dev_loss_tmo. > > With lpfc, qla2xx, and ibmfc if I set dev_loss_tmo using > /sys/class/fc_remote_port/rport-xx/dev_loss_tmo, and then we add devices > the slave_configure functions for these drivers reset the dev_loss_tmo > to a driver value. > > The addition of devs could be from something like a user rescan, or from > a scan started by a remote port addition. Looking at lpfc - this is a totally insane thing to do, and definitely a bug. Addition or removal of sdevs should not change a rport setting. > > With fcoe, fnic, mptfc, bfa and zfcp the dev_loss_tmo value set from > sysfs will not be reset by a driver value on rescans. > > Which drivers should be changed? lpfc, qla2xx, and ibmfc. -- james s ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: dev_loss_tmo behavior question 2010-07-28 16:07 ` James Smart @ 2010-07-28 16:57 ` Andrew Vasquez 2010-07-30 17:21 ` Mike Christie 0 siblings, 1 reply; 7+ messages in thread From: Andrew Vasquez @ 2010-07-28 16:57 UTC (permalink / raw) To: James Smart Cc: Mike Christie, brking@linux.vnet.ibm.com, SCSI Mailing List, Desai, Kashyap, Giridhar Malavali, Christof Schmitt, Love, Robert W, Jing Huang On Wed, 28 Jul 2010, James Smart wrote: > Mike Christie wrote: > > Hi FC driver developers, > > > > I am trying to figure out what is the correct behavior when setting > > dev_loss_tmo. > > > > With lpfc, qla2xx, and ibmfc if I set dev_loss_tmo using > > /sys/class/fc_remote_port/rport-xx/dev_loss_tmo, and then we add devices > > the slave_configure functions for these drivers reset the dev_loss_tmo > > to a driver value. > > > > The addition of devs could be from something like a user rescan, or from > > a scan started by a remote port addition. > > Looking at lpfc - this is a totally insane thing to do, and definitely a bug. > Addition or removal of sdevs should not change a rport setting. Completely agree... > > With fcoe, fnic, mptfc, bfa and zfcp the dev_loss_tmo value set from > > sysfs will not be reset by a driver value on rescans. > > > > Which drivers should be changed? > > lpfc, qla2xx, and ibmfc. I'm curious though, each driver would still need to seed the rport's dev_loss_tmo value (in the case of qla2xxx, ha->port_down_retry_count), but, by doing so after rport-addition (fc_remote_port_add()), the driver could still overwrite a previous sysfs setting. Internally, upon rport creation, the dev_loss_tmo value is seeding with fc_dev_loss_tmo (a module parameter -- 60 seconds). Should we extend the transport so the the 'default seeding value' can be specified once at fc_host creation-time? BTW: fnic looks to be doing the same 'bad' behaviour in their slave_alloc() call too... -- av ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: dev_loss_tmo behavior question 2010-07-28 16:57 ` Andrew Vasquez @ 2010-07-30 17:21 ` Mike Christie 2010-07-30 17:28 ` James Smart 2010-07-30 22:15 ` Andrew Vasquez 0 siblings, 2 replies; 7+ messages in thread From: Mike Christie @ 2010-07-30 17:21 UTC (permalink / raw) To: Andrew Vasquez Cc: James Smart, brking@linux.vnet.ibm.com, SCSI Mailing List, Desai, Kashyap, Giridhar Malavali, Christof Schmitt, Love, Robert W, Jing Huang On 07/28/2010 11:57 AM, Andrew Vasquez wrote: > I'm curious though, each driver would still need to seed the rport's > dev_loss_tmo value (in the case of qla2xxx, > ha->port_down_retry_count), but, by doing so after rport-addition > (fc_remote_port_add()), the driver could still overwrite a previous > sysfs setting. Internally, upon rport creation, the dev_loss_tmo > value is seeding with fc_dev_loss_tmo (a module parameter -- 60 > seconds). Should we extend the transport so the the 'default seeding > value' can be specified once at fc_host creation-time? > I was going to add a fc_transport callout that gets called when the rport is allocated so drivers can do other rport initialization if they wanted. It is only called the first time when it is actually allocated not every time fc_remote_port_add is called. Would that be more useful? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: dev_loss_tmo behavior question 2010-07-30 17:21 ` Mike Christie @ 2010-07-30 17:28 ` James Smart 2010-07-30 22:15 ` Andrew Vasquez 1 sibling, 0 replies; 7+ messages in thread From: James Smart @ 2010-07-30 17:28 UTC (permalink / raw) To: Mike Christie Cc: Andrew Vasquez, brking@linux.vnet.ibm.com, SCSI Mailing List, Desai, Kashyap, Giridhar Malavali, Christof Schmitt, Love, Robert W, Jing Huang Mike Christie wrote: > On 07/28/2010 11:57 AM, Andrew Vasquez wrote: >> I'm curious though, each driver would still need to seed the rport's >> dev_loss_tmo value (in the case of qla2xxx, >> ha->port_down_retry_count), but, by doing so after rport-addition >> (fc_remote_port_add()), the driver could still overwrite a previous >> sysfs setting. Internally, upon rport creation, the dev_loss_tmo >> value is seeding with fc_dev_loss_tmo (a module parameter -- 60 >> seconds). Should we extend the transport so the the 'default seeding >> value' can be specified once at fc_host creation-time? >> > > I was going to add a fc_transport callout that gets called when the > rport is allocated so drivers can do other rport initialization if they > wanted. It is only called the first time when it is actually allocated > not every time fc_remote_port_add is called. Would that be more useful? I would assume this is a fc_host attribute, used in fc_remote_port_add. Per your last sentence, I assume : if the rport comes back within the devloss window it definitely is kept to the last value set in the rport if devloss expires, only if you have target id bindings (where you keep the rport struct as a container for the binding, thus it is part of the saved binding) would you keep the last value set, and it only applies if the binding matches. if no target id bindings, then it would be set again to the fc_host value when fc_remote_port_add() is called. -- james s ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: dev_loss_tmo behavior question 2010-07-30 17:21 ` Mike Christie 2010-07-30 17:28 ` James Smart @ 2010-07-30 22:15 ` Andrew Vasquez 1 sibling, 0 replies; 7+ messages in thread From: Andrew Vasquez @ 2010-07-30 22:15 UTC (permalink / raw) To: Mike Christie Cc: James Smart, brking@linux.vnet.ibm.com, SCSI Mailing List, Desai, Kashyap, Giridhar Malavali, Christof Schmitt, Love, Robert W, Jing Huang On Fri, 30 Jul 2010, Mike Christie wrote: > On 07/28/2010 11:57 AM, Andrew Vasquez wrote: > > I'm curious though, each driver would still need to seed the rport's > > dev_loss_tmo value (in the case of qla2xxx, > > ha->port_down_retry_count), but, by doing so after rport-addition > > (fc_remote_port_add()), the driver could still overwrite a previous > > sysfs setting. Internally, upon rport creation, the dev_loss_tmo > > value is seeding with fc_dev_loss_tmo (a module parameter -- 60 > > seconds). Should we extend the transport so the the 'default seeding > > value' can be specified once at fc_host creation-time? > > > > I was going to add a fc_transport callout that gets called when the > rport is allocated so drivers can do other rport initialization if they > wanted. It is only called the first time when it is actually allocated > not every time fc_remote_port_add is called. Would that be more useful? I'm fine with that too... -- av ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-07-30 22:15 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-07-27 21:11 dev_loss_tmo behavior question Mike Christie 2010-07-28 8:45 ` Christof Schmitt 2010-07-28 16:07 ` James Smart 2010-07-28 16:57 ` Andrew Vasquez 2010-07-30 17:21 ` Mike Christie 2010-07-30 17:28 ` James Smart 2010-07-30 22:15 ` Andrew Vasquez
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).