diff options
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/core.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 65ed3501c2ca..178042f66370 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3333,7 +3333,16 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void) * an infinite recursion. */ prev_ctx = exception_enter(); + /* + * The add/subtract must not be traced by the function + * tracer. But we still want to account for the + * preempt off latency tracer. Since the _notrace versions + * of add/subtract skip the accounting for latency tracer + * we must force it manually. + */ + start_critical_timings(); __schedule(true); + stop_critical_timings(); exception_exit(prev_ctx); preempt_enable_no_resched_notrace(); |