lkml.org 
[lkml]   [2009]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [v2 PATCH 1/4] timers: framework to identify pinned timers.
On 03/04, Arun R Bharadwaj wrote:
>
> +static inline unsigned long tbase_get_flag_bits(struct timer_list *timer)
> +{
> + return tbase_get_deferrable(timer->base) |
> + tbase_get_pinned(timer->base);
> +}

I'd say this looks a bit strange. Hopefully compiler can optimize this code
to return (unsigned long)base & (TBASE_DEFERRABLE_FLAG | TBASE_PINNED_FLAG).

> @@ -736,6 +759,7 @@ void add_timer_on(struct timer_list *tim
> struct tvec_base *base = per_cpu(tvec_bases, cpu);
> unsigned long flags;
>
> + timer_set_pinned(timer);

But we never clear TBASE_PINNED_FLAG?

If we use mod_timer() next time, the timer remains "pinned". I do not say
this is really wrong, but a bit strange imho.

Oleg.


\
 
 \ /
  Last update: 2009-03-05 18:01    [W:0.690 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site