From: Peter Zijlstra <peterz@infradead.org>
To: Patrick McHardy <kaber@trash.net>
Cc: David Miller <davem@davemloft.net>,
tglx@linutronix.de, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [patch 1/3] net: serialize hrtimer callback in sched_cbq
Date: Tue, 14 Jul 2009 10:30:59 +0200 [thread overview]
Message-ID: <1247560259.7500.46.camel@twins> (raw)
In-Reply-To: <4A5C402A.7090906@trash.net>
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.
next prev parent reply other threads:[~2009-07-14 8:31 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-09 21:59 [patch 0/3] net: Sanitizing hrtimer usage in net/sched/sch_cbq.c Thomas Gleixner
2009-07-09 21:59 ` [patch 1/3] net: serialize hrtimer callback in sched_cbq Thomas Gleixner
2009-07-12 20:55 ` David Miller
2009-07-14 8:22 ` Patrick McHardy
2009-07-14 8:30 ` Peter Zijlstra [this message]
2009-07-14 16:01 ` David Miller
2009-07-14 8:55 ` Thomas Gleixner
2009-07-14 16:00 ` David Miller
2009-07-14 16:28 ` Peter Zijlstra
2009-07-14 16:42 ` Linus Torvalds
2009-07-17 12:14 ` Peter Zijlstra
2009-07-17 13:26 ` Oliver Hartkopp
2009-07-17 15:44 ` Linus Torvalds
2009-07-22 3:18 ` David Miller
2009-07-22 6:29 ` Peter Zijlstra
2009-07-22 12:28 ` [PATCH] softirq: tasklet_hrtimer Peter Zijlstra
2009-07-22 14:01 ` [tip:timers/urgent] softirq: introduce tasklet_hrtimer infrastructure tip-bot for Peter Zijlstra
2009-07-22 15:03 ` [tip:core/urgent] " tip-bot for Peter Zijlstra
2009-07-22 15:39 ` [PATCH] softirq: tasklet_hrtimer David Miller
2009-07-22 16:01 ` Linus Torvalds
2009-07-15 9:56 ` [patch 1/3] net: serialize hrtimer callback in sched_cbq Oliver Hartkopp
2009-07-09 21:59 ` [patch 2/3] net: sanitize hrtimer usage " Thomas Gleixner
2009-07-09 21:59 ` [patch 3/3] net: use HRTIMER_RESTART " Thomas Gleixner
2009-07-10 0:39 ` [patch 0/3] net: Sanitizing hrtimer usage in net/sched/sch_cbq.c David Miller
2009-07-12 20:57 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1247560259.7500.46.camel@twins \
--to=peterz@infradead.org \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox