summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-07-12 18:45:03 +0000
committerShaun Ruffell <sruffell@digium.com>2010-07-12 18:45:03 +0000
commitcbf51d66f2fd97b471e724a29d7587af8b5ecbe4 (patch)
treec8ae13213e287eef1cb7eac18ee4c2e5ba48e4b5
parent810ba7210580d7cc5618b4a029408e7c3ba6283a (diff)
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 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8868 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/dahdi-base.c2
-rw-r--r--drivers/dahdi/dahdi_dummy.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index eba0bdc..f7364fa 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -8342,7 +8342,7 @@ static void coretimer_func(unsigned long param)
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;
diff --git a/drivers/dahdi/dahdi_dummy.c b/drivers/dahdi/dahdi_dummy.c
index cfc5fdc..f5b36b1 100644
--- a/drivers/dahdi/dahdi_dummy.c
+++ b/drivers/dahdi/dahdi_dummy.c
@@ -98,7 +98,7 @@ static struct hrtimer zaptimer;
#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: */