Commit a3871bd4 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull RCU updates from Ingo Molnar:
 "The main changes are:

   - Documentation updates, including fixes to the design-level
     requirements documentation and a fixed version of the design-level
     data-structure documentation.  These fixes include removing
     cartoons and getting rid of the html/htmlx duplication.

   - Further improvements to the new-age expedited grace periods.

   - Miscellaneous fixes.

   - Torture-test changes, including a new rcuperf module for measuring
     RCU grace-period performance and scalability, which is useful for
     the expedited-grace-period changes"

* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (56 commits)
  rcutorture: Add boot-time adjustment of leaf fanout
  rcutorture: Add irqs-disabled test for call_rcu()
  rcutorture: Dump trace buffer upon shutdown
  rcutorture: Don't rebuild identical kernel
  rcutorture: Add OS-jitter capability
  documentation: Add documentation for RCU's major data structures
  rcutorture: Convert test duration to seconds early
  torture: Kill qemu, not parent process
  torture: Clarify refusal to run more than one torture test
  rcutorture: Consider FROZEN hotplug notifier transitions
  rcutorture: Remove redundant initialization to zero
  rcuperf: Do not wake up shutdown wait queue if "shutdown" is false.
  rcutorture: Add largish-system rcuperf scenario
  rcutorture: Avoid RCU CPU stall warning and RT throttling
  rcutorture: Add rcuperf holdoff boot parameter to reduce interference
  rcutorture: Make scripts analyze rcuperf trace data, if present
  rcutorture: Make rcuperf collect expedited event-trace data
  rcutorture: Print measure of batching efficiency
  rcutorture: Set rcuperf writer kthreads to real-time priority
  rcutorture: Bind rcuperf reader/writer kthreads to CPUs
  ...
parents 0052af44 41ed943d
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Creator: fig2dev Version 3.2 Patchlevel 5e -->
<!-- CreationDate: Wed Dec 9 17:43:22 2015 -->
<!-- Magnification: 1.000 -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="3.1in"
height="0.9in"
viewBox="-12 -12 3699 1074"
id="svg2"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="TreeMapping.fig">
<metadata
id="metadata66">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs64">
<marker
inkscape:stockid="Arrow2Lend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Lend"
style="overflow:visible;">
<path
id="path3836"
style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(1.1) rotate(180) translate(1,0)" />
</marker>
<marker
inkscape:stockid="Arrow2Mend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Mend"
style="overflow:visible;">
<path
id="path3842"
style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(0.6) rotate(180) translate(0,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Mend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Mend"
style="overflow:visible;">
<path
id="path3824"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
transform="scale(0.4) rotate(180) translate(10,0)" />
</marker>
</defs>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="991"
inkscape:window-height="606"
id="namedview62"
showgrid="false"
inkscape:zoom="3.0752688"
inkscape:cx="139.5"
inkscape:cy="40.5"
inkscape:window-x="891"
inkscape:window-y="177"
inkscape:window-maximized="0"
inkscape:current-layer="g4" />
<g
style="stroke-width:.025in; fill:none"
id="g4">
<!-- Line: box -->
<rect
x="0"
y="0"
width="3675"
height="1050"
rx="0"
style="stroke:#000000;stroke-width:7; stroke-linejoin:miter; stroke-linecap:butt; fill:#ffff00; "
id="rect6" />
<!-- Line: box -->
<rect
x="75"
y="375"
width="375"
height="300"
rx="0"
style="stroke:#000000;stroke-width:7; stroke-linejoin:miter; stroke-linecap:butt; fill:#ffbfbf; "
id="rect8" />
<!-- Line: box -->
<rect
x="600"
y="375"
width="375"
height="300"
rx="0"
style="stroke:#000000;stroke-width:7; stroke-linejoin:miter; stroke-linecap:butt; fill:#ffbfbf; "
id="rect10" />
<!-- Line: box -->
<rect
x="1125"
y="375"
width="375"
height="300"
rx="0"
style="stroke:#000000;stroke-width:7; stroke-linejoin:miter; stroke-linecap:butt; fill:#ffbfbf; "
id="rect12" />
<!-- Line: box -->
<rect
x="1650"
y="375"
width="375"
height="300"
rx="0"
style="stroke:#000000;stroke-width:7; stroke-linejoin:miter; stroke-linecap:butt; fill:#ffbfbf; "
id="rect14" />
<!-- Line: box -->
<rect
x="2175"
y="375"
width="375"
height="300"
rx="0"
style="stroke:#000000;stroke-width:7; stroke-linejoin:miter; stroke-linecap:butt; fill:#ffbfbf; "
id="rect16" />
<!-- Line: box -->
<rect
x="3225"
y="375"
width="375"
height="300"
rx="0"
style="stroke:#000000;stroke-width:7; stroke-linejoin:miter; stroke-linecap:butt; fill:#ffbfbf; "
id="rect18" />
<!-- Line -->
<polyline
points="675,375 675,150 300,150 300,358 "
style="stroke:#000000;stroke-width:7.00088889;stroke-linejoin:miter;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow2Lend)"
id="polyline20" />
<!-- Arrowhead on XXXpoint 300 150 - 300 390-->
<!-- Line -->
<polyline
points="1200,675 1200,900 300,900 300,691 "
style="stroke:#000000;stroke-width:7.00088889;stroke-linejoin:miter;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow2Lend)"
id="polyline24" />
<!-- Arrowhead on XXXpoint 300 900 - 300 660-->
<!-- Line -->
<polyline
points="1725,375 1725,150 900,150 900,358 "
style="stroke:#000000;stroke-width:7.00088889;stroke-linejoin:miter;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow2Lend)"
id="polyline28" />
<!-- Arrowhead on XXXpoint 900 150 - 900 390-->
<!-- Line -->
<polyline
points="2250,375 2250,75 825,75 825,358 "
style="stroke:#000000;stroke-width:7.00088889;stroke-linejoin:miter;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow2Lend)"
id="polyline32" />
<!-- Arrowhead on XXXpoint 825 75 - 825 390-->
<!-- Line -->
<polyline
points="2775,675 2775,900 1425,900 1425,691 "
style="stroke:#000000;stroke-width:7.00088889;stroke-linejoin:miter;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow2Lend)"
id="polyline36" />
<!-- Arrowhead on XXXpoint 1425 900 - 1425 660-->
<!-- Line -->
<polyline
points="3300,675 3300,975 1350,975 1350,691 "
style="stroke:#000000;stroke-width:7.00088889;stroke-linejoin:miter;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow2Lend)"
id="polyline40" />
<!-- Arrowhead on XXXpoint 1350 975 - 1350 660-->
<!-- Line: box -->
<rect
x="2700"
y="375"
width="375"
height="300"
rx="0"
style="stroke:#000000;stroke-width:7; stroke-linejoin:miter; stroke-linecap:butt; fill:#ffbfbf; "
id="rect44" />
<!-- Text -->
<text
xml:space="preserve"
x="300"
y="525"
fill="#000000"
font-family="Times"
font-style="normal"
font-weight="normal"
font-size="96"
text-anchor="middle"
id="text46">0:7 </text>
<!-- Text -->
<text
xml:space="preserve"
x="1350"
y="525"
fill="#000000"
font-family="Times"
font-style="normal"
font-weight="normal"
font-size="96"
text-anchor="middle"
id="text48">4:7 </text>
<!-- Text -->
<text
xml:space="preserve"
x="1875"
y="525"
fill="#000000"
font-family="Times"
font-style="normal"
font-weight="normal"
font-size="96"
text-anchor="middle"
id="text50">0:1 </text>
<!-- Text -->
<text
xml:space="preserve"
x="2400"
y="525"
fill="#000000"
font-family="Times"
font-style="normal"
font-weight="normal"
font-size="96"
text-anchor="middle"
id="text52">2:3 </text>
<!-- Text -->
<text
xml:space="preserve"
x="2925"
y="525"
fill="#000000"
font-family="Times"
font-style="normal"
font-weight="normal"
font-size="96"
text-anchor="middle"
id="text54">4:5 </text>
<!-- Text -->
<text
xml:space="preserve"
x="3450"
y="525"
fill="#000000"
font-family="Times"
font-style="normal"
font-weight="normal"
font-size="96"
text-anchor="middle"
id="text56">6:7 </text>
<!-- Text -->
<text
xml:space="preserve"
x="825"
y="525"
fill="#000000"
font-family="Times"
font-style="normal"
font-weight="normal"
font-size="96"
text-anchor="middle"
id="text58">0:3 </text>
<!-- Text -->
<text
xml:space="preserve"
x="3600"
y="150"
fill="#000000"
font-family="Courier"
font-style="normal"
font-weight="normal"
font-size="96"
text-anchor="end"
id="text60">struct rcu_state</text>
</g>
</svg>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -237,17 +237,17 @@ o "ktl" is the low-order 16 bits (in hexadecimal) of the count of ...@@ -237,17 +237,17 @@ o "ktl" is the low-order 16 bits (in hexadecimal) of the count of
The output of "cat rcu/rcu_preempt/rcuexp" looks as follows: The output of "cat rcu/rcu_preempt/rcuexp" looks as follows:
s=21872 wd0=0 wd1=0 wd2=0 wd3=5 n=0 enq=0 sc=21872 s=21872 wd1=0 wd2=0 wd3=5 n=0 enq=0 sc=21872
These fields are as follows: These fields are as follows:
o "s" is the sequence number, with an odd number indicating that o "s" is the sequence number, with an odd number indicating that
an expedited grace period is in progress. an expedited grace period is in progress.
o "wd0", "wd1", "wd2", and "wd3" are the number of times that an o "wd1", "wd2", and "wd3" are the number of times that an attempt
attempt to start an expedited grace period found that someone to start an expedited grace period found that someone else had
else had completed an expedited grace period that satisfies the completed an expedited grace period that satisfies the attempted
attempted request. "Our work is done." request. "Our work is done."
o "n" is number of times that a concurrent CPU-hotplug operation o "n" is number of times that a concurrent CPU-hotplug operation
forced a fallback to a normal grace period. forced a fallback to a normal grace period.
......
...@@ -681,22 +681,30 @@ Although RCU can be used in many different ways, a very common use of ...@@ -681,22 +681,30 @@ Although RCU can be used in many different ways, a very common use of
RCU is analogous to reader-writer locking. The following unified RCU is analogous to reader-writer locking. The following unified
diff shows how closely related RCU and reader-writer locking can be. diff shows how closely related RCU and reader-writer locking can be.
@@ -5,5 +5,5 @@ struct el {
int data;
/* Other data fields */
};
-rwlock_t listmutex;
+spinlock_t listmutex;
struct el head;
@@ -13,15 +14,15 @@ @@ -13,15 +14,15 @@
struct list_head *lp; struct list_head *lp;
struct el *p; struct el *p;
- read_lock(); - read_lock(&listmutex);
- list_for_each_entry(p, head, lp) { - list_for_each_entry(p, head, lp) {
+ rcu_read_lock(); + rcu_read_lock();
+ list_for_each_entry_rcu(p, head, lp) { + list_for_each_entry_rcu(p, head, lp) {
if (p->key == key) { if (p->key == key) {
*result = p->data; *result = p->data;
- read_unlock(); - read_unlock(&listmutex);
+ rcu_read_unlock(); + rcu_read_unlock();
return 1; return 1;
} }
} }
- read_unlock(); - read_unlock(&listmutex);
+ rcu_read_unlock(); + rcu_read_unlock();
return 0; return 0;
} }
...@@ -732,7 +740,7 @@ Or, for those who prefer a side-by-side listing: ...@@ -732,7 +740,7 @@ Or, for those who prefer a side-by-side listing:
5 int data; 5 int data; 5 int data; 5 int data;
6 /* Other data fields */ 6 /* Other data fields */ 6 /* Other data fields */ 6 /* Other data fields */
7 }; 7 }; 7 }; 7 };
8 spinlock_t listmutex; 8 spinlock_t listmutex; 8 rwlock_t listmutex; 8 spinlock_t listmutex;
9 struct el head; 9 struct el head; 9 struct el head; 9 struct el head;
1 int search(long key, int *result) 1 int search(long key, int *result) 1 int search(long key, int *result) 1 int search(long key, int *result)
...@@ -740,15 +748,15 @@ Or, for those who prefer a side-by-side listing: ...@@ -740,15 +748,15 @@ Or, for those who prefer a side-by-side listing:
3 struct list_head *lp; 3 struct list_head *lp; 3 struct list_head *lp; 3 struct list_head *lp;
4 struct el *p; 4 struct el *p; 4 struct el *p; 4 struct el *p;
5 5 5 5
6 read_lock(); 6 rcu_read_lock(); 6 read_lock(&listmutex); 6 rcu_read_lock();
7 list_for_each_entry(p, head, lp) { 7 list_for_each_entry_rcu(p, head, lp) { 7 list_for_each_entry(p, head, lp) { 7 list_for_each_entry_rcu(p, head, lp) {
8 if (p->key == key) { 8 if (p->key == key) { 8 if (p->key == key) { 8 if (p->key == key) {
9 *result = p->data; 9 *result = p->data; 9 *result = p->data; 9 *result = p->data;
10 read_unlock(); 10 rcu_read_unlock(); 10 read_unlock(&listmutex); 10 rcu_read_unlock();
11 return 1; 11 return 1; 11 return 1; 11 return 1;
12 } 12 } 12 } 12 }
13 } 13 } 13 } 13 }
14 read_unlock(); 14 rcu_read_unlock(); 14 read_unlock(&listmutex); 14 rcu_read_unlock();
15 return 0; 15 return 0; 15 return 0; 15 return 0;
16 } 16 } 16 } 16 }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -87,6 +87,8 @@ unsigned long rcu_batches_started_sched(void); ...@@ -87,6 +87,8 @@ unsigned long rcu_batches_started_sched(void);
unsigned long rcu_batches_completed(void); unsigned long rcu_batches_completed(void);
unsigned long rcu_batches_completed_bh(void); unsigned long rcu_batches_completed_bh(void);
unsigned long rcu_batches_completed_sched(void); unsigned long rcu_batches_completed_sched(void);
unsigned long rcu_exp_batches_completed(void);
unsigned long rcu_exp_batches_completed_sched(void);
void show_rcu_gp_kthreads(void); void show_rcu_gp_kthreads(void);
void rcu_force_quiescent_state(void); void rcu_force_quiescent_state(void);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
rcutorture.torture_type=rcu_bh rcutorture.torture_type=rcu_bh rcutree.rcu_fanout_leaf=4
CONFIG_RCU_PERF_TEST=y
CONFIG_PRINTK_TIME=y
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment