Skip to content
Snippets Groups Projects
Commit f21f7fa2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files
Steven writes:
  "Vaibhav Nagarnaik found that modifying the ring buffer size could cause
   a huge latency in the system because it does a while loop to free pages
   without releasing the CPU (on non preempt kernels). In a case where there
   are hundreds of thousands of pages to free it could actually cause a system
   stall. A properly place cond_resched() solves this issue."
parents eba2d6b3 83f36555
No related branches found
No related tags found
No related merge requests found
......@@ -1546,6 +1546,8 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned long nr_pages)
tmp_iter_page = first_page;
do {
cond_resched();
to_remove_page = tmp_iter_page;
rb_inc_page(cpu_buffer, &tmp_iter_page);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment