Skip to content

Commit 7e452ba

Browse files
committed
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/message/fusion/mptlan.c drivers/net/sfc/ethtool.c net/mac80211/debugfs_sta.c
2 parents 3ac38c3 + f21f237 commit 7e452ba

File tree

252 files changed

+7972
-3979
lines changed

Some content is hidden

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

252 files changed

+7972
-3979
lines changed

Documentation/feature-removal-schedule.txt

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -56,30 +56,6 @@ Who: Mauro Carvalho Chehab <[email protected]>
5656

5757
---------------------------
5858

59-
What: old tuner-3036 i2c driver
60-
When: 2.6.28
61-
Why: This driver is for VERY old i2c-over-parallel port teletext receiver
62-
boxes. Rather then spending effort on converting this driver to V4L2,
63-
and since it is extremely unlikely that anyone still uses one of these
64-
devices, it was decided to drop it.
65-
Who: Hans Verkuil <[email protected]>
66-
Mauro Carvalho Chehab <[email protected]>
67-
68-
---------------------------
69-
70-
What: V4L2 dpc7146 driver
71-
When: 2.6.28
72-
Why: Old driver for the dpc7146 demonstration board that is no longer
73-
relevant. The last time this was tested on actual hardware was
74-
probably around 2002. Since this is a driver for a demonstration
75-
board the decision was made to remove it rather than spending a
76-
lot of effort continually updating this driver to stay in sync
77-
with the latest internal V4L2 or I2C API.
78-
Who: Hans Verkuil <[email protected]>
79-
Mauro Carvalho Chehab <[email protected]>
80-
81-
---------------------------
82-
8359
What: PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
8460
When: November 2005
8561
Files: drivers/pcmcia/: pcmcia_ioctl.c

Documentation/ftrace.txt

Lines changed: 73 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Copyright 2008 Red Hat Inc.
88
Reviewers: Elias Oltmanns, Randy Dunlap, Andrew Morton,
99
John Kacur, and David Teigland.
1010

11-
Written for: 2.6.27-rc1
11+
Written for: 2.6.28-rc2
1212

1313
Introduction
1414
------------
@@ -50,26 +50,26 @@ of ftrace. Here is a list of some of the key files:
5050

5151
Note: all time values are in microseconds.
5252

53-
current_tracer : This is used to set or display the current tracer
53+
current_tracer: This is used to set or display the current tracer
5454
that is configured.
5555

56-
available_tracers : This holds the different types of tracers that
56+
available_tracers: This holds the different types of tracers that
5757
have been compiled into the kernel. The tracers
5858
listed here can be configured by echoing their name
5959
into current_tracer.
6060

61-
tracing_enabled : This sets or displays whether the current_tracer
61+
tracing_enabled: This sets or displays whether the current_tracer
6262
is activated and tracing or not. Echo 0 into this
6363
file to disable the tracer or 1 to enable it.
6464

65-
trace : This file holds the output of the trace in a human readable
65+
trace: This file holds the output of the trace in a human readable
6666
format (described below).
6767

68-
latency_trace : This file shows the same trace but the information
68+
latency_trace: This file shows the same trace but the information
6969
is organized more to display possible latencies
7070
in the system (described below).
7171

72-
trace_pipe : The output is the same as the "trace" file but this
72+
trace_pipe: The output is the same as the "trace" file but this
7373
file is meant to be streamed with live tracing.
7474
Reads from this file will block until new data
7575
is retrieved. Unlike the "trace" and "latency_trace"
@@ -82,41 +82,38 @@ of ftrace. Here is a list of some of the key files:
8282
tracer is not adding more data, they will display
8383
the same information every time they are read.
8484

85-
iter_ctrl : This file lets the user control the amount of data
85+
iter_ctrl: This file lets the user control the amount of data
8686
that is displayed in one of the above output
8787
files.
8888

89-
trace_max_latency : Some of the tracers record the max latency.
89+
trace_max_latency: Some of the tracers record the max latency.
9090
For example, the time interrupts are disabled.
9191
This time is saved in this file. The max trace
9292
will also be stored, and displayed by either
9393
"trace" or "latency_trace". A new max trace will
9494
only be recorded if the latency is greater than
9595
the value in this file. (in microseconds)
9696

97-
trace_entries : This sets or displays the number of trace
98-
entries each CPU buffer can hold. The tracer buffers
99-
are the same size for each CPU. The displayed number
100-
is the size of the CPU buffer and not total size. The
97+
trace_entries: This sets or displays the number of bytes each CPU
98+
buffer can hold. The tracer buffers are the same size
99+
for each CPU. The displayed number is the size of the
100+
CPU buffer and not total size of all buffers. The
101101
trace buffers are allocated in pages (blocks of memory
102102
that the kernel uses for allocation, usually 4 KB in size).
103-
Since each entry is smaller than a page, if the last
104-
allocated page has room for more entries than were
105-
requested, the rest of the page is used to allocate
106-
entries.
103+
If the last page allocated has room for more bytes
104+
than requested, the rest of the page will be used,
105+
making the actual allocation bigger than requested.
106+
(Note, the size may not be a multiple of the page size due
107+
to buffer managment overhead.)
107108

108109
This can only be updated when the current_tracer
109-
is set to "none".
110+
is set to "nop".
110111

111-
NOTE: It is planned on changing the allocated buffers
112-
from being the number of possible CPUS to
113-
the number of online CPUS.
114-
115-
tracing_cpumask : This is a mask that lets the user only trace
112+
tracing_cpumask: This is a mask that lets the user only trace
116113
on specified CPUS. The format is a hex string
117114
representing the CPUS.
118115

119-
set_ftrace_filter : When dynamic ftrace is configured in (see the
116+
set_ftrace_filter: When dynamic ftrace is configured in (see the
120117
section below "dynamic ftrace"), the code is dynamically
121118
modified (code text rewrite) to disable calling of the
122119
function profiler (mcount). This lets tracing be configured
@@ -130,22 +127,19 @@ of ftrace. Here is a list of some of the key files:
130127
be traced. If a function exists in both set_ftrace_filter
131128
and set_ftrace_notrace, the function will _not_ be traced.
132129

133-
available_filter_functions : When a function is encountered the first
134-
time by the dynamic tracer, it is recorded and
135-
later the call is converted into a nop. This file
136-
lists the functions that have been recorded
137-
by the dynamic tracer and these functions can
138-
be used to set the ftrace filter by the above
139-
"set_ftrace_filter" file. (See the section "dynamic ftrace"
140-
below for more details).
130+
available_filter_functions: This lists the functions that ftrace
131+
has processed and can trace. These are the function
132+
names that you can pass to "set_ftrace_filter" or
133+
"set_ftrace_notrace". (See the section "dynamic ftrace"
134+
below for more details.)
141135

142136

143137
The Tracers
144138
-----------
145139

146140
Here is the list of current tracers that may be configured.
147141

148-
ftrace - function tracer that uses mcount to trace all functions.
142+
function - function tracer that uses mcount to trace all functions.
149143

150144
sched_switch - traces the context switches between tasks.
151145

@@ -166,8 +160,8 @@ Here is the list of current tracers that may be configured.
166160
the highest priority task to get scheduled after
167161
it has been woken up.
168162

169-
none - This is not a tracer. To remove all tracers from tracing
170-
simply echo "none" into current_tracer.
163+
nop - This is not a tracer. To remove all tracers from tracing
164+
simply echo "nop" into current_tracer.
171165

172166

173167
Examples of using the tracer
@@ -182,7 +176,7 @@ Output format:
182176
Here is an example of the output format of the file "trace"
183177

184178
--------
185-
# tracer: ftrace
179+
# tracer: function
186180
#
187181
# TASK-PID CPU# TIMESTAMP FUNCTION
188182
# | | | | |
@@ -192,7 +186,7 @@ Here is an example of the output format of the file "trace"
192186
--------
193187

194188
A header is printed with the tracer name that is represented by the trace.
195-
In this case the tracer is "ftrace". Then a header showing the format. Task
189+
In this case the tracer is "function". Then a header showing the format. Task
196190
name "bash", the task PID "4251", the CPU that it was running on
197191
"01", the timestamp in <secs>.<usecs> format, the function name that was
198192
traced "path_put" and the parent function that called this function
@@ -1003,22 +997,20 @@ is the stack for the hard interrupt. This hides the fact that NEED_RESCHED
1003997
has been set. We do not see the 'N' until we switch back to the task's
1004998
assigned stack.
1005999

1006-
ftrace
1007-
------
1000+
function
1001+
--------
10081002

1009-
ftrace is not only the name of the tracing infrastructure, but it
1010-
is also a name of one of the tracers. The tracer is the function
1011-
tracer. Enabling the function tracer can be done from the
1012-
debug file system. Make sure the ftrace_enabled is set otherwise
1013-
this tracer is a nop.
1003+
This tracer is the function tracer. Enabling the function tracer
1004+
can be done from the debug file system. Make sure the ftrace_enabled is
1005+
set; otherwise this tracer is a nop.
10141006

10151007
# sysctl kernel.ftrace_enabled=1
1016-
# echo ftrace > /debug/tracing/current_tracer
1008+
# echo function > /debug/tracing/current_tracer
10171009
# echo 1 > /debug/tracing/tracing_enabled
10181010
# usleep 1
10191011
# echo 0 > /debug/tracing/tracing_enabled
10201012
# cat /debug/tracing/trace
1021-
# tracer: ftrace
1013+
# tracer: function
10221014
#
10231015
# TASK-PID CPU# TIMESTAMP FUNCTION
10241016
# | | | | |
@@ -1040,10 +1032,10 @@ this tracer is a nop.
10401032
[...]
10411033

10421034

1043-
Note: ftrace uses ring buffers to store the above entries. The newest data
1044-
may overwrite the oldest data. Sometimes using echo to stop the trace
1045-
is not sufficient because the tracing could have overwritten the data
1046-
that you wanted to record. For this reason, it is sometimes better to
1035+
Note: function tracer uses ring buffers to store the above entries.
1036+
The newest data may overwrite the oldest data. Sometimes using echo to
1037+
stop the trace is not sufficient because the tracing could have overwritten
1038+
the data that you wanted to record. For this reason, it is sometimes better to
10471039
disable tracing directly from a program. This allows you to stop the
10481040
tracing at the point that you hit the part that you are interested in.
10491041
To disable the tracing directly from a C program, something like following
@@ -1077,18 +1069,31 @@ every kernel function, produced by the -pg switch in gcc), starts
10771069
of pointing to a simple return. (Enabling FTRACE will include the
10781070
-pg switch in the compiling of the kernel.)
10791071

1080-
When dynamic ftrace is initialized, it calls kstop_machine to make
1081-
the machine act like a uniprocessor so that it can freely modify code
1082-
without worrying about other processors executing that same code. At
1083-
initialization, the mcount calls are changed to call a "record_ip"
1084-
function. After this, the first time a kernel function is called,
1085-
it has the calling address saved in a hash table.
1086-
1087-
Later on the ftraced kernel thread is awoken and will again call
1088-
kstop_machine if new functions have been recorded. The ftraced thread
1089-
will change all calls to mcount to "nop". Just calling mcount
1090-
and having mcount return has shown a 10% overhead. By converting
1091-
it to a nop, there is no measurable overhead to the system.
1072+
At compile time every C file object is run through the
1073+
recordmcount.pl script (located in the scripts directory). This
1074+
script will process the C object using objdump to find all the
1075+
locations in the .text section that call mcount. (Note, only
1076+
the .text section is processed, since processing other sections
1077+
like .init.text may cause races due to those sections being freed).
1078+
1079+
A new section called "__mcount_loc" is created that holds references
1080+
to all the mcount call sites in the .text section. This section is
1081+
compiled back into the original object. The final linker will add
1082+
all these references into a single table.
1083+
1084+
On boot up, before SMP is initialized, the dynamic ftrace code
1085+
scans this table and updates all the locations into nops. It also
1086+
records the locations, which are added to the available_filter_functions
1087+
list. Modules are processed as they are loaded and before they are
1088+
executed. When a module is unloaded, it also removes its functions from
1089+
the ftrace function list. This is automatic in the module unload
1090+
code, and the module author does not need to worry about it.
1091+
1092+
When tracing is enabled, kstop_machine is called to prevent races
1093+
with the CPUS executing code being modified (which can cause the
1094+
CPU to do undesireable things), and the nops are patched back
1095+
to calls. But this time, they do not call mcount (which is just
1096+
a function stub). They now call into the ftrace infrastructure.
10921097

10931098
One special side-effect to the recording of the functions being
10941099
traced is that we can now selectively choose which functions we
@@ -1251,36 +1256,6 @@ Produces:
12511256

12521257
We can see that there's no more lock or preempt tracing.
12531258

1254-
ftraced
1255-
-------
1256-
1257-
As mentioned above, when dynamic ftrace is configured in, a kernel
1258-
thread wakes up once a second and checks to see if there are mcount
1259-
calls that need to be converted into nops. If there are not any, then
1260-
it simply goes back to sleep. But if there are some, it will call
1261-
kstop_machine to convert the calls to nops.
1262-
1263-
There may be a case in which you do not want this added latency.
1264-
Perhaps you are doing some audio recording and this activity might
1265-
cause skips in the playback. There is an interface to disable
1266-
and enable the "ftraced" kernel thread.
1267-
1268-
# echo 0 > /debug/tracing/ftraced_enabled
1269-
1270-
This will disable the calling of kstop_machine to update the
1271-
mcount calls to nops. Remember that there is a large overhead
1272-
to calling mcount. Without this kernel thread, that overhead will
1273-
exist.
1274-
1275-
If there are recorded calls to mcount, any write to the ftraced_enabled
1276-
file will cause the kstop_machine to run. This means that a
1277-
user can manually perform the updates when they want to by simply
1278-
echoing a '0' into the ftraced_enabled file.
1279-
1280-
The updates are also done at the beginning of enabling a tracer
1281-
that uses ftrace function recording.
1282-
1283-
12841259
trace_pipe
12851260
----------
12861261

@@ -1289,14 +1264,14 @@ on the tracing is different. Every read from trace_pipe is consumed.
12891264
This means that subsequent reads will be different. The trace
12901265
is live.
12911266

1292-
# echo ftrace > /debug/tracing/current_tracer
1267+
# echo function > /debug/tracing/current_tracer
12931268
# cat /debug/tracing/trace_pipe > /tmp/trace.out &
12941269
[1] 4153
12951270
# echo 1 > /debug/tracing/tracing_enabled
12961271
# usleep 1
12971272
# echo 0 > /debug/tracing/tracing_enabled
12981273
# cat /debug/tracing/trace
1299-
# tracer: ftrace
1274+
# tracer: function
13001275
#
13011276
# TASK-PID CPU# TIMESTAMP FUNCTION
13021277
# | | | | |
@@ -1317,7 +1292,7 @@ is live.
13171292

13181293
Note, reading the trace_pipe file will block until more input is added.
13191294
By changing the tracer, trace_pipe will issue an EOF. We needed
1320-
to set the ftrace tracer _before_ cating the trace_pipe file.
1295+
to set the function tracer _before_ we "cat" the trace_pipe file.
13211296

13221297

13231298
trace entries
@@ -1334,10 +1309,10 @@ number of entries.
13341309
65620
13351310

13361311
Note, to modify this, you must have tracing completely disabled. To do that,
1337-
echo "none" into the current_tracer. If the current_tracer is not set
1338-
to "none", an EINVAL error will be returned.
1312+
echo "nop" into the current_tracer. If the current_tracer is not set
1313+
to "nop", an EINVAL error will be returned.
13391314

1340-
# echo none > /debug/tracing/current_tracer
1315+
# echo nop > /debug/tracing/current_tracer
13411316
# echo 100000 > /debug/tracing/trace_entries
13421317
# cat /debug/tracing/trace_entries
13431318
100045

0 commit comments

Comments
 (0)