RT and timers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



George, 

	I wanted to show you the code below, from the RT patch. I think 
it's possible that, if the code isn't changed in the way below, the 
while() loop could run forever. If jiffies is very fast moving , and the 
softirqd is low priority. Do you have any comments on this?

Daniel


@@ -436,13 +437,30 @@ static int cascade(tvec_base_t *base, tv
 static inline void __run_timers(tvec_base_t *base)
 {
        struct timer_list *timer;
+       unsigned long jiffies_sample = jiffies;

        spin_lock_irq(&base->lock);
-       while (time_after_eq(jiffies, base->timer_jiffies)) {
+       while (time_after_eq(jiffies_sample, base->timer_jiffies)) {
                struct list_head work_list = LIST_HEAD_INIT(work_list);
                struct list_head *head = &work_list;
                int index = base->timer_jiffies & TVR_MASK;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux