diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-28 15:56:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-28 15:56:32 -0400 |
commit | 1ba4b8cb94e59b17fd0142a509eb583695c36db6 (patch) | |
tree | e42d1967025670401758d32964a5fa048f59f10a /Documentation | |
parent | c4a227d89f758e582fd167bb15245f2704de99ef (diff) | |
parent | cc3ce5176d83cd8ae1134f86e208ea758d6cb78e (diff) |
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
rcu: Start RCU kthreads in TASK_INTERRUPTIBLE state
rcu: Remove waitqueue usage for cpu, node, and boost kthreads
rcu: Avoid acquiring rcu_node locks in timer functions
atomic: Add atomic_or()
Documentation: Add statistics about nested locks
rcu: Decrease memory-barrier usage based on semi-formal proof
rcu: Make rcu_enter_nohz() pay attention to nesting
rcu: Don't do reschedule unless in irq
rcu: Remove old memory barriers from rcu_process_callbacks()
rcu: Add memory barriers
rcu: Fix unpaired rcu_irq_enter() from locking selftests
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/RCU/trace.txt | 17 | ||||
-rw-r--r-- | Documentation/lockstat.txt | 36 |
2 files changed, 39 insertions, 14 deletions
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt index c078ad48f7a1..8173cec473aa 100644 --- a/Documentation/RCU/trace.txt +++ b/Documentation/RCU/trace.txt | |||
@@ -99,18 +99,11 @@ o "qp" indicates that RCU still expects a quiescent state from | |||
99 | 99 | ||
100 | o "dt" is the current value of the dyntick counter that is incremented | 100 | o "dt" is the current value of the dyntick counter that is incremented |
101 | when entering or leaving dynticks idle state, either by the | 101 | when entering or leaving dynticks idle state, either by the |
102 | scheduler or by irq. The number after the "/" is the interrupt | 102 | scheduler or by irq. This number is even if the CPU is in |
103 | nesting depth when in dyntick-idle state, or one greater than | 103 | dyntick idle mode and odd otherwise. The number after the first |
104 | the interrupt-nesting depth otherwise. | 104 | "/" is the interrupt nesting depth when in dyntick-idle state, |
105 | 105 | or one greater than the interrupt-nesting depth otherwise. | |
106 | This field is displayed only for CONFIG_NO_HZ kernels. | 106 | The number after the second "/" is the NMI nesting depth. |
107 | |||
108 | o "dn" is the current value of the dyntick counter that is incremented | ||
109 | when entering or leaving dynticks idle state via NMI. If both | ||
110 | the "dt" and "dn" values are even, then this CPU is in dynticks | ||
111 | idle mode and may be ignored by RCU. If either of these two | ||
112 | counters is odd, then RCU must be alert to the possibility of | ||
113 | an RCU read-side critical section running on this CPU. | ||
114 | 107 | ||
115 | This field is displayed only for CONFIG_NO_HZ kernels. | 108 | This field is displayed only for CONFIG_NO_HZ kernels. |
116 | 109 | ||
diff --git a/Documentation/lockstat.txt b/Documentation/lockstat.txt index 9c0a80d17a23..cef00d42ed5b 100644 --- a/Documentation/lockstat.txt +++ b/Documentation/lockstat.txt | |||
@@ -12,8 +12,9 @@ Because things like lock contention can severely impact performance. | |||
12 | - HOW | 12 | - HOW |
13 | 13 | ||
14 | Lockdep already has hooks in the lock functions and maps lock instances to | 14 | Lockdep already has hooks in the lock functions and maps lock instances to |
15 | lock classes. We build on that. The graph below shows the relation between | 15 | lock classes. We build on that (see Documentation/lockdep-design.txt). |
16 | the lock functions and the various hooks therein. | 16 | The graph below shows the relation between the lock functions and the various |
17 | hooks therein. | ||
17 | 18 | ||
18 | __acquire | 19 | __acquire |
19 | | | 20 | | |
@@ -128,6 +129,37 @@ points are the points we're contending with. | |||
128 | 129 | ||
129 | The integer part of the time values is in us. | 130 | The integer part of the time values is in us. |
130 | 131 | ||
132 | Dealing with nested locks, subclasses may appear: | ||
133 | |||
134 | 32............................................................................................................................................................................................... | ||
135 | 33 | ||
136 | 34 &rq->lock: 13128 13128 0.43 190.53 103881.26 97454 3453404 0.00 401.11 13224683.11 | ||
137 | 35 --------- | ||
138 | 36 &rq->lock 645 [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75 | ||
139 | 37 &rq->lock 297 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a | ||
140 | 38 &rq->lock 360 [<ffffffff8103c4c5>] select_task_rq_fair+0x1f0/0x74a | ||
141 | 39 &rq->lock 428 [<ffffffff81045f98>] scheduler_tick+0x46/0x1fb | ||
142 | 40 --------- | ||
143 | 41 &rq->lock 77 [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75 | ||
144 | 42 &rq->lock 174 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a | ||
145 | 43 &rq->lock 4715 [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54 | ||
146 | 44 &rq->lock 893 [<ffffffff81340524>] schedule+0x157/0x7b8 | ||
147 | 45 | ||
148 | 46............................................................................................................................................................................................... | ||
149 | 47 | ||
150 | 48 &rq->lock/1: 11526 11488 0.33 388.73 136294.31 21461 38404 0.00 37.93 109388.53 | ||
151 | 49 ----------- | ||
152 | 50 &rq->lock/1 11526 [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54 | ||
153 | 51 ----------- | ||
154 | 52 &rq->lock/1 5645 [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54 | ||
155 | 53 &rq->lock/1 1224 [<ffffffff81340524>] schedule+0x157/0x7b8 | ||
156 | 54 &rq->lock/1 4336 [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54 | ||
157 | 55 &rq->lock/1 181 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a | ||
158 | |||
159 | Line 48 shows statistics for the second subclass (/1) of &rq->lock class | ||
160 | (subclass starts from 0), since in this case, as line 50 suggests, | ||
161 | double_rq_lock actually acquires a nested lock of two spinlocks. | ||
162 | |||
131 | View the top contending locks: | 163 | View the top contending locks: |
132 | 164 | ||
133 | # grep : /proc/lock_stat | head | 165 | # grep : /proc/lock_stat | head |