lkml.org 
[lkml]   [2018]   [Jul]   [19]   [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
From
Date
On Thu, 2018-07-19 at 08:45 +0200, Christian Borntraeger wrote:
>
> > My thought would be something like this:
> > 
> >       if (context_tracking_cpu_is_enabled())
> >               rcu_kvm_enter();
> >       else
> >               rcu_virt_note_context_switch(smp_processor_id());
>
> In the past we needed that (when we introduced that). At least with every
> host interrupt we called this making an rcu event at least every HZ.
> Will the changes in need_resched make this part unnecessary?

Yes, the change in need_resched() should make this part unnecessary.
Unless your architecture's version of the vcpu_run() loop just loops
forever even when TIF_NEED_RESCHED is set? :)

I'm not sure about the context tracking condition in the code snippet
cited above, though. I think that's what caused my problem in the first
place — I have CONTEXT_TRACKING_FORCE && !NO_HZ_FULL. So in 4.15, that
means rcu_user_enter() did nothing and rcu_virt_note_context_switch()
wasn't called. Hence the observed stalls.

Should rcu_user_enter() itself be conditional on CONTEXT_TRACKING not
NO_HZ_FULL? [unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2018-07-19 09:37    [W:0.806 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site