Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754002AbdLTAeN (ORCPT ); Tue, 19 Dec 2017 19:34:13 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:46849 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753947AbdLTAeM (ORCPT ); Tue, 19 Dec 2017 19:34:12 -0500 Subject: Re: [v4.14-rt][report] arm: run: stress-ng --class os --all 0 -t 5m To: Sebastian Andrzej Siewior CC: Steven Rostedt , linux-rt-users , LKML References: <20171219082739.d6oxzkjkdicfu3hq@linutronix.de> From: Grygorii Strashko Message-ID: <40bb8ed5-d0e7-72e8-ab20-89431263af48@ti.com> Date: Tue, 19 Dec 2017 18:33:59 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171219082739.d6oxzkjkdicfu3hq@linutronix.de> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [128.247.59.147] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3812 Lines: 79 On 12/19/2017 02:27 AM, Sebastian Andrzej Siewior wrote: > On 2017-12-18 20:01:05 [-0600], Grygorii Strashko wrote: >> Hi All, > Hi, > >> Below results of running stress-ng --class os --all 0 -t 5m on TI am57xx-evm (SMP, 2 cpu) >> git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git >> branch: linux-4.14.y-rt >> commit: d3d9904 v4.14.6-rt7 >> - only config changes applied. >> >> one "WARNING: possible circular locking dependency detected" >> [ 85.943562] ====================================================== >> [ 85.943564] WARNING: possible circular locking dependency detected >> [ 85.943568] 4.14.6-rt7-dirty #29 Not tainted >> [ 85.943570] ------------------------------------------------------ >> [ 85.943573] stress-ng-cpu-o/764 is trying to acquire lock: >> [ 85.943576] (&p->pi_lock){-...}, at: [] try_to_wake_up+0x28/0x924 >> [ 85.943594] >> [ 85.943594] but task is already holding lock: >> [ 85.943596] (hrtimer_bases.lock){-...}, at: [] hrtimer_interrupt+0x68/0x2b0 >> >> one "WARNING: CPU: 0 PID: 3514 at kernel/rcu/tree_plugin.h:310 rcu_note_context_switch+0x3e8/0x988" >> ^ sorry, log not very readable > > This should cure it, does it? > > diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c > index c2c344fda487..3971fa0c7194 100644 > --- a/kernel/time/hrtimer.c > +++ b/kernel/time/hrtimer.c > @@ -1952,6 +1952,7 @@ int hrtimers_dead_cpu(unsigned int scpu) > BUG_ON(cpu_online(scpu)); > tick_cancel_sched_timer(scpu); > > + local_bh_disable(); > local_irq_disable(); > old_base = &per_cpu(hrtimer_bases, scpu); > new_base = this_cpu_ptr(&hrtimer_bases); > @@ -1979,6 +1980,7 @@ int hrtimers_dead_cpu(unsigned int scpu) > /* Check, if we got expired work to do */ > __hrtimer_peek_ahead_timers(); > local_irq_enable(); > + local_bh_enable(); > return 0; > } > I've run test few times - can't see "WARNING: possible circular locking dependency detected" any more. Below warning happened once. [ 3091.593894] ------------[ cut here ]------------ [ 3091.593909] WARNING: CPU: 0 PID: 1797 at kernel/rcu/tree_plugin.h:310 rcu_note_context_switch+0x554/0x950 [ 3091.593912] Modules linked in: [ 3091.593923] CPU: 0 PID: 1797 Comm: stress-ng-clock Not tainted 4.14.6-rt7-dirty #37 [ 3091.593926] Hardware name: Generic DRA74X (Flattened Device Tree) [ 3091.593941] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 3091.593952] [] (show_stack) from [] (dump_stack+0xa0/0xd4) [ 3091.593964] [] (dump_stack) from [] (__warn+0xd8/0x104) [ 3091.593975] [] (__warn) from [] (warn_slowpath_null+0x20/0x28) [ 3091.593984] [] (warn_slowpath_null) from [] (rcu_note_context_switch+0x554/0x950) [ 3091.593996] [] (rcu_note_context_switch) from [] (__schedule+0xc4/0xa7c) [ 3091.594005] [] (__schedule) from [] (schedule+0x60/0xf8) [ 3091.594016] [] (schedule) from [] (rt_spin_lock_slowlock_locked+0xa8/0x304) [ 3091.594026] [] (rt_spin_lock_slowlock_locked) from [] (__read_rt_lock+0xc0/0xf4) [ 3091.594036] [] (__read_rt_lock) from [] (pin_current_cpu+0x3c/0x11c) [ 3091.594047] [] (pin_current_cpu) from [] (migrate_disable+0x78/0x1e8) [ 3091.594057] [] (migrate_disable) from [] (rt_spin_lock+0x14/0x4c) [ 3091.594066] [] (rt_spin_lock) from [] (__lock_timer+0xc0/0x220) [ 3091.594076] [] (__lock_timer) from [] (SyS_timer_gettime+0x14/0xb8) [ 3091.594087] [] (SyS_timer_gettime) from [] (__sys_trace_return+0x0/0x10) [ 3091.594091] ---[ end trace 0000000000000002 ]--- -- regards, -grygorii