qcacmn: Use sched_clock instead of jiffies to calc yield time
The current implementation uses jiffies to calculate the yield time and
yields after 2 jiffies. The problem with this is that we end up yielding
anywhere between 1 - 2 jiffies as each jiffies are incremented by 10 ms
intervals. Sometimes we are taking more than 2 jiffies to yield. This
prevents the update of deferrable_timer if its being done at the same
CPU where hif_napi_poll is executing. This may result in the CPU
frequencies not being updated resulting in some fluctuations.
Use sched_clock kernel API to calculate the precise yield time.
Reduce the yield time to 10ms.
Some stats here
- How many times did we have to yield because of time
(%)0.670391061
Total Number of completes 1790
Total Number of complete 0 12
- When we yielded, how much did we exceed the time limit(10ms) by (ms)
Average 1.327444
Max 3.381667
Min 0.037709
- How many HTT Messages did we process when we had to yield
Average 22.41667
Max 33
Min 18
- How much time did we take when we had to yield 10ms + delta above
- How much time did we take when we did not yield (ms)
Average 0.907641
Max 8.649
Min 0
- How many HTT Messages did we process when we did not have to yield
Average 2.193476
Max 24
Min 1
Change-Id: I0d42c716ab8941b1de22a456447797c9ba5475c8
CRs-Fixed: 1089902
2 files changed