Messages in this thread | | | Date | Mon, 19 Apr 2021 10:08:29 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH v2 resubmit] sched: Warn on long periods of pending need_resched |
| |
On Fri, Apr 16, 2021 at 02:29:36PM -0700, Josh Don wrote: > From: Paul Turner <pjt@google.com> > > CPU scheduler marks need_resched flag to signal a schedule() on a > particular CPU. But, schedule() may not happen immediately in cases > where the current task is executing in the kernel mode (no > preemption state) for extended periods of time. > > This patch adds a warn_on if need_resched is pending for more than the > time specified in sysctl resched_latency_warn_ms. If it goes off, it is > likely that there is a missing cond_resched() somewhere. Monitoring is > done via the tick and the accuracy is hence limited to jiffy scale. This > also means that we won't trigger the warning if the tick is disabled. > > This feature (LATENCY_WARN) is default disabled. > > Signed-off-by: Paul Turner <pjt@google.com> > Signed-off-by: Josh Don <joshdon@google.com> > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> > Link: https://lkml.kernel.org/r/20210323035706.572953-1-joshdon@google.com
Thanks!
| |