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

Konstantin Khorenko khorenko at virtuozzo.com
Thu Nov 8 17:31:49 MSK 2018


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 at 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 at virtuozzo.com>
---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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));



More information about the Devel mailing list