mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
ftrace: Prevent RCU stall on PREEMPT_VOLUNTARY kernels
The function match_records() may take a while due to a large number of string comparisons, so when in PREEMPT_VOLUNTARY kernels we could face RCU stalls due to that. Add a cond_resched() to prevent that. Link: https://lkml.kernel.org/r/[email protected] Cc: Mark Rutland <[email protected]> Suggested-by: Steven Rostedt <[email protected]> Acked-by: Paul E. McKenney <[email protected]> # from RCU CPU stall warning perspective Signed-off-by: Guilherme G. Piccoli <[email protected]> Acked-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
This commit is contained in:
1 parent
fb9f5ee9bf
commit
d0b24b4e91
1 file changed
+1
@@ -4204,6 +4204,7 @@ match_records(struct ftrace_hash *hash, char *func, int len, char *mod)
|
||||
}
|
||||
found = 1;
|
||||
}
|
||||
cond_resched();
|
||||
} while_for_each_ftrace_rec();
|
||||
out_unlock:
|
||||
mutex_unlock(&ftrace_lock);
|
||||
|
||||
Reference in new issue
Block a user