[SCSI] lpfc 8.2.7 : Rework the worker thread
Rework of the worker thread to make it more efficient. Make a finer-grain notfication of pending work so less time is spent checking conditions. Also made other general cleanups. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:

committed by
James Bottomley

parent
0d2b6b8303
commit
5e9d9b8276
@@ -1679,20 +1679,18 @@ lpfc_fdmi_tmo(unsigned long ptr)
|
||||
{
|
||||
struct lpfc_vport *vport = (struct lpfc_vport *)ptr;
|
||||
struct lpfc_hba *phba = vport->phba;
|
||||
uint32_t tmo_posted;
|
||||
unsigned long iflag;
|
||||
|
||||
spin_lock_irqsave(&vport->work_port_lock, iflag);
|
||||
if (!(vport->work_port_events & WORKER_FDMI_TMO)) {
|
||||
tmo_posted = vport->work_port_events & WORKER_FDMI_TMO;
|
||||
if (!tmo_posted)
|
||||
vport->work_port_events |= WORKER_FDMI_TMO;
|
||||
spin_unlock_irqrestore(&vport->work_port_lock, iflag);
|
||||
spin_unlock_irqrestore(&vport->work_port_lock, iflag);
|
||||
|
||||
spin_lock_irqsave(&phba->hbalock, iflag);
|
||||
if (phba->work_wait)
|
||||
lpfc_worker_wake_up(phba);
|
||||
spin_unlock_irqrestore(&phba->hbalock, iflag);
|
||||
}
|
||||
else
|
||||
spin_unlock_irqrestore(&vport->work_port_lock, iflag);
|
||||
if (!tmo_posted)
|
||||
lpfc_worker_wake_up(phba);
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user