[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180709143004.GP3593@linux.vnet.ibm.com>
Date: Mon, 9 Jul 2018 07:30:04 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: David Woodhouse <dwmw2@...radead.org>
Cc: Peter Zijlstra <peterz@...radead.org>, mhillenb@...zon.de,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] Make need_resched() return true when rcu_urgent_qs
requested
On Mon, Jul 09, 2018 at 01:47:14PM +0100, David Woodhouse wrote:
> 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.
Yes, ten seconds. Please accept my apologies for my early morning
confusion.
Thanx, Paul
> > 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.
Powered by blists - more mailing lists