[lkml]   [2018]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] Make need_resched() return true when rcu_urgent_qs requested
On Mon, 2018-07-09 at 05:34 -0700, Paul E. McKenney wrote:
> The reason that David's latencies went from 100ms to one second is
> because I made this code less aggressive about invoking resched_cpu().

Ten seconds. We saw synchronize_sched() take ten seconds in 4.15. We
wouldn't have been happy with one second, but ten seconds was
considered particularly suboptimal.

> The reason I did that was to allow cond_resched_rcu_qs() to be used less
> without performance regressions.  And just plain cond_resched() on
> !PREEMPT is intended to handle the faster checks.  But KVM defeats
> this by checking need_resched() before invoking cond_resched().

It isn't just KVM. It's a relatively common construct to use
need_resched(), then drop any local locks around cond_resched().

A bare cond_resched() will call rcu_all_qs() unconditionally, and it is
kind of inconsistent that need_resched() doesn't include the
corresponding condition.[unhandled content-type:application/x-pkcs7-signature]
 \ /
  Last update: 2018-07-09 14:48    [W:0.073 / U:29.500 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site