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

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Wed Nov 7 12:54:46 MSK 2018


Make it realy shut only after 10000 cycles.

https://jira.sw.ru/browse/PSBM-53928
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));
-- 
2.17.1



More information about the Devel mailing list