diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-10 16:10:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-10 16:10:51 -0400 |
commit | b922df7383749a1c0b7ea64c50fa839263d3816b (patch) | |
tree | dd72306ac173753649eb049d6d2734f4e2b95ff6 /include/linux/rcuclassic.h | |
parent | c54dcd8ec9f05c8951d1e622e90904aef95379f9 (diff) | |
parent | cdbb92b31d3c465aa96bd09f2d42c39b87b32bee (diff) |
Merge branch 'rcu-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'rcu-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (21 commits)
rcu: RCU-based detection of stalled CPUs for Classic RCU, fix
rcu: RCU-based detection of stalled CPUs for Classic RCU
rcu: add rcu_read_lock_sched() / rcu_read_unlock_sched()
rcu: fix sparse shadowed variable warning
doc/RCU: fix pseudocode in rcuref.txt
rcuclassic: fix compiler warning
rcu: use irq-safe locks
rcuclassic: fix compilation NG
rcu: fix locking cleanup fallout
rcu: remove redundant ACCESS_ONCE definition from rcupreempt.c
rcu: fix classic RCU locking cleanup lockdep problem
rcu: trace fix possible mem-leak
rcu: just rename call_rcu_bh instead of making it a macro
rcu: remove list_for_each_rcu()
rcu: fixes to include/linux/rcupreempt.h
rcu: classic RCU locking and memory-barrier cleanups
rcu: prevent console flood when one CPU sees another AWOL via RCU
rcu, debug: detect stalled grace periods, cleanups
rcu, debug: detect stalled grace periods
rcu classic: new algorithm for callbacks-processing(v2)
...
Diffstat (limited to 'include/linux/rcuclassic.h')
-rw-r--r-- | include/linux/rcuclassic.h | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/include/linux/rcuclassic.h b/include/linux/rcuclassic.h index 4ab843622727..5f89b62e6983 100644 --- a/include/linux/rcuclassic.h +++ b/include/linux/rcuclassic.h | |||
@@ -40,12 +40,21 @@ | |||
40 | #include <linux/cpumask.h> | 40 | #include <linux/cpumask.h> |
41 | #include <linux/seqlock.h> | 41 | #include <linux/seqlock.h> |
42 | 42 | ||
43 | #ifdef CONFIG_RCU_CPU_STALL_DETECTOR | ||
44 | #define RCU_SECONDS_TILL_STALL_CHECK ( 3 * HZ) /* for rcp->jiffies_stall */ | ||
45 | #define RCU_SECONDS_TILL_STALL_RECHECK (30 * HZ) /* for rcp->jiffies_stall */ | ||
46 | #endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ | ||
43 | 47 | ||
44 | /* Global control variables for rcupdate callback mechanism. */ | 48 | /* Global control variables for rcupdate callback mechanism. */ |
45 | struct rcu_ctrlblk { | 49 | struct rcu_ctrlblk { |
46 | long cur; /* Current batch number. */ | 50 | long cur; /* Current batch number. */ |
47 | long completed; /* Number of the last completed batch */ | 51 | long completed; /* Number of the last completed batch */ |
48 | int next_pending; /* Is the next batch already waiting? */ | 52 | long pending; /* Number of the last pending batch */ |
53 | #ifdef CONFIG_RCU_CPU_STALL_DETECTOR | ||
54 | unsigned long gp_start; /* Time at which GP started in jiffies. */ | ||
55 | unsigned long jiffies_stall; | ||
56 | /* Time at which to check for CPU stalls. */ | ||
57 | #endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ | ||
49 | 58 | ||
50 | int signaled; | 59 | int signaled; |
51 | 60 | ||
@@ -66,11 +75,7 @@ static inline int rcu_batch_after(long a, long b) | |||
66 | return (a - b) > 0; | 75 | return (a - b) > 0; |
67 | } | 76 | } |
68 | 77 | ||
69 | /* | 78 | /* Per-CPU data for Read-Copy UPdate. */ |
70 | * Per-CPU data for Read-Copy UPdate. | ||
71 | * nxtlist - new callbacks are added here | ||
72 | * curlist - current batch for which quiescent cycle started if any | ||
73 | */ | ||
74 | struct rcu_data { | 79 | struct rcu_data { |
75 | /* 1) quiescent state handling : */ | 80 | /* 1) quiescent state handling : */ |
76 | long quiescbatch; /* Batch # for grace period */ | 81 | long quiescbatch; /* Batch # for grace period */ |
@@ -78,12 +83,24 @@ struct rcu_data { | |||
78 | int qs_pending; /* core waits for quiesc state */ | 83 | int qs_pending; /* core waits for quiesc state */ |
79 | 84 | ||
80 | /* 2) batch handling */ | 85 | /* 2) batch handling */ |
81 | long batch; /* Batch # for current RCU batch */ | 86 | /* |
87 | * if nxtlist is not NULL, then: | ||
88 | * batch: | ||
89 | * The batch # for the last entry of nxtlist | ||
90 | * [*nxttail[1], NULL = *nxttail[2]): | ||
91 | * Entries that batch # <= batch | ||
92 | * [*nxttail[0], *nxttail[1]): | ||
93 | * Entries that batch # <= batch - 1 | ||
94 | * [nxtlist, *nxttail[0]): | ||
95 | * Entries that batch # <= batch - 2 | ||
96 | * The grace period for these entries has completed, and | ||
97 | * the other grace-period-completed entries may be moved | ||
98 | * here temporarily in rcu_process_callbacks(). | ||
99 | */ | ||
100 | long batch; | ||
82 | struct rcu_head *nxtlist; | 101 | struct rcu_head *nxtlist; |
83 | struct rcu_head **nxttail; | 102 | struct rcu_head **nxttail[3]; |
84 | long qlen; /* # of queued callbacks */ | 103 | long qlen; /* # of queued callbacks */ |
85 | struct rcu_head *curlist; | ||
86 | struct rcu_head **curtail; | ||
87 | struct rcu_head *donelist; | 104 | struct rcu_head *donelist; |
88 | struct rcu_head **donetail; | 105 | struct rcu_head **donetail; |
89 | long blimit; /* Upper limit on a processed batch */ | 106 | long blimit; /* Upper limit on a processed batch */ |