From: Andres Salomon <dilinger@debian.org>
To: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dynticks: don't unlock spinlock twice
Date: Sun, 04 Mar 2007 06:14:41 -0500 [thread overview]
Message-ID: <45EAAA21.4040803@debian.org> (raw)
In-Reply-To: <1172912540.24738.108.camel@localhost.localdomain>
Thomas Gleixner wrote:
> On Fri, 2007-03-02 at 21:52 -0500, Andres Salomon wrote:
[...]
>
> The BUG is somewhere else. the tick timer should never be seen in
> hrtimer_run_queues. The tick timer is operated solely from the timer
> interrupt.
>
> The question is, how the tick timer gets enqueued in the softirq queue.
> Can you isolate the codepath, where this happens ?
>
Only 4 functions call timer->function; hrtimer_enequeue_reprogram,
hrtimer_interrupt, run_hrtimer_softirq, and run_hrtimer_queue.
- hrtimer_enqueue_reprogram will not call CB_IRQSAFE_NO_SOFTIRQ; this
function is not the culprit. It does move CB_SOFTIRQs onto the
cb_pending list.
- hrtimer_interrupt is called from a hardirq context, and only runs
CB_IRQSAFE*. CB_SOFTIRQs are moved onto the cb_pending list. Since
irqs are disabled, this function is not the culprit.
- run_hrtimer_softirq is called from the HRTIMER_SOFTIRQ, and only
operates on softirqs (via the cb_pending list). CB_IRQSAFE_NO_SOFTIRQ
callbacks are never added to the cb_pending list, so this function is
not the culprit.
- run_hrtimer_queue is called from TIMER_SOFTIRQ, and runs on all
timers. This function is what shows up in the backtrace, and should not
be calling tick_sched_timer.
Now, the question is; what *should* it be doing? Since it is only ever
run from a softirq context, should it be checking for
!CB_IRQSAFE_NO_SOFTIRQ before running the timers? Should it only be
processing timers that have been added to cb_pending (which are
guaranteed to be softirq-friendly)? Is there even a reason why we have
a run_hrtimer_softirq that processes cb_pending, as well as a
run_timer_softirq that calls hrtimer_run_queues? Why should the timer
softirq (which is raised by, amongst other things, update_process_times,
which is called by our friend tick_sched_timer) care about the hrtimer
queues?
next prev parent reply other threads:[~2007-03-04 11:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-03 2:52 [PATCH] dynticks: don't unlock spinlock twice Andres Salomon
2007-03-03 9:02 ` Thomas Gleixner
2007-03-04 11:14 ` Andres Salomon [this message]
2007-03-04 13:09 ` [PATCH] highres: Do not run the TIMER_SOFTIRQ after switching to highres mode Thomas Gleixner
2007-03-04 13:12 ` Andres Salomon
2007-03-04 13:23 ` Thomas Gleixner
2007-03-05 7:25 ` Ingo Molnar
2007-03-05 7:50 ` Andres Salomon
2007-03-05 7:52 ` Ingo Molnar
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=45EAAA21.4040803@debian.org \
--to=dilinger@debian.org \
--cc=linux-kernel@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