Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ring-buffer: Allow for rescheduling when removing pages
commit 83f3655 upstream. When reducing ring buffer size, pages are removed by scheduling a work item on each CPU for the corresponding CPU ring buffer. After the pages are removed from ring buffer linked list, the pages are free()d in a tight loop. The loop does not give up CPU until all pages are removed. In a worst case behavior, when lot of pages are to be freed, it can cause system stall. After the pages are removed from the list, the free() can happen while the work is rescheduled. Call cond_resched() in the loop to prevent the system hangup. Link: http://lkml.kernel.org/r/[email protected] Cc: [email protected] Fixes: 83f4031 ("ring-buffer: Make removal of ring buffer pages atomic") Reported-by: Jason Behmer <[email protected]> Signed-off-by: Vaibhav Nagarnaik <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information