diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
commit | bbb20089a3275a19e475dbc21320c3742e3ca423 (patch) | |
tree | 216fdc1cbef450ca688135c5b8969169482d9a48 /net/core/gen_estimator.c | |
parent | 3e48e656903e9fd8bc805c6a2c4264d7808d315b (diff) | |
parent | 657a77fa7284d8ae28dfa48f1dc5d919bf5b2843 (diff) |
Merge branch 'dmaengine' into async-tx-next
Conflicts:
crypto/async_tx/async_xor.c
drivers/dma/ioat/dma_v2.h
drivers/dma/ioat/pci.c
drivers/md/raid5.c
Diffstat (limited to 'net/core/gen_estimator.c')
-rw-r--r-- | net/core/gen_estimator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c index 6d62d4618cfc..78e5bfc454ae 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c | |||
@@ -128,12 +128,12 @@ static void est_timer(unsigned long arg) | |||
128 | npackets = e->bstats->packets; | 128 | npackets = e->bstats->packets; |
129 | brate = (nbytes - e->last_bytes)<<(7 - idx); | 129 | brate = (nbytes - e->last_bytes)<<(7 - idx); |
130 | e->last_bytes = nbytes; | 130 | e->last_bytes = nbytes; |
131 | e->avbps += ((s64)(brate - e->avbps)) >> e->ewma_log; | 131 | e->avbps += (brate >> e->ewma_log) - (e->avbps >> e->ewma_log); |
132 | e->rate_est->bps = (e->avbps+0xF)>>5; | 132 | e->rate_est->bps = (e->avbps+0xF)>>5; |
133 | 133 | ||
134 | rate = (npackets - e->last_packets)<<(12 - idx); | 134 | rate = (npackets - e->last_packets)<<(12 - idx); |
135 | e->last_packets = npackets; | 135 | e->last_packets = npackets; |
136 | e->avpps += ((long)rate - (long)e->avpps) >> e->ewma_log; | 136 | e->avpps += (rate >> e->ewma_log) - (e->avpps >> e->ewma_log); |
137 | e->rate_est->pps = (e->avpps+0x1FF)>>10; | 137 | e->rate_est->pps = (e->avpps+0x1FF)>>10; |
138 | skip: | 138 | skip: |
139 | read_unlock(&est_lock); | 139 | read_unlock(&est_lock); |