[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b95f7a3d-429a-3564-fc9e-fa05d1d551df@igalia.com>
Date: Wed, 14 Dec 2022 12:53:04 -0300
From: "Guilherme G. Piccoli" <gpiccoli@...lia.com>
To: Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Mark Rutland <mark.rutland@....com>
Subject: Re: [for-next][PATCH 6/8] ftrace: Prevent RCU stall on
PREEMPT_VOLUNTARY kernels
On 14/12/2022 11:01, Steven Rostedt wrote:
> From: "gpiccoli@...lia.com" <gpiccoli@...lia.com>
Hi Steve, would be possible to use my full name here, like: Guilherme G.
Piccoli <gpiccoli@...lia.com> ?
Thanks,
Guilherme
>
> 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/20221115204847.593616-1-gpiccoli@igalia.com
>
> Cc: Mark Rutland <mark.rutland@....com>
> Suggested-by: Steven Rostedt <rostedt@...dmis.org>
> Acked-by: Paul E. McKenney <paulmck@...nel.org> # from RCU CPU stall warning perspective
> Signed-off-by: Guilherme G. Piccoli <gpiccoli@...lia.com>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> ---
> kernel/trace/ftrace.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index d04552c0c275..b8e374a372e5 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -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);
Powered by blists - more mailing lists