Re: [RFC] Make need_resched() return true when rcu_urgent_qs requested

David Woodhouse
2018-07-09T10:56:55Z

[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]

On Mon, 2018-07-09 at 12:44 +0200, Peter Zijlstra wrote:
> On Mon, Jul 09, 2018 at 10:18:55AM +0100, David Woodhouse wrote:
> >
> > >
> > > Which seems like an entirely reasonable amount of time to kick a task.
> > > Not scheduling for a second is like an eternity.
> >
> > If that is our only "fix" for KVM, then wouldn't that mean that things
> > like expand_fdtable() would be *expected* to take "an eternity" when
> > another CPU happens to be in the guest? Because vcpu_run() would still
> > loop until the task gets kicked after a second?
>
> But either proposal is exactly the same in this respect. The whole
> rcu_urgent_qs thing won't be set any earlier either.

Er.... Marius, our latencies in expand_fdtable() definitely went from
~10s to well below one second when we just added the rcu_all_qs() into
the loop, didn't they? And that does nothing if !rcu_urgent_qs.

Doesn't rcu_implicit_dynticks_qs() set it after jiffies_till_sched_qs
(default HZ/10) has expired?

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5213 bytes --]