Messages in this thread | | | Date | Wed, 3 Aug 2022 10:39:47 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH] sched/debug: avoid executing show_state and causing rcu stall warning |
| |
* Liu Song <liusong@linux.alibaba.com> wrote:
> From: Liu Song <liusong@linux.alibaba.com> > > If the number of CPUs is large, "sysrq_sched_debug_show" will execute for > a long time. Every time I execute "echo t > /proc/sysrq-trigger" on my > 128-core machine, the rcu stall warning will be triggered. Moreover, > sysrq_sched_debug_show does not need to be protected by rcu_read_lock, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > and no rcu stall warning will appear after adjustment. >
That doesn't mean it doesn't have to be protected by *any* lock - which your patch implements AFAICS.
There's a couple of lines such as:
for_each_online_cpu(cpu) {
... which need to be protected against CPU hotplug events.
I haven't checked any of the deeper code to see what RCU or other protection it may need, but clearly you didn't either ...
Thanks,
Ingo
| |