lkml.org 
[lkml]   [2011]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/5] sched: Minimize the number of touch_softlockup_watchdogs
Date
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 <dzickus@redhat.com>
---
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)
return;

sched_clock_tick();
- touch_softlockup_watchdog();
+ if (delta_ns > 0)
+ touch_softlockup_watchdog();
}
EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event);

--
1.7.7.4


\
 
 \ /
  Last update: 2011-12-21 22:21    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean