public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RT] time/hrtimer: disable that mode check
@ 2017-12-13 13:58 Sebastian Andrzej Siewior
  2017-12-13 14:19 ` Peter Zijlstra
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2017-12-13 13:58 UTC (permalink / raw)
  To: linux-rt-users; +Cc: linux-kernel, tglx, Peter Zijlstra, Steven Rostedt

On -RT we push all timers by default into the soft-mode. The
"start/update" code does not use that SOFT bit so we always see that
warning.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
I am going to fold it into the original patch since only v4.14 is
affected.

 kernel/time/hrtimer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 2fff8790bc56..f4df924d4b48 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -422,8 +422,10 @@ static inline void debug_hrtimer_activate(struct hrtimer *timer,
 	 * Check whether the HRTIMER_MODE_SOFT bit and hrtimer.is_soft
 	 * match, when a timer is started via__hrtimer_start_range_ns().
 	 */
+#ifndef CONFIG_PREEMPT_RT_BASE
 	if (modecheck)
-		WARN_ON_ONCE((mode & HRTIMER_MODE_SOFT) & !timer->is_soft);
+		WARN_ON_ONCE(!(mode & HRTIMER_MODE_SOFT) ^ !timer->is_soft);
+#endif
 
 	debug_object_activate(timer, &hrtimer_debug_descr);
 }
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH RT] time/hrtimer: disable that mode check
  2017-12-13 13:58 [PATCH RT] time/hrtimer: disable that mode check Sebastian Andrzej Siewior
@ 2017-12-13 14:19 ` Peter Zijlstra
  2017-12-13 14:22   ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Zijlstra @ 2017-12-13 14:19 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: linux-rt-users, linux-kernel, tglx, Steven Rostedt

On Wed, Dec 13, 2017 at 02:58:35PM +0100, Sebastian Andrzej Siewior wrote:
> On -RT we push all timers by default into the soft-mode. The
> "start/update" code does not use that SOFT bit so we always see that
> warning.

Not _all_ timers I hope? There's a few the scheduler and perf use that
really should stay in hardirq context.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RT] time/hrtimer: disable that mode check
  2017-12-13 14:19 ` Peter Zijlstra
@ 2017-12-13 14:22   ` Sebastian Andrzej Siewior
  2017-12-13 16:49     ` Steven Rostedt
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2017-12-13 14:22 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: linux-rt-users, linux-kernel, tglx, Steven Rostedt

On 2017-12-13 15:19:19 [+0100], Peter Zijlstra wrote:
> On Wed, Dec 13, 2017 at 02:58:35PM +0100, Sebastian Andrzej Siewior wrote:
> > On -RT we push all timers by default into the soft-mode. The
> > "start/update" code does not use that SOFT bit so we always see that
> > warning.
> 
> Not _all_ timers I hope? There's a few the scheduler and perf use that
> really should stay in hardirq context.
That is correct, a few ones remain in the hardirq context.

Sebastian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH RT] time/hrtimer: disable that mode check
  2017-12-13 14:22   ` Sebastian Andrzej Siewior
@ 2017-12-13 16:49     ` Steven Rostedt
  0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2017-12-13 16:49 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Peter Zijlstra, linux-rt-users, linux-kernel, tglx

On Wed, 13 Dec 2017 15:22:57 +0100
Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:

> On 2017-12-13 15:19:19 [+0100], Peter Zijlstra wrote:
> > On Wed, Dec 13, 2017 at 02:58:35PM +0100, Sebastian Andrzej Siewior wrote:  
> > > On -RT we push all timers by default into the soft-mode. The
> > > "start/update" code does not use that SOFT bit so we always see that
> > > warning.  
> > 
> > Not _all_ timers I hope? There's a few the scheduler and perf use that
> > really should stay in hardirq context.  
> That is correct, a few ones remain in the hardirq context.
> 

As Sebastian said, by default they are in SOFT mode. I'm assuming the
ones that are not have some logic to make sure they are not in SOFT
mode.

-- Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-13 16:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-13 13:58 [PATCH RT] time/hrtimer: disable that mode check Sebastian Andrzej Siewior
2017-12-13 14:19 ` Peter Zijlstra
2017-12-13 14:22   ` Sebastian Andrzej Siewior
2017-12-13 16:49     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox