[lkml]   [2008]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH] suppress needless timer reprogramming {tick-sched.c}

Does this patch look ok?

It simply does a check to see if the about to be reprogrammed 1 shot already is the last event programmed in the hardware. If it is it skips calling the hardware.

In my device I get many interrupts from a high speed USB device in a very short period of time. The system spends a lot of time reprogramming the hardware timer which is in a slower timing domain as compared to the CPU. This results in the CPU spending a huge amount of time waiting for the timer posting to be done. All of this reprogramming is useless as the wake up time has not changed.

As measured using ETM trace this drops my reprogramming penalty from almost 60% CPU load down to 15% during high interrupt rate. If you like I can send traces to show this.

Richard W.

I can much the other 15% by keeping the ticker on by using a function like there is for rcu today in tick-sched.c. Something like an irq_needs_cpu() by the rcu_needs_cpu() check. Where return = 1 if (curr_irq_ts - last_irq_ts < min_delta_ns). A time stamp is taken in irq code at entry.

[unhandled content-type:application/octet-stream]
 \ /
  Last update: 2008-06-17 02:09    [W:0.046 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site