Go to file
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
arch This push fixes a random config build failure on powerpc. 2023-09-01 15:39:25 -07:00
block
certs
crypto
Documentation Tracing updates for 6.6: 2023-09-01 16:34:25 -07:00
drivers
fs tracefs/eventfs: Use dput to free the toplevel events directory 2023-09-07 16:04:47 -04:00
include tracing: Replace strlcpy with strscpy in trace/events/task.h 2023-09-01 21:00:00 -04:00
init workqueue: Changes for v6.6 2023-09-01 16:06:32 -07:00
io_uring
ipc
kernel ring-buffer: Avoid softlockup in ring_buffer_resize() 2023-09-07 16:38:54 -04:00
lib percpu: changes for v6.6 2023-09-01 15:44:45 -07:00
LICENSES
mm percpu: changes for v6.6 2023-09-01 15:44:45 -07:00
net
rust
samples
scripts
security
sound
tools Tracing updates for 6.6: 2023-09-01 16:34:25 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS cgroup: Changes for v6.6 2023-09-01 15:58:21 -07:00
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.