Skip to content

Commit 2c5cb27

Browse files
author
David Vrabel
committed
Merge commit '683b6c6f82a60fabf47012581c2cfbf1b037ab95' into stable/for-linus-3.15
This merge of the irq-core-for-linus branch broke the ARM build when Xen is enabled. Conflicts: drivers/xen/events/events_base.c
2 parents cd97988 + 683b6c6 commit 2c5cb27

File tree

1,493 files changed

+25211
-13637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,493 files changed

+25211
-13637
lines changed

Documentation/RCU/RTFP.txt

Lines changed: 125 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ has lapsed, so this approach may be used in non-GPL software, if desired.
3131
(In contrast, implementation of RCU is permitted only in software licensed
3232
under either GPL or LGPL. Sorry!!!)
3333

34+
In 1987, Rashid et al. described lazy TLB-flush [RichardRashid87a].
35+
At first glance, this has nothing to do with RCU, but nevertheless
36+
this paper helped inspire the update-side batching used in the later
37+
RCU implementation in DYNIX/ptx. In 1988, Barbara Liskov published
38+
a description of Argus that noted that use of out-of-date values can
39+
be tolerated in some situations. Thus, this paper provides some early
40+
theoretical justification for use of stale data.
41+
3442
In 1990, Pugh [Pugh90] noted that explicitly tracking which threads
3543
were reading a given data structure permitted deferred free to operate
3644
in the presence of non-terminating threads. However, this explicit
@@ -41,11 +49,11 @@ providing a fine-grained locking design, however, it would be interesting
4149
to see how much of the performance advantage reported in 1990 remains
4250
today.
4351

44-
At about this same time, Adams [Adams91] described ``chaotic relaxation'',
45-
where the normal barriers between successive iterations of convergent
46-
numerical algorithms are relaxed, so that iteration $n$ might use
47-
data from iteration $n-1$ or even $n-2$. This introduces error,
48-
which typically slows convergence and thus increases the number of
52+
At about this same time, Andrews [Andrews91textbook] described ``chaotic
53+
relaxation'', where the normal barriers between successive iterations
54+
of convergent numerical algorithms are relaxed, so that iteration $n$
55+
might use data from iteration $n-1$ or even $n-2$. This introduces
56+
error, which typically slows convergence and thus increases the number of
4957
iterations required. However, this increase is sometimes more than made
5058
up for by a reduction in the number of expensive barrier operations,
5159
which are otherwise required to synchronize the threads at the end
@@ -55,7 +63,8 @@ is thus inapplicable to most data structures in operating-system kernels.
5563

5664
In 1992, Henry (now Alexia) Massalin completed a dissertation advising
5765
parallel programmers to defer processing when feasible to simplify
58-
synchronization. RCU makes extremely heavy use of this advice.
66+
synchronization [HMassalinPhD]. RCU makes extremely heavy use of
67+
this advice.
5968

6069
In 1993, Jacobson [Jacobson93] verbally described what is perhaps the
6170
simplest deferred-free technique: simply waiting a fixed amount of time
@@ -90,27 +99,29 @@ mechanism, which is quite similar to RCU [Gamsa99]. These operating
9099
systems made pervasive use of RCU in place of "existence locks", which
91100
greatly simplifies locking hierarchies and helps avoid deadlocks.
92101

93-
2001 saw the first RCU presentation involving Linux [McKenney01a]
94-
at OLS. The resulting abundance of RCU patches was presented the
95-
following year [McKenney02a], and use of RCU in dcache was first
96-
described that same year [Linder02a].
102+
The year 2000 saw an email exchange that would likely have
103+
led to yet another independent invention of something like RCU
104+
[RustyRussell2000a,RustyRussell2000b]. Instead, 2001 saw the first
105+
RCU presentation involving Linux [McKenney01a] at OLS. The resulting
106+
abundance of RCU patches was presented the following year [McKenney02a],
107+
and use of RCU in dcache was first described that same year [Linder02a].
97108

98109
Also in 2002, Michael [Michael02b,Michael02a] presented "hazard-pointer"
99110
techniques that defer the destruction of data structures to simplify
100111
non-blocking synchronization (wait-free synchronization, lock-free
101112
synchronization, and obstruction-free synchronization are all examples of
102-
non-blocking synchronization). In particular, this technique eliminates
103-
locking, reduces contention, reduces memory latency for readers, and
104-
parallelizes pipeline stalls and memory latency for writers. However,
105-
these techniques still impose significant read-side overhead in the
106-
form of memory barriers. Researchers at Sun worked along similar lines
107-
in the same timeframe [HerlihyLM02]. These techniques can be thought
108-
of as inside-out reference counts, where the count is represented by the
109-
number of hazard pointers referencing a given data structure rather than
110-
the more conventional counter field within the data structure itself.
111-
The key advantage of inside-out reference counts is that they can be
112-
stored in immortal variables, thus allowing races between access and
113-
deletion to be avoided.
113+
non-blocking synchronization). The corresponding journal article appeared
114+
in 2004 [MagedMichael04a]. This technique eliminates locking, reduces
115+
contention, reduces memory latency for readers, and parallelizes pipeline
116+
stalls and memory latency for writers. However, these techniques still
117+
impose significant read-side overhead in the form of memory barriers.
118+
Researchers at Sun worked along similar lines in the same timeframe
119+
[HerlihyLM02]. These techniques can be thought of as inside-out reference
120+
counts, where the count is represented by the number of hazard pointers
121+
referencing a given data structure rather than the more conventional
122+
counter field within the data structure itself. The key advantage
123+
of inside-out reference counts is that they can be stored in immortal
124+
variables, thus allowing races between access and deletion to be avoided.
114125

115126
By the same token, RCU can be thought of as a "bulk reference count",
116127
where some form of reference counter covers all reference by a given CPU
@@ -123,8 +134,10 @@ can be thought of in other terms as well.
123134

124135
In 2003, the K42 group described how RCU could be used to create
125136
hot-pluggable implementations of operating-system functions [Appavoo03a].
126-
Later that year saw a paper describing an RCU implementation of System
127-
V IPC [Arcangeli03], and an introduction to RCU in Linux Journal
137+
Later that year saw a paper describing an RCU implementation
138+
of System V IPC [Arcangeli03] (following up on a suggestion by
139+
Hugh Dickins [Dickins02a] and an implementation by Mingming Cao
140+
[MingmingCao2002IPCRCU]), and an introduction to RCU in Linux Journal
128141
[McKenney03a].
129142

130143
2004 has seen a Linux-Journal article on use of RCU in dcache
@@ -383,6 +396,21 @@ for Programming Languages and Operating Systems}"
383396
}
384397
}
385398

399+
@phdthesis{HMassalinPhD
400+
,author="H. Massalin"
401+
,title="Synthesis: An Efficient Implementation of Fundamental Operating
402+
System Services"
403+
,school="Columbia University"
404+
,address="New York, NY"
405+
,year="1992"
406+
,annotation={
407+
Mondo optimizing compiler.
408+
Wait-free stuff.
409+
Good advice: defer work to avoid synchronization. See page 90
410+
(PDF page 106), Section 5.4, fourth bullet point.
411+
}
412+
}
413+
386414
@unpublished{Jacobson93
387415
,author="Van Jacobson"
388416
,title="Avoid Read-Side Locking Via Delayed Free"
@@ -671,6 +699,20 @@ Orran Krieger and Rusty Russell and Dipankar Sarma and Maneesh Soni"
671699
[Viewed October 18, 2004]"
672700
}
673701

702+
@conference{Michael02b
703+
,author="Maged M. Michael"
704+
,title="High Performance Dynamic Lock-Free Hash Tables and List-Based Sets"
705+
,Year="2002"
706+
,Month="August"
707+
,booktitle="{Proceedings of the 14\textsuperscript{th} Annual ACM
708+
Symposium on Parallel
709+
Algorithms and Architecture}"
710+
,pages="73-82"
711+
,annotation={
712+
Like the title says...
713+
}
714+
}
715+
674716
@Conference{Linder02a
675717
,Author="Hanna Linder and Dipankar Sarma and Maneesh Soni"
676718
,Title="Scalability of the Directory Entry Cache"
@@ -727,6 +769,24 @@ Andrea Arcangeli and Andi Kleen and Orran Krieger and Rusty Russell"
727769
}
728770
}
729771

772+
@conference{Michael02a
773+
,author="Maged M. Michael"
774+
,title="Safe Memory Reclamation for Dynamic Lock-Free Objects Using Atomic
775+
Reads and Writes"
776+
,Year="2002"
777+
,Month="August"
778+
,booktitle="{Proceedings of the 21\textsuperscript{st} Annual ACM
779+
Symposium on Principles of Distributed Computing}"
780+
,pages="21-30"
781+
,annotation={
782+
Each thread keeps an array of pointers to items that it is
783+
currently referencing. Sort of an inside-out garbage collection
784+
mechanism, but one that requires the accessing code to explicitly
785+
state its needs. Also requires read-side memory barriers on
786+
most architectures.
787+
}
788+
}
789+
730790
@unpublished{Dickins02a
731791
,author="Hugh Dickins"
732792
,title="Use RCU for System-V IPC"
@@ -735,6 +795,17 @@ Andrea Arcangeli and Andi Kleen and Orran Krieger and Rusty Russell"
735795
,note="private communication"
736796
}
737797

798+
@InProceedings{HerlihyLM02
799+
,author={Maurice Herlihy and Victor Luchangco and Mark Moir}
800+
,title="The Repeat Offender Problem: A Mechanism for Supporting Dynamic-Sized,
801+
Lock-Free Data Structures"
802+
,booktitle={Proceedings of 16\textsuperscript{th} International
803+
Symposium on Distributed Computing}
804+
,year=2002
805+
,month="October"
806+
,pages="339-353"
807+
}
808+
738809
@unpublished{Sarma02b
739810
,Author="Dipankar Sarma"
740811
,Title="Some dcache\_rcu benchmark numbers"
@@ -749,6 +820,19 @@ Andrea Arcangeli and Andi Kleen and Orran Krieger and Rusty Russell"
749820
}
750821
}
751822

823+
@unpublished{MingmingCao2002IPCRCU
824+
,Author="Mingming Cao"
825+
,Title="[PATCH]updated ipc lock patch"
826+
,month="October"
827+
,year="2002"
828+
,note="Available:
829+
\url{https://lkml.org/lkml/2002/10/24/262}
830+
[Viewed February 15, 2014]"
831+
,annotation={
832+
Mingming Cao's patch to introduce RCU to SysV IPC.
833+
}
834+
}
835+
752836
@unpublished{LinusTorvalds2003a
753837
,Author="Linus Torvalds"
754838
,Title="Re: {[PATCH]} small fixes in brlock.h"
@@ -982,6 +1066,23 @@ Realtime Applications"
9821066
}
9831067
}
9841068

1069+
@article{MagedMichael04a
1070+
,author="Maged M. Michael"
1071+
,title="Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects"
1072+
,Year="2004"
1073+
,Month="June"
1074+
,journal="IEEE Transactions on Parallel and Distributed Systems"
1075+
,volume="15"
1076+
,number="6"
1077+
,pages="491-504"
1078+
,url="Available:
1079+
\url{http://www.research.ibm.com/people/m/michael/ieeetpds-2004.pdf}
1080+
[Viewed March 1, 2005]"
1081+
,annotation={
1082+
New canonical hazard-pointer citation.
1083+
}
1084+
}
1085+
9851086
@phdthesis{PaulEdwardMcKenneyPhD
9861087
,author="Paul E. McKenney"
9871088
,title="Exploiting Deferred Destruction:

Documentation/RCU/checklist.txt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,10 @@ over a rather long period of time, but improvements are always welcome!
256256
variations on this theme.
257257

258258
b. Limiting update rate. For example, if updates occur only
259-
once per hour, then no explicit rate limiting is required,
260-
unless your system is already badly broken. The dcache
261-
subsystem takes this approach -- updates are guarded
262-
by a global lock, limiting their rate.
259+
once per hour, then no explicit rate limiting is
260+
required, unless your system is already badly broken.
261+
Older versions of the dcache subsystem take this approach,
262+
guarding updates with a global lock, limiting their rate.
263263

264264
c. Trusted update -- if updates can only be done manually by
265265
superuser or some other trusted user, then it might not
@@ -268,14 +268,22 @@ over a rather long period of time, but improvements are always welcome!
268268
the machine.
269269

270270
d. Use call_rcu_bh() rather than call_rcu(), in order to take
271-
advantage of call_rcu_bh()'s faster grace periods.
271+
advantage of call_rcu_bh()'s faster grace periods. (This
272+
is only a partial solution, though.)
272273

273274
e. Periodically invoke synchronize_rcu(), permitting a limited
274275
number of updates per grace period.
275276

276277
The same cautions apply to call_rcu_bh(), call_rcu_sched(),
277278
call_srcu(), and kfree_rcu().
278279

280+
Note that although these primitives do take action to avoid memory
281+
exhaustion when any given CPU has too many callbacks, a determined
282+
user could still exhaust memory. This is especially the case
283+
if a system with a large number of CPUs has been configured to
284+
offload all of its RCU callbacks onto a single CPU, or if the
285+
system has relatively little free memory.
286+
279287
9. All RCU list-traversal primitives, which include
280288
rcu_dereference(), list_for_each_entry_rcu(), and
281289
list_for_each_safe_rcu(), must be either within an RCU read-side

Documentation/arm64/memory.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ ffffffbc00000000 ffffffbdffffffff 8GB vmemmap
3535

3636
ffffffbe00000000 ffffffbffbbfffff ~8GB [guard, future vmmemap]
3737

38-
ffffffbffbc00000 ffffffbffbdfffff 2MB earlyprintk device
38+
ffffffbffa000000 ffffffbffaffffff 16MB PCI I/O space
39+
40+
ffffffbffb000000 ffffffbffbbfffff 12MB [guard]
3941

40-
ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O space
42+
ffffffbffbc00000 ffffffbffbdfffff 2MB earlyprintk device
4143

42-
ffffffbffbe10000 ffffffbcffffffff ~2MB [guard]
44+
ffffffbffbe00000 ffffffbffbffffff 2MB [guard]
4345

4446
ffffffbffc000000 ffffffbfffffffff 64MB modules
4547

@@ -60,11 +62,13 @@ fffffdfc00000000 fffffdfdffffffff 8GB vmemmap
6062

6163
fffffdfe00000000 fffffdfffbbfffff ~8GB [guard, future vmmemap]
6264

63-
fffffdfffbc00000 fffffdfffbdfffff 2MB earlyprintk device
65+
fffffdfffa000000 fffffdfffaffffff 16MB PCI I/O space
66+
67+
fffffdfffb000000 fffffdfffbbfffff 12MB [guard]
6468

65-
fffffdfffbe00000 fffffdfffbe0ffff 64KB PCI I/O space
69+
fffffdfffbc00000 fffffdfffbdfffff 2MB earlyprintk device
6670

67-
fffffdfffbe10000 fffffdfffbffffff ~2MB [guard]
71+
fffffdfffbe00000 fffffdfffbffffff 2MB [guard]
6872

6973
fffffdfffc000000 fffffdffffffffff 64MB modules
7074

Documentation/device-mapper/cache.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,11 @@ the default being 204800 sectors (or 100MB).
124124
Updating on-disk metadata
125125
-------------------------
126126

127-
On-disk metadata is committed every time a REQ_SYNC or REQ_FUA bio is
128-
written. If no such requests are made then commits will occur every
129-
second. This means the cache behaves like a physical disk that has a
130-
write cache (the same is true of the thin-provisioning target). If
131-
power is lost you may lose some recent writes. The metadata should
132-
always be consistent in spite of any crash.
127+
On-disk metadata is committed every time a FLUSH or FUA bio is written.
128+
If no such requests are made then commits will occur every second. This
129+
means the cache behaves like a physical disk that has a volatile write
130+
cache. If power is lost you may lose some recent writes. The metadata
131+
should always be consistent in spite of any crash.
133132

134133
The 'dirty' state for a cache block changes far too frequently for us
135134
to keep updating it on the fly. So we treat it as a hint. In normal

Documentation/device-mapper/thin-provisioning.txt

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,35 @@ Resuming a device with a new table itself triggers an event so the
116116
userspace daemon can use this to detect a situation where a new table
117117
already exceeds the threshold.
118118

119+
A low water mark for the metadata device is maintained in the kernel and
120+
will trigger a dm event if free space on the metadata device drops below
121+
it.
122+
123+
Updating on-disk metadata
124+
-------------------------
125+
126+
On-disk metadata is committed every time a FLUSH or FUA bio is written.
127+
If no such requests are made then commits will occur every second. This
128+
means the thin-provisioning target behaves like a physical disk that has
129+
a volatile write cache. If power is lost you may lose some recent
130+
writes. The metadata should always be consistent in spite of any crash.
131+
132+
If data space is exhausted the pool will either error or queue IO
133+
according to the configuration (see: error_if_no_space). If metadata
134+
space is exhausted or a metadata operation fails: the pool will error IO
135+
until the pool is taken offline and repair is performed to 1) fix any
136+
potential inconsistencies and 2) clear the flag that imposes repair.
137+
Once the pool's metadata device is repaired it may be resized, which
138+
will allow the pool to return to normal operation. Note that if a pool
139+
is flagged as needing repair, the pool's data and metadata devices
140+
cannot be resized until repair is performed. It should also be noted
141+
that when the pool's metadata space is exhausted the current metadata
142+
transaction is aborted. Given that the pool will cache IO whose
143+
completion may have already been acknowledged to upper IO layers
144+
(e.g. filesystem) it is strongly suggested that consistency checks
145+
(e.g. fsck) be performed on those layers when repair of the pool is
146+
required.
147+
119148
Thin provisioning
120149
-----------------
121150

@@ -258,10 +287,9 @@ ii) Status
258287
should register for the event and then check the target's status.
259288

260289
held metadata root:
261-
The location, in sectors, of the metadata root that has been
290+
The location, in blocks, of the metadata root that has been
262291
'held' for userspace read access. '-' indicates there is no
263-
held root. This feature is not yet implemented so '-' is
264-
always returned.
292+
held root.
265293

266294
discard_passdown|no_discard_passdown
267295
Whether or not discards are actually being passed down to the

Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Marvell Armada 370 and Armada XP Interrupt Controller
1+
Marvell Armada 370, 375, 38x, XP Interrupt Controller
22
-----------------------------------------------------
33

44
Required properties:
@@ -16,7 +16,13 @@ Required properties:
1616
automatically map to the interrupt controller registers of the
1717
current CPU)
1818

19+
Optional properties:
1920

21+
- interrupts: If defined, then it indicates that this MPIC is
22+
connected as a slave to another interrupt controller. This is
23+
typically the case on Armada 375 and Armada 38x, where the MPIC is
24+
connected as a slave to the Cortex-A9 GIC. The provided interrupt
25+
indicate to which GIC interrupt the MPIC output is connected.
2026

2127
Example:
2228

0 commit comments

Comments
 (0)