public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	RT <linux-rt-users@vger.kernel.org>
Subject: Re: Fixup for 3.4.34 merge conflict
Date: Tue, 26 Mar 2013 22:49:32 +0100	[thread overview]
Message-ID: <20130326214932.GD14220@linutronix.de> (raw)
In-Reply-To: <1363711834.5938.39.camel@gandalf.local.home>

* Steven Rostedt | 2013-03-19 12:50:34 [-0400]:

>@@ -1054,19 +1032,39 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
> 	 *
> 	 * XXX send_remote_softirq() ?
> 	 */
>-	if (leftmost && new_base->cpu_base == &__get_cpu_var(hrtimer_bases)) {
>-		ret = hrtimer_enqueue_reprogram(timer, new_base, wakeup);
>-		if (ret) {
>+	if (leftmost && new_base->cpu_base == &__get_cpu_var(hrtimer_bases)
>+		&& hrtimer_enqueue_reprogram(timer, new_base)) {
>+
>+		if (wakeup
>+#ifdef CONFIG_PREEMPT_RT_BASE
>+		    /*
>+		     * Move softirq based timers away from the rbtree in
>+		     * case it expired already. Otherwise we would have a
>+		     * stale base->first entry until the softirq runs.
>+		     */
>+		    && hrtimer_rt_defer(timer)
>+#endif
>+			) {
> 			/*
>-			 * In case we failed to reprogram the timer (mostly
>-			 * because out current timer is already elapsed),
>-			 * remove it again and report a failure. This avoids
>-			 * stale base->first entries.
>+			 * We need to drop cpu_base->lock to avoid a
>+			 * lock ordering issue vs. rq->lock.
> 			 */
>-			debug_deactivate(timer);
>-			__remove_hrtimer(timer, new_base,
>-					timer->state & HRTIMER_STATE_CALLBACK, 0);
>+			raw_spin_unlock(&new_base->cpu_base->lock);
>+			raise_softirq_irqoff(HRTIMER_SOFTIRQ);
>+			local_irq_restore(flags);
>+			return ret;

Hmmm. Your ret here might be 0 or 1. RT did return here always zero
unless it returned -ETIME. This is what I did for v3.8 but I don't claim
to be correct here. Need to re-check this later…

Sebastian

      reply	other threads:[~2013-03-26 21:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 16:50 Fixup for 3.4.34 merge conflict Steven Rostedt
2013-03-26 21:49 ` Sebastian Andrzej Siewior [this message]

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=20130326214932.GD14220@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.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