Files
linux/kernel
Zheng Yejian 6787d6561d ring-buffer: Avoid softlockup in ring_buffer_resize()
[ Upstream commit f6bd2c9248 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-24 08:54:40 +09:00
..
2023-11-23 16:21:38 +09:00
2023-11-17 08:42:20 +09:00
2019-12-13 08:51:11 +01:00
2020-04-29 19:16:15 +02:00
2021-09-25 14:26:55 +02:00
2020-01-15 14:51:23 +00:00
2020-03-25 08:06:13 +01:00
2019-08-12 13:36:37 -04:00
2021-02-07 14:48:38 +01:00
2020-01-09 10:18:59 +01:00
2019-03-06 15:59:21 +00:00