public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andres Salomon <dilinger@debian.org>
To: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] highres: Do not run the TIMER_SOFTIRQ after switching to	highres mode
Date: Sun, 04 Mar 2007 08:12:17 -0500	[thread overview]
Message-ID: <45EAC5B1.2060306@debian.org> (raw)
In-Reply-To: <1173013794.24738.130.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

Thomas Gleixner wrote:
>>> The question is, how the tick timer gets enqueued in the softirq queue.
>>> Can you isolate the codepath, where this happens ?
> 
> The TIMER_SOFTIRQ runs the hrtimers during bootup until a usable
> clocksource and clock event sources are registered. The switch to high
> resolution mode happens inside of the TIMER_SOFTIRQ, but runs the
> softirq afterwards. That way the tick emulation timer, which was set up
> in the switch to highres might be executed in the softirq context, which
> is a BUG. The rbtree has not to be touched by the softirq after the
> highres switch.
> 

And an additional request, just to make it explicit that we should not
have any NO_SOFTIRQ callbacks in the tree; BUG out if we encounter such
a thing.

Signed-off-by: Andres Salomon <dilinger@debian.org>

[-- Attachment #2: hrtimer4.patch --]
[-- Type: text/x-patch, Size: 476 bytes --]

diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 476cb0c..4dcdd09 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1130,6 +1130,7 @@ static inline void run_hrtimer_queue(struct hrtimer_cpu_base *cpu_base,
 		if (base->softirq_time.tv64 <= timer->expires.tv64)
 			break;
 
+		BUG_ON(timer->cb_mode == HRTIMER_CB_IRQSAFE_NO_SOFTIRQ);
 		timer_stats_account_hrtimer(timer);
 
 		fn = timer->function;

  reply	other threads:[~2007-03-04 13:12 UTC|newest]

Thread overview: 11+ 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
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 [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2007-03-05  1:50 [5/6] 2.6.21-rc2: known regressions Adrian Bunk
2007-03-05 23:43 ` Thomas Gleixner
2007-03-05 23:45   ` Linus Torvalds
2007-03-06  0:38     ` Linus Torvalds
2007-03-06  1:02       ` Thomas Gleixner
2007-03-06  1:31         ` Linus Torvalds
2007-03-06  2:18           ` Linus Torvalds
2007-03-06 10:33             ` Michael S. Tsirkin
2007-03-06 10:37               ` Ingo Molnar
2007-03-06 10:46                 ` Michael S. Tsirkin
2007-03-06 11:32                   ` Ingo Molnar
2007-03-06 16:44                     ` Linus Torvalds
2007-03-06 17:29                       ` [PATCH] highres: do not run the TIMER_SOFTIRQ after switching to highres mode Thomas Gleixner
2007-03-06 17:41                         ` Linus Torvalds

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=45EAC5B1.2060306@debian.org \
    --to=dilinger@debian.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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