[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1531162254.26547.3.camel@infradead.org>
Date: Mon, 09 Jul 2018 19:50:54 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: paulmck@...ux.vnet.ibm.com, Peter Zijlstra <peterz@...radead.org>
Cc: 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, 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();
>
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (5213 bytes)
Powered by blists - more mailing lists