[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1247560259.7500.46.camel@twins>
Date: Tue, 14 Jul 2009 10:30:59 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Patrick McHardy <kaber@...sh.net>
Cc: David Miller <davem@...emloft.net>, tglx@...utronix.de,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [patch 1/3] net: serialize hrtimer callback in sched_cbq
On Tue, 2009-07-14 at 10:22 +0200, Patrick McHardy wrote:
>
> That's my understanding what HRTIMER_SOFTIRQ is used for. I think
> simply grabbing the root lock in cbq_undelay() should be fine.
Its not, and its going away soon (again) :-)
The current use of HRTIMER_SOFTIRQ is for when we enqueue a hrtimer with
an expiration time in the past. The current implementation tries to run
the timer instantly, however we cannot do it from the context calling
hrtimer_start(), since that might be holding locks the timer callback
also wants to hold, resulting in deadlocks.
Instead we queue the timer to the softirq, and kick the softirq. Which
leads to another problem in that we cannot always kick the softirq (esp
from within the scheduler).
We're going to change hrtimer_start() to return -ETIME instead of trying
to run the timer in-place, leaving the callers to figure it out.
The basic patch is done, but I still need to audit all the hrtimer users
in the kernel.
--
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