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

From: Steven Rostedt
Date: Wed Dec 05 2018 - 11:33:48 EST


On Wed, 5 Dec 2018 11:43:12 +0100
Anders Roxell <anders.roxell@xxxxxxxxxx> wrote:

> > > + schedulable = !irqs_disabled() && !preempt_count();
> >
> > Is there a reason not to use preemptible() here?
>
> As I understand it preemptible() is defined to 0 if
> CONFIG_PREEMPT_COUNT is disabled.
> Thats no good right ?

No it's not, which means this isn't a good approach. I have a much
better idea on how to solve this. I'll post a small patch set in a bit.

-- Steve