[lkml]   [2011]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 1/5] sched: Minimize the number of touch_softlockup_watchdogs
    I am looking to add a change to the softlockup code that
    creates a timestamp every time it is touched. However, there is
    some overhead to touching cpu_clock all the time.

    I noticed sched_clock_idle_wakeup_event runs
    touch_softlockup_watchdog every microsecond or about a
    million times a second. That seemed excessive.

    The only use I can see for touching the softlockup watchdog
    is to reset the clock on long delays. Considering most of the
    time the delay is 0, it seems pointless to touch the watchdog.

    This saves about a million calls a second and avoids any new
    overhead by changes in the softlockup watchdog.

    Signed-off-by: Don Zickus <>
    kernel/sched/clock.c | 3 ++-
    1 files changed, 2 insertions(+), 1 deletions(-)

    diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c
    index c685e31..802e03b 100644
    --- a/kernel/sched/clock.c
    +++ b/kernel/sched/clock.c
    @@ -274,7 +274,8 @@ void sched_clock_idle_wakeup_event(u64 delta_ns)

    - touch_softlockup_watchdog();
    + if (delta_ns > 0)
    + touch_softlockup_watchdog();


     \ /
      Last update: 2011-12-21 22:21    [W:0.022 / U:32.132 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site