diff options
author | Christian Iversen <ci@iversenit.dk> | 2021-01-26 22:47:29 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2021-01-28 23:47:00 +0000 |
commit | 6cb12ee2b02dac4455bc60aebdcd326436dff743 (patch) | |
tree | acd269a73509321ec08e1a40aef088526eb6cf86 | |
parent | 7d32225b553274cc6e9c922a272903de18bbd458 (diff) | |
download | ipxe-6cb12ee2b02dac4455bc60aebdcd326436dff743.zip ipxe-6cb12ee2b02dac4455bc60aebdcd326436dff743.tar.gz ipxe-6cb12ee2b02dac4455bc60aebdcd326436dff743.tar.bz2 |
[hermon] Increase polling rate for command completions
Some older versions of the hardware (and/or firmware) do not report an
event when an Infiniband link reaches the INIT state. The driver
works around this missing event by calling ib_smc_update() on each
event queue poll while the link is in the DOWN state. This results in
a very large number of commands being issued while any open Infiniband
link is in the DOWN state (e.g. unplugged), to the point that the 1ms
delay from waiting for each command to complete will noticeably affect
responsiveness.
Fix by decreasing the command completion polling delay from 1ms to
10us.
Signed-off-by: Christian Iversen <ci@iversenit.dk>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r-- | src/drivers/infiniband/hermon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/infiniband/hermon.c b/src/drivers/infiniband/hermon.c index eb1255f..e818b4d 100644 --- a/src/drivers/infiniband/hermon.c +++ b/src/drivers/infiniband/hermon.c @@ -137,13 +137,13 @@ static int hermon_cmd_wait ( struct hermon *hermon, struct hermonprm_hca_command_register *hcr ) { unsigned int wait; - for ( wait = HERMON_HCR_MAX_WAIT_MS ; wait ; wait-- ) { + for ( wait = ( 100 * HERMON_HCR_MAX_WAIT_MS ) ; wait ; wait-- ) { hcr->u.dwords[6] = readl ( hermon->config + HERMON_HCR_REG ( 6 ) ); if ( ( MLX_GET ( hcr, go ) == 0 ) && ( MLX_GET ( hcr, t ) == hermon->toggle ) ) return 0; - mdelay ( 1 ); + udelay ( 10 ); } return -EBUSY; } |