Re: [PATCH] tracing: add cond_resched to ftrace_replace_code()

From: Steven Rostedt
Date: Tue Dec 04 2018 - 14:21:47 EST


On Tue, 4 Dec 2018 14:19:08 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> > @@ -2435,6 +2438,13 @@ void __weak ftrace_replace_code(int enable)
> > /* Stop processing */
> > return;
> > }
> > + /*
> > + * Some archs calls this function with interrupts or preemption
> > + * disabled. Howeve, other archs don't and this can cause a

typo "However". But could you write it this way:

"However, for other archs that can preempt, this can cause an
tremendous unneeded latency."

Thanks!

-- Steve

> > + * tremendous unneeded latency.
> > + */
>
> Actually, could you move the comment up where schedulable gets set?
>
> Thanks!
>
> -- Steve
>
> > + if (schedulable)
> > + cond_resched();
> > } while_for_each_ftrace_rec();
> > }
> >
>