Files
linux/kernel
Zheng Yejian f6bd2c9248 ring-buffer: Avoid softlockup in ring_buffer_resize()
When user resize all trace ring buffer through file 'buffer_size_kb',
then in ring_buffer_resize(), kernel allocates buffer pages for each
cpu in a loop.

If the kernel preemption model is PREEMPT_NONE and there are many cpus
and there are many buffer pages to be allocated, it may not give up cpu
for a long time and finally cause a softlockup.

To avoid it, call cond_resched() after each cpu buffer allocation.

Link: https://lore.kernel.org/linux-trace-kernel/20230906081930.3939106-1-zhengyejian1@huawei.com

Cc: <mhiramat@kernel.org>
Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2023-09-07 16:38:54 -04:00
..
2023-08-21 13:46:25 -07:00
2023-08-08 10:29:21 -07:00
2022-09-26 10:13:13 -07:00
2023-07-31 17:32:44 +02:00
2023-08-18 10:18:49 -07:00
2023-03-24 11:01:29 +01:00
2023-08-18 10:12:02 -07:00
2023-08-15 15:26:17 -07:00