From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757041AbaGBRPm (ORCPT ); Wed, 2 Jul 2014 13:15:42 -0400 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.230]:40684 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755671AbaGBROf (ORCPT ); Wed, 2 Jul 2014 13:14:35 -0400 Message-Id: <20140702171433.608607274@goodmis.org> User-Agent: quilt/0.63-1 Date: Wed, 02 Jul 2014 13:14:16 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-rt-users Cc: Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Paul Gortmaker , stable-rt@vger.kernel.org Subject: [PATCH RT 2/4] timer: do not spin_trylock() on UP References: <20140702171414.482562827@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=0002-timer-do-not-spin_trylock-on-UP.patch X-RR-Connecting-IP: 107.14.168.130:25 X-Cloudmark-Score: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.12.22-rt35-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: Sebastian Andrzej Siewior This will void a warning comming from the spin-lock debugging code. The lock avoiding idea is from Steven Rostedt. Cc: stable-rt@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Steven Rostedt --- kernel/timer.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/kernel/timer.c b/kernel/timer.c index 611a5973d9e1..3b79da2f9c67 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -1461,6 +1461,19 @@ void run_local_timers(void) * the timer softirq. */ #ifdef CONFIG_PREEMPT_RT_FULL + +#ifndef CONFIG_SMP + /* + * The spin_do_trylock() later may fail as the lock may be hold before + * the interrupt arrived. The spin-lock debugging code will raise a + * warning if the try_lock fails on UP. Since this is only an + * optimization for the FULL_NO_HZ case (not to run the timer softirq on + * an nohz_full CPU) we don't really care and shedule the softirq. + */ + raise_softirq(TIMER_SOFTIRQ); + return; +#endif + /* On RT, irq work runs from softirq */ if (irq_work_needs_cpu()) { raise_softirq(TIMER_SOFTIRQ); -- 2.0.0