Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19851
b: refs/heads/master
c: 103ec09
h: refs/heads/master
i:
  19849: 7a9eda0
  19847: 46d29eb
v: v3
  • Loading branch information
Keith Owens authored and Tony Luck committed Jan 26, 2006
1 parent c7f701f commit 8ac4581
Show file tree
Hide file tree
Showing 805 changed files with 17,382 additions and 25,205 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c6c66362941df847957766ad133ff5fde67579c
refs/heads/master: 103ec0910d6b9401b7f72ba3ac71fed88306d2d0
25 changes: 11 additions & 14 deletions trunk/Documentation/RCU/RTFP.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,16 @@ at OLS. The resulting abundance of RCU patches was presented the
following year [McKenney02a], and use of RCU in dcache was first
described that same year [Linder02a].

Also in 2002, Michael [Michael02b,Michael02a] presented "hazard-pointer"
techniques that defer the destruction of data structures to simplify
non-blocking synchronization (wait-free synchronization, lock-free
synchronization, and obstruction-free synchronization are all examples of
non-blocking synchronization). In particular, this technique eliminates
locking, reduces contention, reduces memory latency for readers, and
parallelizes pipeline stalls and memory latency for writers. However,
these techniques still impose significant read-side overhead in the
form of memory barriers. Researchers at Sun worked along similar lines
in the same timeframe [HerlihyLM02,HerlihyLMS03]. These techniques
can be thought of as inside-out reference counts, where the count is
represented by the number of hazard pointers referencing a given data
structure (rather than the more conventional counter field within the
data structure itself).
Also in 2002, Michael [Michael02b,Michael02a] presented techniques
that defer the destruction of data structures to simplify non-blocking
synchronization (wait-free synchronization, lock-free synchronization,
and obstruction-free synchronization are all examples of non-blocking
synchronization). In particular, this technique eliminates locking,
reduces contention, reduces memory latency for readers, and parallelizes
pipeline stalls and memory latency for writers. However, these
techniques still impose significant read-side overhead in the form of
memory barriers. Researchers at Sun worked along similar lines in the
same timeframe [HerlihyLM02,HerlihyLMS03].

In 2003, the K42 group described how RCU could be used to create
hot-pluggable implementations of operating-system functions. Later that
Expand All @@ -117,6 +113,7 @@ number of operating-system kernels [PaulEdwardMcKenneyPhD], a paper
describing how to make RCU safe for soft-realtime applications [Sarma04c],
and a paper describing SELinux performance with RCU [JamesMorris04b].


2005 has seen further adaptation of RCU to realtime use, permitting
preemption of RCU realtime critical sections [PaulMcKenney05a,
PaulMcKenney05b].
Expand Down
6 changes: 0 additions & 6 deletions trunk/Documentation/RCU/checklist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,3 @@ over a rather long period of time, but improvements are always welcome!

If you want to wait for some of these other things, you might
instead need to use synchronize_irq() or synchronize_sched().

12. Any lock acquired by an RCU callback must be acquired elsewhere
with irq disabled, e.g., via spin_lock_irqsave(). Failing to
disable irq on a given acquisition of that lock will result in
deadlock as soon as the RCU callback happens to interrupt that
acquisition's critical section.
21 changes: 9 additions & 12 deletions trunk/Documentation/RCU/listRCU.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ entry does not exist. For this to be helpful, the search function must
return holding the per-entry spinlock, as ipc_lock() does in fact do.

Quick Quiz: Why does the search function need to return holding the
per-entry lock for this deleted-flag technique to be helpful?
per-entry lock for this deleted-flag technique to be helpful?

If the system-call audit module were to ever need to reject stale data,
one way to accomplish this would be to add a "deleted" flag and a "lock"
Expand Down Expand Up @@ -275,8 +275,8 @@ flag under the spinlock as follows:
{
struct audit_entry *e;

/* Do not need to use the _rcu iterator here, since this
* is the only deletion routine. */
/* Do not use the _rcu iterator here, since this is the only
* deletion routine. */
list_for_each_entry(e, list, list) {
if (!audit_compare_rule(rule, &e->rule)) {
spin_lock(&e->lock);
Expand Down Expand Up @@ -304,12 +304,9 @@ function to reject newly deleted data.


Answer to Quick Quiz
Why does the search function need to return holding the per-entry
lock for this deleted-flag technique to be helpful?

If the search function drops the per-entry lock before returning,
then the caller will be processing stale data in any case. If it
is really OK to be processing stale data, then you don't need a
"deleted" flag. If processing stale data really is a problem,
then you need to hold the per-entry lock across all of the code
that uses the value that was returned.

If the search function drops the per-entry lock before returning, then
the caller will be processing stale data in any case. If it is really
OK to be processing stale data, then you don't need a "deleted" flag.
If processing stale data really is a problem, then you need to hold the
per-entry lock across all of the code that uses the value looked up.
5 changes: 0 additions & 5 deletions trunk/Documentation/RCU/rcu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ o What are all these files in this directory?

You are reading it!

rcuref.txt

Describes how to combine use of reference counts
with RCU.

whatisRCU.txt

Overview of how the RCU implementation works. Along
Expand Down
31 changes: 16 additions & 15 deletions trunk/Documentation/RCU/rcuref.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Reference-count design for elements of lists/arrays protected by RCU.
Refcounter design for elements of lists/arrays protected by RCU.

Reference counting on elements of lists which are protected by traditional
reader/writer spinlocks or semaphores are straightforward:
Refcounting on elements of lists which are protected by traditional
reader/writer spinlocks or semaphores are straight forward as in:

1. 2.
add() search_and_reference()
Expand All @@ -28,12 +28,12 @@ release_referenced() delete()
...
}

If this list/array is made lock free using RCU as in changing the
write_lock() in add() and delete() to spin_lock and changing read_lock
If this list/array is made lock free using rcu as in changing the
write_lock in add() and delete() to spin_lock and changing read_lock
in search_and_reference to rcu_read_lock(), the atomic_get in
search_and_reference could potentially hold reference to an element which
has already been deleted from the list/array. Use atomic_inc_not_zero()
in this scenario as follows:
has already been deleted from the list/array. atomic_inc_not_zero takes
care of this scenario. search_and_reference should look as;

1. 2.
add() search_and_reference()
Expand All @@ -51,16 +51,17 @@ add() search_and_reference()
release_referenced() delete()
{ {
... write_lock(&list_lock);
if (atomic_dec_and_test(&el->rc)) ...
call_rcu(&el->head, el_free); delete_element
... write_unlock(&list_lock);
} ...
atomic_dec(&el->rc, relfunc) ...
... delete_element
} write_unlock(&list_lock);
...
if (atomic_dec_and_test(&el->rc))
call_rcu(&el->head, el_free);
...
}

Sometimes, a reference to the element needs to be obtained in the
update (write) stream. In such cases, atomic_inc_not_zero() might be
overkill, since we hold the update-side spinlock. One might instead
use atomic_inc() in such cases.
Sometimes, reference to the element need to be obtained in the
update (write) stream. In such cases, atomic_inc_not_zero might be an
overkill since the spinlock serialising list updates are held. atomic_inc
is to be used in such cases.

29 changes: 12 additions & 17 deletions trunk/Documentation/RCU/whatisRCU.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,10 @@ rcu_assign_pointer()
the new value, and also executes any memory-barrier instructions
required for a given CPU architecture.

Perhaps just as important, it serves to document (1) which
pointers are protected by RCU and (2) the point at which a
given structure becomes accessible to other CPUs. That said,
rcu_assign_pointer() is most frequently used indirectly, via
the _rcu list-manipulation primitives such as list_add_rcu().
Perhaps more important, it serves to document which pointers
are protected by RCU. That said, rcu_assign_pointer() is most
frequently used indirectly, via the _rcu list-manipulation
primitives such as list_add_rcu().

rcu_dereference()

Expand Down Expand Up @@ -259,11 +258,9 @@ rcu_dereference()
locking.

As with rcu_assign_pointer(), an important function of
rcu_dereference() is to document which pointers are protected by
RCU, in particular, flagging a pointer that is subject to changing
at any time, including immediately after the rcu_dereference().
And, again like rcu_assign_pointer(), rcu_dereference() is
typically used indirectly, via the _rcu list-manipulation
rcu_dereference() is to document which pointers are protected
by RCU. And, again like rcu_assign_pointer(), rcu_dereference()
is typically used indirectly, via the _rcu list-manipulation
primitives, such as list_for_each_entry_rcu().

The following diagram shows how each API communicates among the
Expand Down Expand Up @@ -330,7 +327,7 @@ for specialized uses, but are relatively uncommon.
3. WHAT ARE SOME EXAMPLE USES OF CORE RCU API?

This section shows a simple use of the core RCU API to protect a
global pointer to a dynamically allocated structure. More-typical
global pointer to a dynamically allocated structure. More typical
uses of RCU may be found in listRCU.txt, arrayRCU.txt, and NMI-RCU.txt.

struct foo {
Expand Down Expand Up @@ -413,8 +410,6 @@ o Use synchronize_rcu() -after- removing a data element from an
data item.

See checklist.txt for additional rules to follow when using RCU.
And again, more-typical uses of RCU may be found in listRCU.txt,
arrayRCU.txt, and NMI-RCU.txt.


4. WHAT IF MY UPDATING THREAD CANNOT BLOCK?
Expand Down Expand Up @@ -518,7 +513,7 @@ production-quality implementation, and see:

for papers describing the Linux kernel RCU implementation. The OLS'01
and OLS'02 papers are a good introduction, and the dissertation provides
more details on the current implementation as of early 2004.
more details on the current implementation.


5A. "TOY" IMPLEMENTATION #1: LOCKING
Expand Down Expand Up @@ -773,6 +768,7 @@ RCU pointer/list traversal:
rcu_dereference
list_for_each_rcu (to be deprecated in favor of
list_for_each_entry_rcu)
list_for_each_safe_rcu (deprecated, not used)
list_for_each_entry_rcu
list_for_each_continue_rcu (to be deprecated in favor of new
list_for_each_entry_continue_rcu)
Expand Down Expand Up @@ -811,8 +807,7 @@ Quick Quiz #1: Why is this argument naive? How could a deadlock
Answer: Consider the following sequence of events:

1. CPU 0 acquires some unrelated lock, call it
"problematic_lock", disabling irq via
spin_lock_irqsave().
"problematic_lock".

2. CPU 1 enters synchronize_rcu(), write-acquiring
rcu_gp_mutex.
Expand Down Expand Up @@ -899,7 +894,7 @@ Answer: Just as PREEMPT_RT permits preemption of spinlock
ACKNOWLEDGEMENTS

My thanks to the people who helped make this human-readable, including
Jon Walpole, Josh Triplett, Serge Hallyn, Suzanne Wood, and Alan Stern.
Jon Walpole, Josh Triplett, Serge Hallyn, and Suzanne Wood.


For more information, see http://www.rdrop.com/users/paulmck/RCU.
14 changes: 0 additions & 14 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,3 @@ Why: The 8250 serial driver now has the ability to deal with the differences
brother on Alchemy SOCs. The loss of features is not considered an
issue.
Who: Ralf Baechle <ralf@linux-mips.org>

---------------------------

What: Legacy /proc/pci interface (PCI_LEGACY_PROC)
When: March 2006
Why: deprecated since 2.5.53 in favor of lspci(8)
Who: Adrian Bunk <bunk@stusta.de>

---------------------------

What: pci_module_init(driver)
When: January 2007
Why: Is replaced by pci_register_driver(pci_driver).
Who: Richard Knutsson <ricknu-0@student.ltu.se> and Greg Kroah-Hartman <gregkh@suse.de>
39 changes: 5 additions & 34 deletions trunk/Documentation/kernel-doc-nano-HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ How to extract the documentation

If you just want to read the ready-made books on the various
subsystems (see Documentation/DocBook/*.tmpl), just type 'make
psdocs', or 'make pdfdocs', or 'make htmldocs', depending on your
preference. If you would rather read a different format, you can type
'make sgmldocs' and then use DocBook tools to convert
Documentation/DocBook/*.sgml to a format of your choice (for example,
psdocs', or 'make pdfdocs', or 'make htmldocs', depending on your
preference. If you would rather read a different format, you can type
'make sgmldocs' and then use DocBook tools to convert
Documentation/DocBook/*.sgml to a format of your choice (for example,
'db2html ...' if 'make htmldocs' was not defined).

If you want to see man pages instead, you can do this:
Expand Down Expand Up @@ -124,36 +124,6 @@ patterns, which are highlighted appropriately.
Take a look around the source tree for examples.


kernel-doc for structs, unions, enums, and typedefs
---------------------------------------------------

Beside functions you can also write documentation for structs, unions,
enums and typedefs. Instead of the function name you must write the name
of the declaration; the struct/union/enum/typedef must always precede
the name. Nesting of declarations is not supported.
Use the argument mechanism to document members or constants.

Inside a struct description, you can use the "private:" and "public:"
comment tags. Structure fields that are inside a "private:" area
are not listed in the generated output documentation.

Example:

/**
* struct my_struct - short description
* @a: first member
* @b: second member
*
* Longer description
*/
struct my_struct {
int a;
int b;
/* private: */
int c;
};


How to make new SGML template files
-----------------------------------

Expand All @@ -177,3 +147,4 @@ documentation, in <filename>, for the functions listed.

Tim.
*/ <twaugh@redhat.com>

5 changes: 0 additions & 5 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,6 @@ running once the system is up.

eata= [HW,SCSI]

ec_intr= [HW,ACPI] ACPI Embedded Controller interrupt mode
Format: <int>
0: polling mode
non-0: interrupt mode (default)

eda= [HW,PS2]

edb= [HW,PS2]
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/power/interface.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ it.
/sys/power/image_size controls the size of the image created by
the suspend-to-disk mechanism. It can be written a string
representing a non-negative integer that will be used as an upper
limit of the image size, in bytes. The suspend-to-disk mechanism will
limit of the image size, in megabytes. The suspend-to-disk mechanism will
do its best to ensure the image size will not exceed that number. However,
if this turns out to be impossible, it will try to suspend anyway using the
smallest image possible. In particular, if "0" is written to this file, the
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/power/swsusp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ echo shutdown > /sys/power/disk; echo disk > /sys/power/state

echo platform > /sys/power/disk; echo disk > /sys/power/state

If you want to limit the suspend image size to N bytes, do
If you want to limit the suspend image size to N megabytes, do

echo N > /sys/power/image_size

Expand Down
Loading

0 comments on commit 8ac4581

Please sign in to comment.