On Sat, Aug 08, 2020 at 04:19:42PM -0500, William Tambe wrote: > On Sat, Aug 8, 2020 at 4:17 PM William Tambe <tambewilliam@xxxxxxxxx> wrote: > > > > On Sat, Aug 8, 2020 at 1:21 PM William Tambe <tambewilliam@xxxxxxxxx> wrote: > > > > > > I am having an issue in my kernel where delayed_put_task_struct() used > > > through call_rcu() by put_task_struct_rcu_user() never gets called. > > > > I am able to trace this issue to invoke_rcu_core() not getting called > > in __call_rcu_core() due to rcu_is_watching() always returning true. That in fact should be the common case. Normally, you would be invoking call_rcu() and thus __call_rcu_core() from a context that RCU is watching. But what happens after that in __call_rcu_core()? > > Any idea why I am seeing such an issue ? One way would be if every single one of your call_rcu() invocations was done with irqs disabled. And if the scheduling-clock interrupt was turned off. And if the CPU in question never received any other interrupts. As in all of those things have to be in effect in order to indefinitely postpone the call to delayed_put_task_struct(). In this case, v5.8's __call_rcu_core() would always exit via this path: if (irqs_disabled_flags(flags) || cpu_is_offline(smp_processor_id())) return; > Also, the issue is not happening when using highres=off . Might highres=off be forcing the scheduling-clock interrupt to be enabled? > > > Any idea ? If you are running oldish kernels and the CPU in question is a nohz_full CPU, the scheduling-clock interrupt would be turned off. (In more recent kernel versions, RCU will force it back on if things are not progressing.) To say more, I would need your exact kernel version (including any patches and any other out-of-tree source code) and your .config file. Thanx, Paul