[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1331036257.25686.365.camel@gandalf.stny.rr.com>
Date: Tue, 06 Mar 2012 07:17:37 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
RT <linux-rt-users@...r.kernel.org>,
Clark Williams <clark@...hat.com>,
John Kacur <jkacur@...hat.com>, Carsten Emde <cbe@...dl.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH RT] seqlock/rt: Prevent livelocks with seqlocks in RT
On Tue, 2012-03-06 at 09:18 +0100, Thomas Gleixner wrote:
> Errm. rt15 has
>
> /*
> * Starvation safe read side for RT
> */
> static inline unsigned read_seqbegin(seqlock_t *sl)
> {
> unsigned ret;
>
> repeat:
> ret = sl->seqcount.sequence;
> if (unlikely(ret & 1)) {
> /*
> * Take the lock and let the writer proceed (i.e. evtl
> * boost it), otherwise we could loop here forever.
> */
> spin_lock(&sl->lock);
> spin_unlock(&sl->lock);
> goto repeat;
> }
> return ret;
> }
> #endif
You're right it does!
I didn't see this as the lock up showed it was locked up in
read_seqcount_begin(), it was late and I was tired.
Here's the real fix then:
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index 723274d..29ffd4f 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -177,7 +177,7 @@ typedef struct {
/*
* Read side functions for starting and finalizing a read side section.
*/
-#ifndef CONFIG_PREEMPT_RT
+#ifndef CONFIG_PREEMPT_RT_FULL
static inline unsigned read_seqbegin(const seqlock_t *sl)
{
return read_seqcount_begin(&sl->seqcount);
--
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