提交 07beca2b 编写于 作者: R Raghava Aditya Renukunta 提交者: Martin K. Petersen

aacraid: Relinquish CPU during timeout wait

aac_fib_send has a special function case for initial commands during
driver initialization using wait < 0(pseudo sync mode). In this case,
the command does not sleep but rather spins checking for timeout.This
loop is calls cpu_relax() in an attempt to allow other processes/threads
to use the CPU, but this function does not relinquish the CPU and so the
command will hog the processor. This was observed in a KDUMP
"crashkernel" and that prevented the "command thread" (which is
responsible for completing the command from being timed out) from
starting because it could not get the CPU.

Fixed by replacing "cpu_relax()" call with "schedule()"
Cc: stable@vger.kernel.org
Signed-off-by: NRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 116d77fe
...@@ -637,10 +637,10 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, ...@@ -637,10 +637,10 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
} }
return -EFAULT; return -EFAULT;
} }
/* We used to udelay() here but that absorbed /*
* a CPU when a timeout occured. Not very * Allow other processes / CPUS to use core
* useful. */ */
cpu_relax(); schedule();
} }
} else if (down_interruptible(&fibptr->event_wait)) { } else if (down_interruptible(&fibptr->event_wait)) {
/* Do nothing ... satisfy /* Do nothing ... satisfy
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册