lkml.org 
[lkml]   [2015]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/4] timer: relax tick stop in idle entry
    Date
    Upon entering idle, we can turn off tick if the next timeout
    is exactly one tick away. Otherwise, we could enter inner idle loop
    with tick still enabled, without resched set, the tick will continue
    during idle therefore less optimal in terms of energy savings.

    Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
    ---
    kernel/time/tick-sched.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
    index 7c7ec45..bcadaab 100644
    --- a/kernel/time/tick-sched.c
    +++ b/kernel/time/tick-sched.c
    @@ -606,7 +606,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
    * restart it proper.
    */
    delta = next_tick - basemono;
    - if (delta <= (u64)TICK_NSEC) {
    + if (delta < (u64)TICK_NSEC) {
    tick.tv64 = 0;
    if (!ts->tick_stopped)
    goto out;
    --
    1.9.1


    \
     
     \ /
      Last update: 2015-11-13 21:21    [W:4.113 / U:0.500 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site