Skip to content

Commit

Permalink
Merge tag 'trace-v4.19-rc4' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/rostedt/linux-trace

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."
  • Loading branch information
Greg Kroah-Hartman committed Sep 19, 2018
2 parents eba2d6b + 83f3655 commit f21f7fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit f21f7fa

Please sign in to comment.