Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22392
b: refs/heads/master
c: 536ea4e
h: refs/heads/master
v: v3
  • Loading branch information
Tony Luck committed Mar 21, 2006
1 parent 5fc227e commit b52ac9a
Show file tree
Hide file tree
Showing 5,846 changed files with 293,325 additions and 146,441 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b88e926584bf100bc23f5e76b7b674d4257edcb0
refs/heads/master: 536ea4e4198eeaa5a73fb734ea675e621609bb7e
1 change: 1 addition & 0 deletions trunk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*.a
*.s
*.ko
*.so
*.mod.c

#
Expand Down
11 changes: 4 additions & 7 deletions trunk/CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ D: Author of lil (Linux Interrupt Latency benchmark)
D: Fixed the shm swap deallocation at swapoff time (try_to_unuse message)
D: VM hacker
D: Various other kernel hacks
S: Via Cicalini 26
S: Imola 40026
S: Italy

Expand Down Expand Up @@ -3101,7 +3100,7 @@ S: Minto, NSW, 2566
S: Australia

N: Stephen Smalley
E: sds@epoch.ncsc.mil
E: sds@tycho.nsa.gov
D: portions of the Linux Security Module (LSM) framework and security modules

N: Chris Smith
Expand Down Expand Up @@ -3203,7 +3202,7 @@ N: Eugene Surovegin
E: ebs@ebshome.net
W: http://kernel.ebshome.net/
P: 1024D/AE5467F1 FF22 39F1 6728 89F6 6E6C 2365 7602 F33D AE54 67F1
D: Embedded PowerPC 4xx: I2C, PIC and random hacks/fixes
D: Embedded PowerPC 4xx: EMAC, I2C, PIC and random hacks/fixes
S: Sunnyvale, California 94085
S: USA

Expand Down Expand Up @@ -3643,11 +3642,9 @@ S: Cambridge. CB1 7EG
S: England

N: Chris Wright
E: chrisw@osdl.org
E: chrisw@sous-sol.org
D: hacking on LSM framework and security modules.
S: c/o OSDL
S: 12725 SW Millikan Way, Suite 400
S: Beaverton, OR 97005
S: Portland, OR
S: USA

N: Michal Wronski
Expand Down
31 changes: 5 additions & 26 deletions trunk/Documentation/Changes
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ al espa
Eine deutsche Version dieser Datei finden Sie unter
<http://www.stefan-winter.de/Changes-2.4.0.txt>.

Last updated: October 29th, 2002

Chris Ricker (kaboom@gatech.edu or chris.ricker@genetics.utah.edu).

Current Minimal Requirements
Expand All @@ -48,7 +46,7 @@ necessary on all systems; obviously, if you don't have any ISDN
hardware, for example, you probably needn't concern yourself with
isdn4k-utils.

o Gnu C 2.95.3 # gcc --version
o Gnu C 3.2 # gcc --version
o Gnu make 3.79.1 # make --version
o binutils 2.12 # ld -v
o util-linux 2.10o # fdformat --version
Expand All @@ -74,26 +72,7 @@ GCC
---

The gcc version requirements may vary depending on the type of CPU in your
computer. The next paragraph applies to users of x86 CPUs, but not
necessarily to users of other CPUs. Users of other CPUs should obtain
information about their gcc version requirements from another source.

The recommended compiler for the kernel is gcc 2.95.x (x >= 3), and it
should be used when you need absolute stability. You may use gcc 3.0.x
instead if you wish, although it may cause problems. Later versions of gcc
have not received much testing for Linux kernel compilation, and there are
almost certainly bugs (mainly, but not exclusively, in the kernel) that
will need to be fixed in order to use these compilers. In any case, using
pgcc instead of plain gcc is just asking for trouble.

The Red Hat gcc 2.96 compiler subtree can also be used to build this tree.
You should ensure you use gcc-2.96-74 or later. gcc-2.96-54 will not build
the kernel correctly.

In addition, please pay attention to compiler optimization. Anything
greater than -O2 may not be wise. Similarly, if you choose to use gcc-2.95.x
or derivatives, be sure not to use -fstrict-aliasing (which, depending on
your version of gcc 2.95.x, may necessitate using -fno-strict-aliasing).
computer.

Make
----
Expand Down Expand Up @@ -322,9 +301,9 @@ Getting updated software
Kernel compilation
******************

gcc 2.95.3
----------
o <ftp://ftp.gnu.org/gnu/gcc/gcc-2.95.3.tar.gz>
gcc
---
o <ftp://ftp.gnu.org/gnu/gcc/>

Make
----
Expand Down
43 changes: 37 additions & 6 deletions trunk/Documentation/CodingStyle
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ The rationale is:
modifications are prevented
- saves the compiler work to optimize redundant code away ;)

int fun(int )
int fun(int a)
{
int result = 0;
char *buffer = kmalloc(SIZE);
Expand Down Expand Up @@ -344,7 +344,7 @@ Remember: if another thread can find your data structure, and you don't
have a reference count on it, you almost certainly have a bug.


Chapter 11: Macros, Enums, Inline functions and RTL
Chapter 11: Macros, Enums and RTL

Names of macros defining constants and labels in enums are capitalized.

Expand Down Expand Up @@ -429,7 +429,35 @@ from void pointer to any other pointer type is guaranteed by the C programming
language.


Chapter 14: References
Chapter 14: The inline disease

There appears to be a common misperception that gcc has a magic "make me
faster" speedup option called "inline". While the use of inlines can be
appropriate (for example as a means of replacing macros, see Chapter 11), it
very often is not. Abundant use of the inline keyword leads to a much bigger
kernel, which in turn slows the system as a whole down, due to a bigger
icache footprint for the CPU and simply because there is less memory
available for the pagecache. Just think about it; a pagecache miss causes a
disk seek, which easily takes 5 miliseconds. There are a LOT of cpu cycles
that can go into these 5 miliseconds.

A reasonable rule of thumb is to not put inline at functions that have more
than 3 lines of code in them. An exception to this rule are the cases where
a parameter is known to be a compiletime constant, and as a result of this
constantness you *know* the compiler will be able to optimize most of your
function away at compile time. For a good example of this later case, see
the kmalloc() inline function.

Often people argue that adding inline to functions that are static and used
only once is always a win since there is no space tradeoff. While this is
technically correct, gcc is capable of inlining these automatically without
help, and the maintenance issue of removing the inline when a second user
appears outweighs the potential value of the hint that tells gcc to do
something it would have done anyway.



Chapter 15: References

The C Programming Language, Second Edition
by Brian W. Kernighan and Dennis M. Ritchie.
Expand All @@ -444,10 +472,13 @@ ISBN 0-201-61586-X.
URL: http://cm.bell-labs.com/cm/cs/tpop/

GNU manuals - where in compliance with K&R and this text - for cpp, gcc,
gcc internals and indent, all available from http://www.gnu.org
gcc internals and indent, all available from http://www.gnu.org/manual/

WG14 is the international standardization working group for the programming
language C, URL: http://std.dkuug.dk/JTC1/SC22/WG14/
language C, URL: http://www.open-std.org/JTC1/SC22/WG14/

Kernel CodingStyle, by greg@kroah.com at OLS 2002:
http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/

--
Last updated on 16 February 2004 by a community effort on LKML.
Last updated on 30 December 2005 by a community effort on LKML.
6 changes: 6 additions & 0 deletions trunk/Documentation/DocBook/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.xml
*.ps
*.pdf
*.html
*.9.gz
*.9
6 changes: 6 additions & 0 deletions trunk/Documentation/DocBook/kernel-api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
!Iinclude/linux/sched.h
!Ekernel/sched.c
!Ekernel/timer.c
</sect1>
<sect1><title>High-resolution timers</title>
!Iinclude/linux/ktime.h
!Iinclude/linux/hrtimer.h
!Ekernel/hrtimer.c
</sect1>
<sect1><title>Internal Functions</title>
!Ikernel/exit.c
Expand Down Expand Up @@ -369,6 +374,7 @@ X!Edrivers/acpi/motherboard.c
X!Edrivers/acpi/bus.c
-->
!Edrivers/acpi/scan.c
!Idrivers/acpi/scan.c
<!-- No correct structured comments
X!Edrivers/acpi/pci_bind.c
-->
Expand Down
22 changes: 14 additions & 8 deletions trunk/Documentation/DocBook/kernel-locking.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -222,24 +222,30 @@
<title>Two Main Types of Kernel Locks: Spinlocks and Semaphores</title>

<para>
There are two main types of kernel locks. The fundamental type
There are three main types of kernel locks. The fundamental type
is the spinlock
(<filename class="headerfile">include/asm/spinlock.h</filename>),
which is a very simple single-holder lock: if you can't get the
spinlock, you keep trying (spinning) until you can. Spinlocks are
very small and fast, and can be used anywhere.
</para>
<para>
The second type is a semaphore
The second type is a mutex
(<filename class="headerfile">include/linux/mutex.h</filename>): it
is like a spinlock, but you may block holding a mutex.
If you can't lock a mutex, your task will suspend itself, and be woken
up when the mutex is released. This means the CPU can do something
else while you are waiting. There are many cases when you simply
can't sleep (see <xref linkend="sleeping-things"/>), and so have to
use a spinlock instead.
</para>
<para>
The third type is a semaphore
(<filename class="headerfile">include/asm/semaphore.h</filename>): it
can have more than one holder at any time (the number decided at
initialization time), although it is most commonly used as a
single-holder lock (a mutex). If you can't get a semaphore,
your task will put itself on the queue, and be woken up when the
semaphore is released. This means the CPU will do something
else while you are waiting, but there are many cases when you
simply can't sleep (see <xref linkend="sleeping-things"/>), and so
have to use a spinlock instead.
single-holder lock (a mutex). If you can't get a semaphore, your
task will be suspended and later on woken up - just like for mutexes.
</para>
<para>
Neither type of lock is recursive: see
Expand Down
4 changes: 2 additions & 2 deletions trunk/Documentation/DocBook/videobook.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ int __init myradio_init(struct video_init *v)

static int users = 0;

static int radio_open(stuct video_device *dev, int flags)
static int radio_open(struct video_device *dev, int flags)
{
if(users)
return -EBUSY;
Expand Down Expand Up @@ -949,7 +949,7 @@ int __init mycamera_init(struct video_init *v)

static int users = 0;

static int camera_open(stuct video_device *dev, int flags)
static int camera_open(struct video_device *dev, int flags)
{
if(users)
return -EBUSY;
Expand Down
25 changes: 14 additions & 11 deletions trunk/Documentation/RCU/RTFP.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,20 @@ 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 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].
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).

In 2003, the K42 group described how RCU could be used to create
hot-pluggable implementations of operating-system functions. Later that
Expand All @@ -113,7 +117,6 @@ 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: 6 additions & 0 deletions trunk/Documentation/RCU/checklist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,9 @@ 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: 12 additions & 9 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 use the _rcu iterator here, since this is the only
* deletion routine. */
/* Do not need to 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,9 +304,12 @@ function to reject newly deleted data.


Answer to Quick Quiz

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.
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.
5 changes: 5 additions & 0 deletions trunk/Documentation/RCU/rcu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ 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
Loading

0 comments on commit b52ac9a

Please sign in to comment.