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:   Fri, 16 Aug 2019 10:04:57 -0700
From:   "Paul E. McKenney" <paulmck@...ux.ibm.com>
To:     "Joel Fernandes (Google)" <joel@...lfernandes.org>
Cc:     linux-kernel@...r.kernel.org, rcu@...r.kernel.org,
        frederic@...nel.org
Subject: Re: [PATCH v2 -rcu dev 2/3] rcu/tree: Fix issue where sometimes
 rcu_urgent_qs is not set on IPI

On Thu, Aug 15, 2019 at 10:59:14PM -0400, Joel Fernandes (Google) wrote:
> Sometimes I see rcu_urgent_qs is not set. This could be when the last
> IPI was a long time ago, however, the grace period just started. Set
> rcu_urgent_qs so the tick can indeed not be stopped.
> 
> Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>

Great catch, queued, thank you!  I updated the commit log as shown below,
so could you please check to see if I messed anything up?

							Thanx, Paul

------------------------------------------------------------------------

commit 1f80df1e49b29ccd605882056a0565778e100e9e
Author: Joel Fernandes (Google) <joel@...lfernandes.org>
Date:   Thu Aug 15 22:59:14 2019 -0400

    rcu/tree: Ensure that ->rcu_urgent_qs is set before resched IPI
    
    The RCU-specific resched_cpu() function sends a resched IPI to the
    specified CPU, which can be used to force the tick on for a given
    nohz_full CPU.  This is needed when this nohz_full CPU is looping in the
    kernel while blocking the current grace period.  However, for the tick
    to actually be forced on in all cases, that CPU's rcu_data structure's
    ->rcu_urgent_qs flag must be set beforehand.  This commit therefore
    causes rcu_implicit_dynticks_qs() to set this flag prior to invoking
    resched_cpu() on a holdout nohz_full CPU.
    
    Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>
    Signed-off-by: Paul E. McKenney <paulmck@...ux.ibm.com>

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 0512de9ead20..dd0a77bffa7d 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1091,6 +1091,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
 	if (tick_nohz_full_cpu(rdp->cpu) &&
 		   time_after(jiffies,
 			      READ_ONCE(rdp->last_fqs_resched) + jtsq * 3)) {
+		WRITE_ONCE(*ruqp, true);
 		resched_cpu(rdp->cpu);
 		WRITE_ONCE(rdp->last_fqs_resched, jiffies);
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ