Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1517789 > unrolled thread

[PATCH 1/2] rcu: Remove unnecessary condition in rcu_implicit_dynticks_qs

Started byByungchul Park <byungchul.park@lge.com>
First post2016-11-09 07:40 +0100
Last post2016-11-09 07:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] rcu: Remove unnecessary condition in rcu_implicit_dynticks_qs Byungchul Park <byungchul.park@lge.com> - 2016-11-09 07:40 +0100

#1517789 — [PATCH 1/2] rcu: Remove unnecessary condition in rcu_implicit_dynticks_qs

FromByungchul Park <byungchul.park@lge.com>
Date2016-11-09 07:40 +0100
Subject[PATCH 1/2] rcu: Remove unnecessary condition in rcu_implicit_dynticks_qs
Message-ID<sBuI9-3HT-3@gated-at.bofh.it>
Given two conditions like,

COND 1. jiffies >= rdp->rsp->gp_start + 2 * jiffies_till_sched_qs
COND 2. jiffies >= rdp->rsp->gp_start + jiffies_till_sched_qs

A set of jiffies satisfying COND 2 includes another set satisfying
COND 1. Thus COND 1 can be removed from a condition, (COND 1 || COND 2).

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

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 5d80925..d8e8859 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -1220,9 +1220,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp,
 	}
 
 	/* And if it has been a really long time, kick the CPU as well. */
-	if (ULONG_CMP_GE(jiffies,
-			 rdp->rsp->gp_start + 2 * jiffies_till_sched_qs) ||
-	    ULONG_CMP_GE(jiffies, rdp->rsp->gp_start + jiffies_till_sched_qs))
+	if (ULONG_CMP_GE(jiffies, rdp->rsp->gp_start + jiffies_till_sched_qs))
 		resched_cpu(rdp->cpu);  /* Force CPU into scheduler. */
 
 	return 0;
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web