Vasu Dev wrote: > Updating exch ref count based on timer_pending check can mess > up exch ref count if timer fires just after this check. Instead count > on del/mod_timer() return values to update exch ref count. >
Oh yeah, the timer refcount stuff is nice. I was thinking we could do something similar for fc_fcp to avoid the del_timer_sync call. If fc_io_compl only sets FC_SRB_COMPL, and releases the original ref taken when the pkt is allocated. Then when the refcount is zero we can cleanup the other stuff in fc_io_compl where we call scsi_done and give the command back to the scsi layer. That would make fc_io_compl nicer. A temp problem would be that when we call fc_fcp_pkt_release we would have to hold the pkt lock or if fc_fcp_pkt_release takes it for when it accesses the list, it would have to make sure callers have dropped the lock. When we remove the list that will go away and be nice too. The other option for the timer in fc_fcp would be if we had a single timer, that would check all outstanding commands. This would be nice because we would only need one timer for all commands, but we would need a list again to loop over all the commands or we could go with the lookup table again, but either way we would have to grab a host wide lock to traverse every running pkt every timeout period which could be alot. _______________________________________________ devel mailing list [email protected] http://www.open-fcoe.org/mailman/listinfo/devel
