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]
Message-Id: <1478673135-25509-2-git-send-email-byungchul.park@lge.com>
Date:   Wed,  9 Nov 2016 15:32:15 +0900
From:   Byungchul Park <byungchul.park@....com>
To:     paulmck@...ux.vnet.ibm.com, josh@...htriplett.org,
        rostedt@...dmis.org, mathieu.desnoyers@...icios.com,
        jiangshanlai@...il.com
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] rcu: Force resched_cpu when jiffies >= rcu_state.jiffies_resched

Currently rcu code forces CPU into scheduler when jiffies >=
rcu_state.gp_start + jiffies_till_sched_qs, via resched_cpu().

It would be better to force CPU into scheduler when jiffies >=
rcu_state.jiffies_resched, too.

Signed-off-by: Byungchul Park <byungchul.park@....com>
---
 kernel/rcu/tree.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index d8e8859..287f468 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1217,11 +1217,10 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
 				   READ_ONCE(*rcrmp) + rdp->rsp->flavor_mask);
 		}
 		rdp->rsp->jiffies_resched += 5; /* Re-enable beating. */
-	}
 
-	/* And if it has been a really long time, kick the CPU as well. */
-	if (ULONG_CMP_GE(jiffies, rdp->rsp->gp_start + jiffies_till_sched_qs))
+		/* And if it has been a really long time, kick the CPU as well. */
 		resched_cpu(rdp->cpu);  /* Force CPU into scheduler. */
+	}
 
 	return 0;
 }
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ