Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 1629

kernel-2.6.18-194.11.1.el5.src.rpm

From: George Beshers <gbeshers@redhat.com>
Date: Thu, 11 Sep 2008 17:53:47 -0400
Subject:  [misc] hrtimer optimize softirq
Message-id: 20080911214239.23760.88787.sendpatchset@dhcp-100-2-194.bos.redhat.com
O-Subject: [RHEL5.3 PATCH 2/2] [v3] BZ442148: hrtimer optimize softirq
Bugzilla: 442148

BZ#442148: holdoffs in hrtimer_run_queues on >64p systems

Patch 2/2:

X-Git-Url: http://git2.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=259aae864ceeb2b34e7bafa1ce18d096a357fab2

hrtimer: optimize the softirq time optimization

The previous optimization did not take the case into account where a
clock provides its own softirq_get_time() function.

Check for the availablitiy of the clock get time function first and
then check if we need to retrieve the time for both clocks via
hrtimer_softirq_gettime() to avoid a double evaluation of time in that
case as well.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index f543284..71ac1d3 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -624,14 +624,13 @@ void hrtimer_run_queues(void)
 		if (!base->first)
 			continue;
 
-		if (gst) {
+		if (base->get_softirq_time)
+			base->softirq_time = base->get_softirq_time();
+		else if (gst) {
 			hrtimer_get_softirq_time(cpu_base);
 			gst = 0;
 		}
 
-		if (base->get_softirq_time)
-			base->softirq_time = base->get_softirq_time();
-
 		spin_lock_irq(&base->lock);
 
 		while ((node = base->first)) {