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


Groups > linux.kernel > #1517788

[PATCH 2/2] rcu: Force resched_cpu when jiffies >= rcu_state.jiffies_resched

From Byungchul Park <byungchul.park@lge.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] rcu: Force resched_cpu when jiffies >= rcu_state.jiffies_resched
Date 2016-11-09 07:40 +0100
Message-ID <sBuI9-3HT-1@gated-at.bofh.it> (permalink)
References <sBuI9-3HT-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@lge.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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 2/2] rcu: Force resched_cpu when jiffies >= rcu_state.jiffies_resched Byungchul Park <byungchul.park@lge.com> - 2016-11-09 07:40 +0100

csiph-web