[RHEL7,COMMIT] trace: fix debug prints for busyloop tracking in tracing_read_pipe

Submitted by Konstantin Khorenko on Nov. 8, 2018, 2:31 p.m.

Details

Message ID 201811081431.wA8EVlkr003894@finist-ce7.sw.ru
State New
Series "trace: fix debug prints for busyloop tracking in tracing_read_pipe"
Headers show

Commit Message

Konstantin Khorenko Nov. 8, 2018, 2:31 p.m.
The commit is pushed to "branch-rh7-3.10.0-862.20.2.vz7.73.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.20.2.vz7.73.2
------>
commit 004729cf62dce9986aa96c6f5fbfbdf569b06735
Author: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Date:   Thu Nov 8 17:31:47 2018 +0300

    trace: fix debug prints for busyloop tracking in tracing_read_pipe
    
    Make it realy shut only after 10000 cycles.
    
    https://jira.sw.ru/browse/PSBM-53928
    Fixes: 15acdd708a48 ("trace: add debug prints to nail down busyloop in
    tracing_read_pipe")
    
    Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 3bb31030a51c..cce5ef576489 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4400,7 +4400,7 @@  tracing_read_pipe(struct file *filp, char __user *ubuf,
 	 * entries, go back to wait for more entries.
 	 */
 	if (sret == -EBUSY) {
-		if ((loops % 10000) == 0) {
+		if ((++loops % 10000) == 0) {
 			WARN_ON(1);
 			printk("%ldk loops in tracing_read_pipe\n", loops / 1000);
 			printk("trace_empty(iter): %d\n", trace_empty(iter));