aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDipankar Sarma <dipankar@in.ibm.com>2004-08-22 22:57:42 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 22:57:42 -0700
commitdaf86b08a178f950c0e0ec073c25cc392dbbc789 (patch)
tree8b76bd66d2b2c426d42282633c6525716ea9bad6 /include
parentf0f4d6e41008746f51db2c795469e1707e516672 (diff)
downloadhistory-daf86b08a178f950c0e0ec073c25cc392dbbc789.tar.gz
[PATCH] RCU: low latency rcu
This patch makes RCU callbacks friendly to scheduler. It helps low latency by limiting the number of callbacks invoked per tasklet handler. Since we cannot schedule during a single softirq handler, this reduces size of non-preemptible section significantly, specially under heavy RCU updates. The limiting is done through a kernel parameter rcupdate.maxbatch which is the maximum number of RCU callbacks to invoke during a single tasklet handler. Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/rcupdate.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 226ce765c031ae..b689ab6108bdb9 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -99,6 +99,8 @@ struct rcu_data {
struct rcu_head **nxttail;
struct rcu_head *curlist;
struct rcu_head **curtail;
+ struct rcu_head *donelist;
+ struct rcu_head **donetail;
};
DECLARE_PER_CPU(struct rcu_data, rcu_data);
@@ -113,6 +115,8 @@ extern struct rcu_ctrlblk rcu_ctrlblk;
#define RCU_curlist(cpu) (per_cpu(rcu_data, (cpu)).curlist)
#define RCU_nxttail(cpu) (per_cpu(rcu_data, (cpu)).nxttail)
#define RCU_curtail(cpu) (per_cpu(rcu_data, (cpu)).curtail)
+#define RCU_donelist(cpu) (per_cpu(rcu_data, (cpu)).donelist)
+#define RCU_donetail(cpu) (per_cpu(rcu_data, (cpu)).donetail)
static inline int rcu_pending(int cpu)
{
@@ -127,6 +131,9 @@ static inline int rcu_pending(int cpu)
if (!RCU_curlist(cpu) && RCU_nxtlist(cpu))
return 1;
+ if (RCU_donelist(cpu))
+ return 1;
+
/* The rcu core waits for a quiescent state from the cpu */
if (RCU_quiescbatch(cpu) != rcu_ctrlblk.cur || RCU_qs_pending(cpu))
return 1;