lkml.org 
[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
From
Date


On Mon, 2018-07-09 at 09:34 -0700, Paul E. McKenney wrote:
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 51919985f6cf..33b0a1ec0536 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2496,6 +2496,10 @@ void rcu_check_callbacks(int user)
>  {
>   trace_rcu_utilization(TPS("Start scheduler-tick"));
>   raw_cpu_inc(rcu_data.ticks_this_gp);
> + if (smp_load_acquire(this_cpu_ptr(&rcu_dynticks.rcu_urgent_qs)) &&
> +    !is_idle_task(current))
> + set_tsk_need_resched(current);

OK, so this will make KVM (and various other code) see that
need_resched() is true, and they'll call cond_resched() or something
else that might not actually schedule another task, but will at least
end up in rcu_all_qs()...

> + __this_cpu_write(rcu_dynticks.rcu_urgent_qs, false);

... which bails out immediately and does nothing, because that's set to
false?

Am I missing something?

>   rcu_flavor_check_callbacks(user);
>   if (rcu_pending())
>   invoke_rcu_core();
> [unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2018-07-09 20:51    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog