[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090306070107.GC9190@linux.vnet.ibm.com>
Date: Fri, 6 Mar 2009 12:31:07 +0530
From: Arun R Bharadwaj <arun@...ux.vnet.ibm.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-pm@...ts.linux-foundation.org,
a.p.zijlstra@...llo.nl, ego@...ibm.com, tglx@...utronix.de,
mingo@...e.hu, andi@...stfloor.org, venkatesh.pallipadi@...el.com,
vatsa@...ux.vnet.ibm.com, arjan@...radead.org,
svaidy@...ux.vnet.ibm.com
Subject: Re: [v2 PATCH 1/4] timers: framework to identify pinned timers.
* Oleg Nesterov <oleg@...hat.com> [2009-03-05 17:53:40]:
> 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).
>
Misread the above statement.
The code is functionally correct. But not sure if the compiler
optimizes in the way that you have mentioned.
> > @@ -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.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists