[svn-commits] sruffell: linux/trunk r8868 - /linux/trunk/drivers/dahdi/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 12 13:45:08 CDT 2010


Author: sruffell
Date: Mon Jul 12 13:45:03 2010
New Revision: 8868

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8868
Log:
dahdi: Explicitly ensure we don't schedule a timer for the current tick.

As best as I can tell, when CONFIG_NO_HZ is set along with CONFIG_HZ < 250, it
is possible for the system timer to exceed MAX_SOFTIRQ_RESTART. Tony
Mountifield alluded that this might be a problem in the below mailing list
posting, but when I was originally testing, I wasn't using CONFIG_NO_HZ and HZ
< 250.

http://www.mail-archive.com/asterisk-dev@lists.digium.com/msg37384.html

(closes issue #17620)
Reported by: seanbright

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c
    linux/trunk/drivers/dahdi/dahdi_dummy.c

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=8868&r1=8867&r2=8868
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Jul 12 13:45:03 2010
@@ -8342,7 +8342,7 @@
 	unsigned long ms_since_start;
 	struct timespec now;
 	const unsigned long MAX_INTERVAL = 100000L;
-	const unsigned long FOURMS_INTERVAL = HZ/250;
+	const unsigned long FOURMS_INTERVAL = max(HZ/250, 1);
 	const unsigned long ONESEC_INTERVAL = HZ;
 	const unsigned long MS_LIMIT = 3000;
 

Modified: linux/trunk/drivers/dahdi/dahdi_dummy.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_dummy.c?view=diff&rev=8868&r1=8867&r2=8868
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_dummy.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_dummy.c Mon Jul 12 13:45:03 2010
@@ -98,7 +98,7 @@
 #define CLOCK_SRC "Linux26"
 static struct timer_list timer;
 static atomic_t shutdown;
-#define JIFFIES_INTERVAL (HZ/250) 	/* 4ms is fine for dahdi_dummy */
+#define JIFFIES_INTERVAL max(HZ/250, 1) 	/* 4ms is fine for dahdi_dummy */
 #endif
 
 /* Different bits of the debug variable: */




More information about the svn-commits mailing list