lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ