[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGQ1y=4YNpyztGyPb=rgnBduJfykB8tbG1FQWGEKQWVNeu+nNw@mail.gmail.com>
Date: Tue, 7 Apr 2015 11:12:09 -0700
From: Jason Low <jason.low2@...com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Mike Galbraith <umgwanakikbuti@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Thavatchai Makphaibulchoke <tmac@...com>,
Steven Rostedt <rostedt@...dmis.org>,
LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...hat.com>,
linux-rt-users <linux-rt-users@...r.kernel.org>,
Jason Low <jason.low2@...com>
Subject: Re: [PATCH v2 1/2] rtmutex Real-Time Linux: Fixing kernel BUG at kernel/locking/rtmutex.c:997!
On Tue, Apr 7, 2015 at 5:04 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> That smells like something we should be able to do without a lock.
>
> If we use {READ,WRITE}_ONCE() on those two fields (->active_timers and
> ->next_timer) we should be able to do this without the spinlock.
Yeah, when atomics were suggested earlier, I was wondering if we could
just use READ_ONCE/WRITE_ONCE.
> Races here aren't really a problem I think, if you manage to install a
> timer at the current jiffy and have already missed the tick you're in
> the same boat. You get to wait for the next tick.
The lock shouldn't be used in get_next_timer_interrupt() either right?
unsigned long get_next_timer_interrupt(unsigned long now)
{
...
#ifdef CONFIG_PREEMPT_RT_FULL
/*
* On PREEMPT_RT we cannot sleep here. If the trylock does not
* succeed then we return the worst-case 'expires in 1 tick'
* value. We use the rt functions here directly to avoid a
* migrate_disable() call.
*/
if (!spin_do_trylock(&base->lock))
return now + 1;
#else
--
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