lkml.org 
[lkml]   [2005]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] timers fixes/improvements
Ingo Molnar wrote:
>
> * Oleg Nesterov <oleg@tv-sign.ru> wrote:
>
> > struct timer_list {
> > ...
> > timer_base_t *_base;
> > };
>
> namespace cleanliness: i'd suggest s/_base/base.

I deliberately renamed it to '_base' because then it is much more grepable.
But I don't mind doing s/_base/base/ if you prefer.

> > int __mod_timer(struct timer_list *timer, unsigned long expires)
> [...]
> > /* Ensure the timer is serialized. */
> > if (base != &new_base->t_base
> > && base->running_timer == timer)
> > goto unlock;
>
> > unlock:
> > spin_unlock_irqrestore(&base->lock, flags);
> > } while (ret < 0);
>
> so we keep looping in __mod_timer() when the timer is running? Couldnt
> this be a performance hit?

I hope it is unlikely that __mod_timer() would hit the already running timer,
so hopefully this will not degrade the performance. And I don't see a simple
alternative to ensure the timer's serialization. At least it spins without
interrupts disabling.

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

\
 
 \ /
  Last update: 2005-04-06 13:31    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site