[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 02 Feb 2010 15:35:50 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Yury Polyanskiy <ypolyans@...nceton.edu>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
Wei Yongjun <yjwei@...fujitsu.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>, polyanskiy@...il.com,
Thomas Gleixner <tglx@...utronix.de>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] hrtimer, softirq: Fix hrtimer->softirq trampoline
On Tue, 2010-02-02 at 09:28 -0500, Yury Polyanskiy wrote:
> On Tue, 02 Feb 2010 15:20:01 +0100
> Peter Zijlstra <peterz@...radead.org> wrote:
> > static enum hrtimer_restart __hrtimer_tasklet_trampoline(struct hrtimer *timer)
> > {
> > struct tasklet_hrtimer *ttimer =
> > container_of(timer, struct tasklet_hrtimer, timer);
> >
> > - if (hrtimer_is_hres_active(timer)) {
> > - tasklet_hi_schedule(&ttimer->tasklet);
> > - return HRTIMER_NORESTART;
> > - }
> > - return ttimer->function(timer);
> > + tasklet_hi_schedule(&ttimer->tasklet);
> > + return HRTIMER_NORESTART;
> > }
> >
>
> Are you totally against if(in_irq())?
Yeah, things like that are an indication that you really don't know wtf
you're doing and are just patching up.
There is a single site where hrtimer callbacks can indeed be done from
softirq, but in that case the above still works correctly, and I've been
meaning to get rid of that anyway.
--
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