diff options
author | Ed Cashin <ecashin@coraid.com> | 2012-12-17 16:03:49 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 17:15:24 -0800 |
commit | 5f0c9c48e7265039c3f945aaf44a1c6ae8adbd01 (patch) | |
tree | 2eb73358dc9ad58dce32dd40ceb0fbc938d915d4 /drivers/block/aoe/aoe.h | |
parent | 0d555ecfa468f6dc29697829844f2f79909e376f (diff) | |
download | op-kernel-dev-5f0c9c48e7265039c3f945aaf44a1c6ae8adbd01.zip op-kernel-dev-5f0c9c48e7265039c3f945aaf44a1c6ae8adbd01.tar.gz |
aoe: use high-resolution RTTs with fallback to low-res
These changes improve the accuracy of the decision about whether it's time
to retransmit an AoE command by using the microsecond-resolution
gettimeofday instead of jiffies.
Because the system time can jump suddenly, the decision reverts to using
jiffies if the high-resolution time difference is relatively large.
Otherwise the AoE targets could be considered failed inappropriately.
Signed-off-by: Ed Cashin <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block/aoe/aoe.h')
-rw-r--r-- | drivers/block/aoe/aoe.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h index 9e884ac..9fb68fc 100644 --- a/drivers/block/aoe/aoe.h +++ b/drivers/block/aoe/aoe.h @@ -88,8 +88,7 @@ enum { TIMERTICK = HZ / 10, RTTSCALE = 8, RTTDSCALE = 3, - MAXTIMER = HZ << 1, - RTTAVG_INIT = HZ / 4 << RTTSCALE, + RTTAVG_INIT = USEC_PER_SEC / 4 << RTTSCALE, RTTDEV_INIT = RTTAVG_INIT / 4, }; @@ -106,6 +105,8 @@ struct buf { struct frame { struct list_head head; u32 tag; + struct timeval sent; /* high-res time packet was sent */ + u32 sent_jiffs; /* low-res jiffies-based sent time */ ulong waited; struct aoetgt *t; /* parent target I belong to */ sector_t lba; @@ -143,11 +144,11 @@ struct aoedev { struct aoedev *next; ulong sysminor; ulong aoemajor; + u32 rttavg; /* scaled AoE round trip time average */ + u32 rttdev; /* scaled round trip time mean deviation */ u16 aoeminor; u16 flags; u16 nopen; /* (bd_openers isn't available without sleeping) */ - u16 rttavg; /* scaled AoE round trip time average */ - u16 rttdev; /* scaled round trip time mean deviation */ u16 fw_ver; /* version of blade's firmware */ u16 lasttag; /* last tag sent */ u16 useme; |