lkml.org 
[lkml]   [2018]   [Jul]   [11]   [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 15:08 -0700, Paul E. McKenney wrote:
> index f9c0ca2ccf0c..3350ece366ab 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2839,6 +2839,15 @@ void rcu_check_callbacks(int user)
>                 rcu_bh_qs();
>         }
>         rcu_preempt_check_callbacks();
> +       /* The load-acquire pairs with the store-release setting to true. */
> +       if (smp_load_acquire(this_cpu_ptr(&rcu_dynticks.rcu_urgent_qs))) {
> +               /* Idle and userspace execution already are quiescent states. */
> +               if (rcu_is_cpu_rrupt_from_idle() && !user) {

if (idle && !user) seems tautological and... illogical.

If I make it 'if (!rcu_is_cpu_rrput_from_idle() && !user)' it seems to
work better. Ripping out my debugging printks now to check that's still
true...


(Also, isn't userspace execution only a quiescent state if NO_HZ_FULL?)

> +                       set_tsk_need_resched(current);
> +                       set_preempt_need_resched();
> +               }
> +               __this_cpu_write(rcu_dynticks.rcu_urgent_qs, false);
> +       }[unhandled content-type:application/x-pkcs7-signature]
\
 
 \ /
  Last update: 2018-07-11 16:24    [W:0.095 / U:9.800 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site