diff options
author | Dipankar Sarma <dipankar@in.ibm.com> | 2006-03-08 00:55:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-08 17:14:01 -0500 |
commit | 21a1ea9eb40411d4ee29448c53b9e4c0654d6ceb (patch) | |
tree | 86e4b681858ac562c953bd3ea3c038defd8ec4f4 /include | |
parent | e2bab3d92486fb781f4d06f56339264ed1492392 (diff) |
[PATCH] rcu batch tuning
This patch adds new tunables for RCU queue and finished batches. There are
two types of controls - number of completed RCU updates invoked in a batch
(blimit) and monitoring for high rate of incoming RCUs on a cpu (qhimark,
qlowmark).
By default, the per-cpu batch limit is set to a small value. If the input
RCU rate exceeds the high watermark, we do two things - force quiescent
state on all cpus and set the batch limit of the CPU to INTMAX. Setting
batch limit to INTMAX forces all finished RCUs to be processed in one shot.
If we have more than INTMAX RCUs queued up, then we have bigger problems
anyway. Once the incoming queued RCUs fall below the low watermark, the
batch limit is set to the default.
Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
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.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index b87aefa082e2..c2ec6c77874e 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -98,13 +98,17 @@ struct rcu_data { | |||
98 | long batch; /* Batch # for current RCU batch */ | 98 | long batch; /* Batch # for current RCU batch */ |
99 | struct rcu_head *nxtlist; | 99 | struct rcu_head *nxtlist; |
100 | struct rcu_head **nxttail; | 100 | struct rcu_head **nxttail; |
101 | long count; /* # of queued items */ | 101 | long qlen; /* # of queued callbacks */ |
102 | struct rcu_head *curlist; | 102 | struct rcu_head *curlist; |
103 | struct rcu_head **curtail; | 103 | struct rcu_head **curtail; |
104 | struct rcu_head *donelist; | 104 | struct rcu_head *donelist; |
105 | struct rcu_head **donetail; | 105 | struct rcu_head **donetail; |
106 | long blimit; /* Upper limit on a processed batch */ | ||
106 | int cpu; | 107 | int cpu; |
107 | struct rcu_head barrier; | 108 | struct rcu_head barrier; |
109 | #ifdef CONFIG_SMP | ||
110 | long last_rs_qlen; /* qlen during the last resched */ | ||
111 | #endif | ||
108 | }; | 112 | }; |
109 | 113 | ||
110 | DECLARE_PER_CPU(struct rcu_data, rcu_data); | 114 | DECLARE_PER_CPU(struct rcu_data, rcu_data); |