lkml.org 
[lkml]   [2019]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Possible use of RCU while in extended QS: idle vs RCU read-side in interrupt vs rcu_eqs_exit
----- On Jan 10, 2019, at 8:08 AM, rostedt rostedt@goodmis.org wrote:

> On Wed, 9 Jan 2019 20:38:51 -0500 (EST)
> Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:
>
>> Hi Paul,
>>
>> I've had a user report that trace_sched_waking() appears to be
>> invoked while !rcu_is_watching() in some situation, so I started
>> digging into the scheduler idle code.
>
> I'm wondering if this isn't a bug. Do you have the backtrace for where
> trace_sched_waking() was called without rcu watching?

I strongly suspect a bug as well. I'm awaiting a reproducer from the
user whom reported this issue so I can add a WARN_ON_ONCE(!rcu_is_watching())
in the scheduler code near trace_sched_waking() and gather a backtrace.

It still has to be confirmed, but I suspect this have been triggered
within a HyperV guest. It may therefore be related to a virtualized environment.

I'll try to ask more specifically on which environment this was encountered.

Thanks,

Mathieu

>
> -- Steve
>
>>
>> It appears that interrupts are re-enabled before rcu_eqs_exit() is
>> invoked when exiting idle code from the scheduler.
>>
>> I wonder what happens if an interrupt handler (including scheduler code)
>> happens to issue a RCU read-side critical section before rcu_eqs_exit()
>> is called ? Is there some code on interrupt entry that ensures rcu eqs
>> state is exited in such scenario ?
>>
>> Thanks,
>>
>> Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

\
 
 \ /
  Last update: 2019-01-10 17:45    [W:0.393 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site