From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Low Subject: Re: [PATCH v2 1/2] rtmutex Real-Time Linux: Fixing kernel BUG at kernel/locking/rtmutex.c:997! Date: Tue, 07 Apr 2015 12:57:23 -0700 Message-ID: <1428436643.2556.66.camel@j-VirtualBox> References: <1424395866-81589-1-git-send-email-tmac@hp.com> <1428369962-74723-1-git-send-email-tmac@hp.com> <1428369962-74723-2-git-send-email-tmac@hp.com> <1428407236.3152.81.camel@gmail.com> <20150407120403.GN21418@twins.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Peter Zijlstra , Mike Galbraith , Thavatchai Makphaibulchoke , Steven Rostedt , LKML , Ingo Molnar , linux-rt-users , jason.low2@hp.com To: Thomas Gleixner Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-rt-users.vger.kernel.org On Tue, 2015-04-07 at 21:17 +0200, Thomas Gleixner wrote: > On Tue, 7 Apr 2015, Jason Low wrote: > > 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 > > And how do you protect the walk of the timer wheel against a > concurrent insertion/removal? So I just wanted to mention that the issue also applies to get_next_timer_interrupt(), in addition to run_local_timers(), but if we really want to remove the lock there, can we always return "now + 1" for PREEMPT_RT_FULL?