lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090212222326.394E121B187@localhost>
Date:	Thu, 12 Feb 2009 14:23:25 -0800 (PST)
From:	md@...gle.com (Michael Davidson)
To:	mbligh@...gle.com, tglx@...utronix.de
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] clockevents: avoid unnecessary reprograming of event timer

From: Michael Davidson <md@...gle.com>

Don't reprogram the event timer if it is already set to expire
at the correct time.

Signed-off-by: Michael Davidson <md@...gle.com>
---
--- linux-2.6.29-rc4.orig/kernel/time/clockevents.c	2009-02-12 13:13:24.000000000 -0800
+++ linux-2.6.29-rc4/kernel/time/clockevents.c	2009-02-12 13:25:42.525558000 -0800
@@ -103,6 +103,9 @@
 	if (delta <= 0)
 		return -ETIME;
 
+	if (ktime_equal(dev->next_event, expires))
+		return 0;
+
 	dev->next_event = expires;
 
 	if (dev->mode == CLOCK_EVT_MODE_SHUTDOWN)
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ