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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131217232100.GC19211@linux.vnet.ibm.com>
Date:	Tue, 17 Dec 2013 15:21:00 -0800
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	John Stultz <john.stultz@...aro.org>,
	Alex Shi <alex.shi@...aro.org>,
	Kevin Hilman <khilman@...aro.org>
Subject: Re: [PATCH 05/13] rcu: Fix unraised IPI to timekeeping CPU

On Tue, Dec 17, 2013 at 11:51:24PM +0100, Frederic Weisbecker wrote:
> The plan with full system idle detection is to allow the timekeeper
> to sleep when all full dynticks CPUs are sleeping.
> 
> Then when a full dynticks CPU wakes up while the whole system is idle,
> it sends an IPI to the timekeeping CPU which then restarts its tick
> and polls on its timekeeping duty on behalf of all other CPUs in the
> system.
> 
> But we are using rcu_kick_nohz_cpu() to raise this IPI, which is wrong
> because this function is used to kick full dynticks CPUs when they run
> in the kernel for too long without reporting a quiescent state. And
> this function ignores targets that are not full dynticks, like our
> timekeeper.
> 
> To fix this, use the smp_send_reschedule() function directly.

I guess the fact that you needed some change is reassuring.  You know
the old saying, "no bugs, no users".  ;-)

> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> Cc: John Stultz <john.stultz@...aro.org>
> Cc: Alex Shi <alex.shi@...aro.org>
> Cc: Kevin Hilman <khilman@...aro.org>
> ---
>  kernel/rcu/tree_plugin.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index 08004da..84d90c8 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -2488,7 +2488,7 @@ void rcu_sysidle_force_exit(void)
>  				      oldstate, RCU_SYSIDLE_NOT);
>  		if (oldstate == newoldstate &&
>  		    oldstate == RCU_SYSIDLE_FULL_NOTED) {
> -			rcu_kick_nohz_cpu(tick_do_timer_cpu);
> +			smp_send_reschedule(tick_do_timer_cpu);

Hmmm...

We haven't done any sort of wakeup, and tick_nohz_full_cpu() should
return false for tick_do_timer_cpu, and I don't see that we have
done anything to make got_nohz_idle_kick() return true.

So the idea is that the fact of the interrupt is sufficient, and
the target CPU will figure out that it must turn its scheduling-clock
interrupt when returning from interrupt?

Or is something else going on here?

							Thanx, Paul

>  			return; /* We cleared it, done! */
>  		}
>  		oldstate = newoldstate;
> -- 
> 1.8.3.1
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ