[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1324502265-24521-2-git-send-email-dzickus@redhat.com>
Date: Wed, 21 Dec 2011 16:17:41 -0500
From: Don Zickus <dzickus@...hat.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Ingo Molnar <mingo@...e.hu>, Peter Zijlstra <peterz@...radead.org>,
avi@...hat.com, Andrew Morton <akpm@...ux-foundation.org>,
tglx@...utronix.de, Don Zickus <dzickus@...hat.com>
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 <dzickus@...hat.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists