diff options
author | Manoj N. Kumar <manoj@linux.vnet.ibm.com> | 2016-08-30 00:35:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-15 08:27:50 +0200 |
commit | d4009e4b6e309e222c5245056f4d6e1a4da88026 (patch) | |
tree | 0f7df2bab400b9df63ed704dd45e65a7f430532d /net/batman-adv/hash.h | |
parent | 61610c63fa1025468c82be975e7d574e847d00de (diff) | |
download | talos-op-linux-d4009e4b6e309e222c5245056f4d6e1a4da88026.tar.gz talos-op-linux-d4009e4b6e309e222c5245056f4d6e1a4da88026.zip |
cxlflash: Move to exponential back-off when cmd_room is not available
[ Upstream commit ea76543127da32dec28af0a13ea1b06625fc085e ]
While profiling the cxlflash_queuecommand() path under a heavy load it
was found that number of retries to find cmd_room was fairly high.
There are two problems with the current back-off:
a) It starts with a udelay of 0
b) It backs-off linearly
Tried several approaches (a higher multiple 10*n, 100*n, as well as n^2,
2^n) and found that the exponential back-off(2^n) approach had the least
overall cost. Cost as being defined as overall time spent waiting.
The fix is to change the linear back-off to an exponential back-off.
This solution also takes care of the problem with the initial
delay (starts with 1 usec).
Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/batman-adv/hash.h')
0 files changed, 0 insertions, 0 deletions