You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts: arch/sparc/Kconfig
This commit is contained in:
@@ -743,3 +743,80 @@ Revised:
|
||||
RCU, realtime RCU, sleepable RCU, performance.
|
||||
"
|
||||
}
|
||||
|
||||
@article{PaulEMcKenney2008RCUOSR
|
||||
,author="Paul E. McKenney and Jonathan Walpole"
|
||||
,title="Introducing technology into the {Linux} kernel: a case study"
|
||||
,Year="2008"
|
||||
,journal="SIGOPS Oper. Syst. Rev."
|
||||
,volume="42"
|
||||
,number="5"
|
||||
,pages="4--17"
|
||||
,issn="0163-5980"
|
||||
,doi={http://doi.acm.org/10.1145/1400097.1400099}
|
||||
,publisher="ACM"
|
||||
,address="New York, NY, USA"
|
||||
,annotation={
|
||||
Linux changed RCU to a far greater degree than RCU has changed Linux.
|
||||
}
|
||||
}
|
||||
|
||||
@unpublished{PaulEMcKenney2008HierarchicalRCU
|
||||
,Author="Paul E. McKenney"
|
||||
,Title="Hierarchical {RCU}"
|
||||
,month="November"
|
||||
,day="3"
|
||||
,year="2008"
|
||||
,note="Available:
|
||||
\url{http://lwn.net/Articles/305782/}
|
||||
[Viewed November 6, 2008]"
|
||||
,annotation="
|
||||
RCU with combining-tree-based grace-period detection,
|
||||
permitting it to handle thousands of CPUs.
|
||||
"
|
||||
}
|
||||
|
||||
@conference{PaulEMcKenney2009MaliciousURCU
|
||||
,Author="Paul E. McKenney"
|
||||
,Title="Using a Malicious User-Level {RCU} to Torture {RCU}-Based Algorithms"
|
||||
,Booktitle="linux.conf.au 2009"
|
||||
,month="January"
|
||||
,year="2009"
|
||||
,address="Hobart, Australia"
|
||||
,note="Available:
|
||||
\url{http://www.rdrop.com/users/paulmck/RCU/urcutorture.2009.01.22a.pdf}
|
||||
[Viewed February 2, 2009]"
|
||||
,annotation="
|
||||
Realtime RCU and torture-testing RCU uses.
|
||||
"
|
||||
}
|
||||
|
||||
@unpublished{MathieuDesnoyers2009URCU
|
||||
,Author="Mathieu Desnoyers"
|
||||
,Title="[{RFC} git tree] Userspace {RCU} (urcu) for {Linux}"
|
||||
,month="February"
|
||||
,day="5"
|
||||
,year="2009"
|
||||
,note="Available:
|
||||
\url{http://lkml.org/lkml/2009/2/5/572}
|
||||
\url{git://lttng.org/userspace-rcu.git}
|
||||
[Viewed February 20, 2009]"
|
||||
,annotation="
|
||||
Mathieu Desnoyers's user-space RCU implementation.
|
||||
git://lttng.org/userspace-rcu.git
|
||||
"
|
||||
}
|
||||
|
||||
@unpublished{PaulEMcKenney2009BloatWatchRCU
|
||||
,Author="Paul E. McKenney"
|
||||
,Title="{RCU}: The {Bloatwatch} Edition"
|
||||
,month="March"
|
||||
,day="17"
|
||||
,year="2009"
|
||||
,note="Available:
|
||||
\url{http://lwn.net/Articles/323929/}
|
||||
[Viewed March 20, 2009]"
|
||||
,annotation="
|
||||
Uniprocessor assumptions allow simplified RCU implementation.
|
||||
"
|
||||
}
|
||||
|
||||
@@ -2,14 +2,13 @@ RCU on Uniprocessor Systems
|
||||
|
||||
|
||||
A common misconception is that, on UP systems, the call_rcu() primitive
|
||||
may immediately invoke its function, and that the synchronize_rcu()
|
||||
primitive may return immediately. The basis of this misconception
|
||||
may immediately invoke its function. The basis of this misconception
|
||||
is that since there is only one CPU, it should not be necessary to
|
||||
wait for anything else to get done, since there are no other CPUs for
|
||||
anything else to be happening on. Although this approach will -sort- -of-
|
||||
work a surprising amount of the time, it is a very bad idea in general.
|
||||
This document presents three examples that demonstrate exactly how bad an
|
||||
idea this is.
|
||||
This document presents three examples that demonstrate exactly how bad
|
||||
an idea this is.
|
||||
|
||||
|
||||
Example 1: softirq Suicide
|
||||
@@ -82,11 +81,18 @@ Quick Quiz #2: What locking restriction must RCU callbacks respect?
|
||||
|
||||
Summary
|
||||
|
||||
Permitting call_rcu() to immediately invoke its arguments or permitting
|
||||
synchronize_rcu() to immediately return breaks RCU, even on a UP system.
|
||||
So do not do it! Even on a UP system, the RCU infrastructure -must-
|
||||
respect grace periods, and -must- invoke callbacks from a known environment
|
||||
in which no locks are held.
|
||||
Permitting call_rcu() to immediately invoke its arguments breaks RCU,
|
||||
even on a UP system. So do not do it! Even on a UP system, the RCU
|
||||
infrastructure -must- respect grace periods, and -must- invoke callbacks
|
||||
from a known environment in which no locks are held.
|
||||
|
||||
It -is- safe for synchronize_sched() and synchronize_rcu_bh() to return
|
||||
immediately on an UP system. It is also safe for synchronize_rcu()
|
||||
to return immediately on UP systems, except when running preemptable
|
||||
RCU.
|
||||
|
||||
Quick Quiz #3: Why can't synchronize_rcu() return immediately on
|
||||
UP systems running preemptable RCU?
|
||||
|
||||
|
||||
Answer to Quick Quiz #1:
|
||||
@@ -117,3 +123,13 @@ Answer to Quick Quiz #2:
|
||||
callbacks acquire locks directly. However, a great many RCU
|
||||
callbacks do acquire locks -indirectly-, for example, via
|
||||
the kfree() primitive.
|
||||
|
||||
Answer to Quick Quiz #3:
|
||||
Why can't synchronize_rcu() return immediately on UP systems
|
||||
running preemptable RCU?
|
||||
|
||||
Because some other task might have been preempted in the middle
|
||||
of an RCU read-side critical section. If synchronize_rcu()
|
||||
simply immediately returned, it would prematurely signal the
|
||||
end of the grace period, which would come as a nasty shock to
|
||||
that other thread when it started running again.
|
||||
|
||||
@@ -11,7 +11,10 @@ over a rather long period of time, but improvements are always welcome!
|
||||
structure is updated more than about 10% of the time, then
|
||||
you should strongly consider some other approach, unless
|
||||
detailed performance measurements show that RCU is nonetheless
|
||||
the right tool for the job.
|
||||
the right tool for the job. Yes, you might think of RCU
|
||||
as simply cutting overhead off of the readers and imposing it
|
||||
on the writers. That is exactly why normal uses of RCU will
|
||||
do much more reading than updating.
|
||||
|
||||
Another exception is where performance is not an issue, and RCU
|
||||
provides a simpler implementation. An example of this situation
|
||||
@@ -240,10 +243,11 @@ over a rather long period of time, but improvements are always welcome!
|
||||
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.
|
||||
with softirq disabled, e.g., via spin_lock_irqsave(),
|
||||
spin_lock_bh(), etc. 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.
|
||||
|
||||
13. RCU callbacks can be and are executed in parallel. In many cases,
|
||||
the callback code simply wrappers around kfree(), so that this
|
||||
@@ -310,3 +314,9 @@ over a rather long period of time, but improvements are always welcome!
|
||||
Because these primitives only wait for pre-existing readers,
|
||||
it is the caller's responsibility to guarantee safety to
|
||||
any subsequent readers.
|
||||
|
||||
16. The various RCU read-side primitives do -not- contain memory
|
||||
barriers. The CPU (and in some cases, the compiler) is free
|
||||
to reorder code into and out of RCU read-side critical sections.
|
||||
It is the responsibility of the RCU update-side primitives to
|
||||
deal with this.
|
||||
|
||||
@@ -36,7 +36,7 @@ o How can the updater tell when a grace period has completed
|
||||
executed in user mode, or executed in the idle loop, we can
|
||||
safely free up that item.
|
||||
|
||||
Preemptible variants of RCU (CONFIG_PREEMPT_RCU) get the
|
||||
Preemptible variants of RCU (CONFIG_TREE_PREEMPT_RCU) get the
|
||||
same effect, but require that the readers manipulate CPU-local
|
||||
counters. These counters allow limited types of blocking
|
||||
within RCU read-side critical sections. SRCU also uses
|
||||
@@ -79,10 +79,10 @@ o I hear that RCU is patented? What is with that?
|
||||
o I hear that RCU needs work in order to support realtime kernels?
|
||||
|
||||
This work is largely completed. Realtime-friendly RCU can be
|
||||
enabled via the CONFIG_PREEMPT_RCU kernel configuration parameter.
|
||||
However, work is in progress for enabling priority boosting of
|
||||
preempted RCU read-side critical sections. This is needed if you
|
||||
have CPU-bound realtime threads.
|
||||
enabled via the CONFIG_TREE_PREEMPT_RCU kernel configuration
|
||||
parameter. However, work is in progress for enabling priority
|
||||
boosting of preempted RCU read-side critical sections. This is
|
||||
needed if you have CPU-bound realtime threads.
|
||||
|
||||
o Where can I find more information on RCU?
|
||||
|
||||
|
||||
@@ -170,6 +170,13 @@ module invokes call_rcu() from timers, you will need to first cancel all
|
||||
the timers, and only then invoke rcu_barrier() to wait for any remaining
|
||||
RCU callbacks to complete.
|
||||
|
||||
Of course, if you module uses call_rcu_bh(), you will need to invoke
|
||||
rcu_barrier_bh() before unloading. Similarly, if your module uses
|
||||
call_rcu_sched(), you will need to invoke rcu_barrier_sched() before
|
||||
unloading. If your module uses call_rcu(), call_rcu_bh(), -and-
|
||||
call_rcu_sched(), then you will need to invoke each of rcu_barrier(),
|
||||
rcu_barrier_bh(), and rcu_barrier_sched().
|
||||
|
||||
|
||||
Implementing rcu_barrier()
|
||||
|
||||
|
||||
@@ -76,8 +76,10 @@ torture_type The type of RCU to test: "rcu" for the rcu_read_lock() API,
|
||||
"rcu_sync" for rcu_read_lock() with synchronous reclamation,
|
||||
"rcu_bh" for the rcu_read_lock_bh() API, "rcu_bh_sync" for
|
||||
rcu_read_lock_bh() with synchronous reclamation, "srcu" for
|
||||
the "srcu_read_lock()" API, and "sched" for the use of
|
||||
preempt_disable() together with synchronize_sched().
|
||||
the "srcu_read_lock()" API, "sched" for the use of
|
||||
preempt_disable() together with synchronize_sched(),
|
||||
and "sched_expedited" for the use of preempt_disable()
|
||||
with synchronize_sched_expedited().
|
||||
|
||||
verbose Enable debug printk()s. Default is disabled.
|
||||
|
||||
@@ -162,6 +164,23 @@ of the "old" and "current" counters for the corresponding CPU. The
|
||||
"idx" value maps the "old" and "current" values to the underlying array,
|
||||
and is useful for debugging.
|
||||
|
||||
Similarly, sched_expedited RCU provides the following:
|
||||
|
||||
sched_expedited-torture: rtc: d0000000016c1880 ver: 1090796 tfle: 0 rta: 1090796 rtaf: 0 rtf: 1090787 rtmbe: 0 nt: 27713319
|
||||
sched_expedited-torture: Reader Pipe: 12660320201 95875 0 0 0 0 0 0 0 0 0
|
||||
sched_expedited-torture: Reader Batch: 12660424885 0 0 0 0 0 0 0 0 0 0
|
||||
sched_expedited-torture: Free-Block Circulation: 1090795 1090795 1090794 1090793 1090792 1090791 1090790 1090789 1090788 1090787 0
|
||||
state: -1 / 0:0 3:0 4:0
|
||||
|
||||
As before, the first four lines are similar to those for RCU.
|
||||
The last line shows the task-migration state. The first number is
|
||||
-1 if synchronize_sched_expedited() is idle, -2 if in the process of
|
||||
posting wakeups to the migration kthreads, and N when waiting on CPU N.
|
||||
Each of the colon-separated fields following the "/" is a CPU:state pair.
|
||||
Valid states are "0" for idle, "1" for waiting for quiescent state,
|
||||
"2" for passed through quiescent state, and "3" when a race with a
|
||||
CPU-hotplug event forces use of the synchronize_sched() primitive.
|
||||
|
||||
|
||||
USAGE
|
||||
|
||||
|
||||
@@ -191,8 +191,7 @@ rcu/rcuhier (which displays the struct rcu_node hierarchy).
|
||||
|
||||
The output of "cat rcu/rcudata" looks as follows:
|
||||
|
||||
rcu:
|
||||
rcu:
|
||||
rcu_sched:
|
||||
0 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=10951/1 dn=0 df=1101 of=0 ri=36 ql=0 b=10
|
||||
1 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=16117/1 dn=0 df=1015 of=0 ri=0 ql=0 b=10
|
||||
2 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=1445/1 dn=0 df=1839 of=0 ri=0 ql=0 b=10
|
||||
@@ -306,7 +305,7 @@ comma-separated-variable spreadsheet format.
|
||||
|
||||
The output of "cat rcu/rcugp" looks as follows:
|
||||
|
||||
rcu: completed=33062 gpnum=33063
|
||||
rcu_sched: completed=33062 gpnum=33063
|
||||
rcu_bh: completed=464 gpnum=464
|
||||
|
||||
Again, this output is for both "rcu" and "rcu_bh". The fields are
|
||||
@@ -413,7 +412,7 @@ o Each element of the form "1/1 0:127 ^0" represents one struct
|
||||
|
||||
The output of "cat rcu/rcu_pending" looks as follows:
|
||||
|
||||
rcu:
|
||||
rcu_sched:
|
||||
0 np=255892 qsp=53936 cbr=0 cng=14417 gpc=10033 gps=24320 nf=6445 nn=146741
|
||||
1 np=261224 qsp=54638 cbr=0 cng=25723 gpc=16310 gps=2849 nf=5912 nn=155792
|
||||
2 np=237496 qsp=49664 cbr=0 cng=2762 gpc=45478 gps=1762 nf=1201 nn=136629
|
||||
|
||||
@@ -136,10 +136,10 @@ rcu_read_lock()
|
||||
Used by a reader to inform the reclaimer that the reader is
|
||||
entering an RCU read-side critical section. It is illegal
|
||||
to block while in an RCU read-side critical section, though
|
||||
kernels built with CONFIG_PREEMPT_RCU can preempt RCU read-side
|
||||
critical sections. Any RCU-protected data structure accessed
|
||||
during an RCU read-side critical section is guaranteed to remain
|
||||
unreclaimed for the full duration of that critical section.
|
||||
kernels built with CONFIG_TREE_PREEMPT_RCU can preempt RCU
|
||||
read-side critical sections. Any RCU-protected data structure
|
||||
accessed during an RCU read-side critical section is guaranteed to
|
||||
remain unreclaimed for the full duration of that critical section.
|
||||
Reference counts may be used in conjunction with RCU to maintain
|
||||
longer-term references to data structures.
|
||||
|
||||
@@ -785,6 +785,7 @@ RCU pointer/list traversal:
|
||||
rcu_dereference
|
||||
list_for_each_entry_rcu
|
||||
hlist_for_each_entry_rcu
|
||||
hlist_nulls_for_each_entry_rcu
|
||||
|
||||
list_for_each_continue_rcu (to be deprecated in favor of new
|
||||
list_for_each_entry_continue_rcu)
|
||||
@@ -807,19 +808,23 @@ RCU: Critical sections Grace period Barrier
|
||||
|
||||
rcu_read_lock synchronize_net rcu_barrier
|
||||
rcu_read_unlock synchronize_rcu
|
||||
synchronize_rcu_expedited
|
||||
call_rcu
|
||||
|
||||
|
||||
bh: Critical sections Grace period Barrier
|
||||
|
||||
rcu_read_lock_bh call_rcu_bh rcu_barrier_bh
|
||||
rcu_read_unlock_bh
|
||||
rcu_read_unlock_bh synchronize_rcu_bh
|
||||
synchronize_rcu_bh_expedited
|
||||
|
||||
|
||||
sched: Critical sections Grace period Barrier
|
||||
|
||||
[preempt_disable] synchronize_sched rcu_barrier_sched
|
||||
[and friends] call_rcu_sched
|
||||
rcu_read_lock_sched synchronize_sched rcu_barrier_sched
|
||||
rcu_read_unlock_sched call_rcu_sched
|
||||
[preempt_disable] synchronize_sched_expedited
|
||||
[and friends]
|
||||
|
||||
|
||||
SRCU: Critical sections Grace period Barrier
|
||||
@@ -827,6 +832,9 @@ SRCU: Critical sections Grace period Barrier
|
||||
srcu_read_lock synchronize_srcu N/A
|
||||
srcu_read_unlock
|
||||
|
||||
SRCU: Initialization/cleanup
|
||||
init_srcu_struct
|
||||
cleanup_srcu_struct
|
||||
|
||||
See the comment headers in the source code (or the docbook generated
|
||||
from them) for more information.
|
||||
|
||||
@@ -206,24 +206,6 @@ Who: Len Brown <len.brown@intel.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: libata spindown skipping and warning
|
||||
When: Dec 2008
|
||||
Why: Some halt(8) implementations synchronize caches for and spin
|
||||
down libata disks because libata didn't use to spin down disk on
|
||||
system halt (only synchronized caches).
|
||||
Spin down on system halt is now implemented. sysfs node
|
||||
/sys/class/scsi_disk/h:c:i:l/manage_start_stop is present if
|
||||
spin down support is available.
|
||||
Because issuing spin down command to an already spun down disk
|
||||
makes some disks spin up just to spin down again, libata tracks
|
||||
device spindown status to skip the extra spindown command and
|
||||
warn about it.
|
||||
This is to give userspace tools the time to get updated and will
|
||||
be removed after userspace is reasonably updated.
|
||||
Who: Tejun Heo <htejun@gmail.com>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: i386/x86_64 bzImage symlinks
|
||||
When: April 2010
|
||||
|
||||
@@ -394,15 +376,6 @@ Who: Thomas Gleixner <tglx@linutronix.de>
|
||||
|
||||
-----------------------------
|
||||
|
||||
What: obsolete generic irq defines and typedefs
|
||||
When: 2.6.30
|
||||
Why: The defines and typedefs (hw_interrupt_type, no_irq_type, irq_desc_t)
|
||||
have been kept around for migration reasons. After more than two years
|
||||
it's time to remove them finally
|
||||
Who: Thomas Gleixner <tglx@linutronix.de>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: fakephp and associated sysfs files in /sys/bus/pci/slots/
|
||||
When: 2011
|
||||
Why: In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to
|
||||
@@ -468,3 +441,27 @@ Why: cpu_policy_rwsem has a new cleaner definition making it local to
|
||||
cpufreq core and contained inside cpufreq.c. Other dependent
|
||||
drivers should not use it in order to safely avoid lockdep issues.
|
||||
Who: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
|
||||
|
||||
----------------------------
|
||||
|
||||
What: sound-slot/service-* module aliases and related clutters in
|
||||
sound/sound_core.c
|
||||
When: August 2010
|
||||
Why: OSS sound_core grabs all legacy minors (0-255) of SOUND_MAJOR
|
||||
(14) and requests modules using custom sound-slot/service-*
|
||||
module aliases. The only benefit of doing this is allowing
|
||||
use of custom module aliases which might as well be considered
|
||||
a bug at this point. This preemptive claiming prevents
|
||||
alternative OSS implementations.
|
||||
|
||||
Till the feature is removed, the kernel will be requesting
|
||||
both sound-slot/service-* and the standard char-major-* module
|
||||
aliases and allow turning off the pre-claiming selectively via
|
||||
CONFIG_SOUND_OSS_CORE_PRECLAIM and soundcore.preclaim_oss
|
||||
kernel parameter.
|
||||
|
||||
After the transition phase is complete, both the custom module
|
||||
aliases and switches to disable it will go away. This removal
|
||||
will also allow making ALSA OSS emulation independent of
|
||||
sound_core. The dependency will be broken then too.
|
||||
Who: Tejun Heo <tj@kernel.org>
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
|
||||
The NFS client
|
||||
==============
|
||||
|
||||
The NFS version 2 protocol was first documented in RFC1094 (March 1989).
|
||||
Since then two more major releases of NFS have been published, with NFSv3
|
||||
being documented in RFC1813 (June 1995), and NFSv4 in RFC3530 (April
|
||||
2003).
|
||||
|
||||
The Linux NFS client currently supports all the above published versions,
|
||||
and work is in progress on adding support for minor version 1 of the NFSv4
|
||||
protocol.
|
||||
|
||||
The purpose of this document is to provide information on some of the
|
||||
upcall interfaces that are used in order to provide the NFS client with
|
||||
some of the information that it requires in order to fully comply with
|
||||
the NFS spec.
|
||||
|
||||
The DNS resolver
|
||||
================
|
||||
|
||||
NFSv4 allows for one server to refer the NFS client to data that has been
|
||||
migrated onto another server by means of the special "fs_locations"
|
||||
attribute. See
|
||||
http://tools.ietf.org/html/rfc3530#section-6
|
||||
and
|
||||
http://tools.ietf.org/html/draft-ietf-nfsv4-referrals-00
|
||||
|
||||
The fs_locations information can take the form of either an ip address and
|
||||
a path, or a DNS hostname and a path. The latter requires the NFS client to
|
||||
do a DNS lookup in order to mount the new volume, and hence the need for an
|
||||
upcall to allow userland to provide this service.
|
||||
|
||||
Assuming that the user has the 'rpc_pipefs' filesystem mounted in the usual
|
||||
/var/lib/nfs/rpc_pipefs, the upcall consists of the following steps:
|
||||
|
||||
(1) The process checks the dns_resolve cache to see if it contains a
|
||||
valid entry. If so, it returns that entry and exits.
|
||||
|
||||
(2) If no valid entry exists, the helper script '/sbin/nfs_cache_getent'
|
||||
(may be changed using the 'nfs.cache_getent' kernel boot parameter)
|
||||
is run, with two arguments:
|
||||
- the cache name, "dns_resolve"
|
||||
- the hostname to resolve
|
||||
|
||||
(3) After looking up the corresponding ip address, the helper script
|
||||
writes the result into the rpc_pipefs pseudo-file
|
||||
'/var/lib/nfs/rpc_pipefs/cache/dns_resolve/channel'
|
||||
in the following (text) format:
|
||||
|
||||
"<ip address> <hostname> <ttl>\n"
|
||||
|
||||
Where <ip address> is in the usual IPv4 (123.456.78.90) or IPv6
|
||||
(ffee:ddcc:bbaa:9988:7766:5544:3322:1100, ffee::1100, ...) format.
|
||||
<hostname> is identical to the second argument of the helper
|
||||
script, and <ttl> is the 'time to live' of this cache entry (in
|
||||
units of seconds).
|
||||
|
||||
Note: If <ip address> is invalid, say the string "0", then a negative
|
||||
entry is created, which will cause the kernel to treat the hostname
|
||||
as having no valid DNS translation.
|
||||
|
||||
|
||||
|
||||
|
||||
A basic sample /sbin/nfs_cache_getent
|
||||
=====================================
|
||||
|
||||
#!/bin/bash
|
||||
#
|
||||
ttl=600
|
||||
#
|
||||
cut=/usr/bin/cut
|
||||
getent=/usr/bin/getent
|
||||
rpc_pipefs=/var/lib/nfs/rpc_pipefs
|
||||
#
|
||||
die()
|
||||
{
|
||||
echo "Usage: $0 cache_name entry_name"
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ $# -lt 2 ] && die
|
||||
cachename="$1"
|
||||
cache_path=${rpc_pipefs}/cache/${cachename}/channel
|
||||
|
||||
case "${cachename}" in
|
||||
dns_resolve)
|
||||
name="$2"
|
||||
result="$(${getent} hosts ${name} | ${cut} -f1 -d\ )"
|
||||
[ -z "${result}" ] && result="0"
|
||||
;;
|
||||
*)
|
||||
die
|
||||
;;
|
||||
esac
|
||||
echo "${result} ${name} ${ttl}" >${cache_path}
|
||||
|
||||
@@ -1503,6 +1503,14 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
[NFS] set the TCP port on which the NFSv4 callback
|
||||
channel should listen.
|
||||
|
||||
nfs.cache_getent=
|
||||
[NFS] sets the pathname to the program which is used
|
||||
to update the NFS client cache entries.
|
||||
|
||||
nfs.cache_getent_timeout=
|
||||
[NFS] sets the timeout after which an attempt to
|
||||
update a cache entry is deemed to have failed.
|
||||
|
||||
nfs.idmap_cache_timeout=
|
||||
[NFS] set the maximum lifetime for idmapper cache
|
||||
entries.
|
||||
@@ -2395,6 +2403,18 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
stifb= [HW]
|
||||
Format: bpp:<bpp1>[:<bpp2>[:<bpp3>...]]
|
||||
|
||||
sunrpc.min_resvport=
|
||||
sunrpc.max_resvport=
|
||||
[NFS,SUNRPC]
|
||||
SunRPC servers often require that client requests
|
||||
originate from a privileged port (i.e. a port in the
|
||||
range 0 < portnr < 1024).
|
||||
An administrator who wishes to reserve some of these
|
||||
ports for other uses may adjust the range that the
|
||||
kernel's sunrpc client considers to be privileged
|
||||
using these two parameters to set the minimum and
|
||||
maximum port values.
|
||||
|
||||
sunrpc.pool_mode=
|
||||
[NFS]
|
||||
Control how the NFS server code allocates CPUs to
|
||||
@@ -2411,6 +2431,15 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
pernode one pool for each NUMA node (equivalent
|
||||
to global on non-NUMA machines)
|
||||
|
||||
sunrpc.tcp_slot_table_entries=
|
||||
sunrpc.udp_slot_table_entries=
|
||||
[NFS,SUNRPC]
|
||||
Sets the upper limit on the number of simultaneous
|
||||
RPC calls that can be sent from the client to a
|
||||
server. Increasing these values may allow you to
|
||||
improve throughput, but will also increase the
|
||||
amount of memory reserved for use by the client.
|
||||
|
||||
swiotlb= [IA-64] Number of I/O TLB slabs
|
||||
|
||||
switches= [HW,M68k]
|
||||
@@ -2480,6 +2509,11 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
trace_buf_size=nn[KMG]
|
||||
[FTRACE] will set tracing buffer size.
|
||||
|
||||
trace_event=[event-list]
|
||||
[FTRACE] Set and start specified trace events in order
|
||||
to facilitate early boot debugging.
|
||||
See also Documentation/trace/events.txt
|
||||
|
||||
trix= [HW,OSS] MediaTrix AudioTrix Pro
|
||||
Format:
|
||||
<io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
|
||||
|
||||
+38
-1
@@ -26,7 +26,7 @@ This document has the following sections:
|
||||
- Notes on accessing payload contents
|
||||
- Defining a key type
|
||||
- Request-key callback service
|
||||
- Key access filesystem
|
||||
- Garbage collection
|
||||
|
||||
|
||||
============
|
||||
@@ -113,6 +113,9 @@ Each key has a number of attributes:
|
||||
|
||||
(*) Dead. The key's type was unregistered, and so the key is now useless.
|
||||
|
||||
Keys in the last three states are subject to garbage collection. See the
|
||||
section on "Garbage collection".
|
||||
|
||||
|
||||
====================
|
||||
KEY SERVICE OVERVIEW
|
||||
@@ -754,6 +757,26 @@ The keyctl syscall functions are:
|
||||
successful.
|
||||
|
||||
|
||||
(*) Install the calling process's session keyring on its parent.
|
||||
|
||||
long keyctl(KEYCTL_SESSION_TO_PARENT);
|
||||
|
||||
This functions attempts to install the calling process's session keyring
|
||||
on to the calling process's parent, replacing the parent's current session
|
||||
keyring.
|
||||
|
||||
The calling process must have the same ownership as its parent, the
|
||||
keyring must have the same ownership as the calling process, the calling
|
||||
process must have LINK permission on the keyring and the active LSM module
|
||||
mustn't deny permission, otherwise error EPERM will be returned.
|
||||
|
||||
Error ENOMEM will be returned if there was insufficient memory to complete
|
||||
the operation, otherwise 0 will be returned to indicate success.
|
||||
|
||||
The keyring will be replaced next time the parent process leaves the
|
||||
kernel and resumes executing userspace.
|
||||
|
||||
|
||||
===============
|
||||
KERNEL SERVICES
|
||||
===============
|
||||
@@ -1231,3 +1254,17 @@ by executing:
|
||||
|
||||
In this case, the program isn't required to actually attach the key to a ring;
|
||||
the rings are provided for reference.
|
||||
|
||||
|
||||
==================
|
||||
GARBAGE COLLECTION
|
||||
==================
|
||||
|
||||
Dead keys (for which the type has been removed) will be automatically unlinked
|
||||
from those keyrings that point to them and deleted as soon as possible by a
|
||||
background garbage collector.
|
||||
|
||||
Similarly, revoked and expired keys will be garbage collected, but only after a
|
||||
certain amount of time has passed. This time is set as a number of seconds in:
|
||||
|
||||
/proc/sys/kernel/keys/gc_delay
|
||||
|
||||
@@ -27,6 +27,13 @@ To trigger an intermediate memory scan:
|
||||
|
||||
# echo scan > /sys/kernel/debug/kmemleak
|
||||
|
||||
To clear the list of all current possible memory leaks:
|
||||
|
||||
# echo clear > /sys/kernel/debug/kmemleak
|
||||
|
||||
New leaks will then come up upon reading /sys/kernel/debug/kmemleak
|
||||
again.
|
||||
|
||||
Note that the orphan objects are listed in the order they were allocated
|
||||
and one object at the beginning of the list may cause other subsequent
|
||||
objects to be reported as orphan.
|
||||
@@ -42,6 +49,9 @@ Memory scanning parameters can be modified at run-time by writing to the
|
||||
scan=<secs> - set the automatic memory scanning period in seconds
|
||||
(default 600, 0 to stop the automatic scanning)
|
||||
scan - trigger a memory scan
|
||||
clear - clear list of current memory leak suspects, done by
|
||||
marking all current reported unreferenced objects grey
|
||||
dump=<addr> - dump information about the object found at <addr>
|
||||
|
||||
Kmemleak can also be disabled at boot-time by passing "kmemleak=off" on
|
||||
the kernel command line.
|
||||
@@ -86,6 +96,27 @@ avoid this, kmemleak can also store the number of values pointing to an
|
||||
address inside the block address range that need to be found so that the
|
||||
block is not considered a leak. One example is __vmalloc().
|
||||
|
||||
Testing specific sections with kmemleak
|
||||
---------------------------------------
|
||||
|
||||
Upon initial bootup your /sys/kernel/debug/kmemleak output page may be
|
||||
quite extensive. This can also be the case if you have very buggy code
|
||||
when doing development. To work around these situations you can use the
|
||||
'clear' command to clear all reported unreferenced objects from the
|
||||
/sys/kernel/debug/kmemleak output. By issuing a 'scan' after a 'clear'
|
||||
you can find new unreferenced objects; this should help with testing
|
||||
specific sections of code.
|
||||
|
||||
To test a critical section on demand with a clean kmemleak do:
|
||||
|
||||
# echo clear > /sys/kernel/debug/kmemleak
|
||||
... test your kernel or modules ...
|
||||
# echo scan > /sys/kernel/debug/kmemleak
|
||||
|
||||
Then as usual to get your report with:
|
||||
|
||||
# cat /sys/kernel/debug/kmemleak
|
||||
|
||||
Kmemleak API
|
||||
------------
|
||||
|
||||
|
||||
@@ -495,6 +495,13 @@ and for each vararg a long value. So e.g. for a debug entry with a format
|
||||
string plus two varargs one would need to allocate a (3 * sizeof(long))
|
||||
byte data area in the debug_register() function.
|
||||
|
||||
IMPORTANT: Using "%s" in sprintf event functions is dangerous. You can only
|
||||
use "%s" in the sprintf event functions, if the memory for the passed string is
|
||||
available as long as the debug feature exists. The reason behind this is that
|
||||
due to performance considerations only a pointer to the string is stored in
|
||||
the debug feature. If you log a string that is freed afterwards, you will get
|
||||
an OOPS when inspecting the debug feature, because then the debug feature will
|
||||
access the already freed memory.
|
||||
|
||||
NOTE: If using the sprintf view do NOT use other event/exception functions
|
||||
than the sprintf-event and -exception functions.
|
||||
|
||||
@@ -60,6 +60,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
slots - Reserve the slot index for the given driver.
|
||||
This option takes multiple strings.
|
||||
See "Module Autoloading Support" section for details.
|
||||
debug - Specifies the debug message level
|
||||
(0 = disable debug prints, 1 = normal debug messages,
|
||||
2 = verbose debug messages)
|
||||
This option appears only when CONFIG_SND_DEBUG=y.
|
||||
This option can be dynamically changed via sysfs
|
||||
/sys/modules/snd/parameters/debug file.
|
||||
|
||||
Module snd-pcm-oss
|
||||
------------------
|
||||
@@ -513,6 +519,26 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
or input, but you may use this module for any application which
|
||||
requires a sound card (like RealPlayer).
|
||||
|
||||
pcm_devs - Number of PCM devices assigned to each card
|
||||
(default = 1, up to 4)
|
||||
pcm_substreams - Number of PCM substreams assigned to each PCM
|
||||
(default = 8, up to 16)
|
||||
hrtimer - Use hrtimer (=1, default) or system timer (=0)
|
||||
fake_buffer - Fake buffer allocations (default = 1)
|
||||
|
||||
When multiple PCM devices are created, snd-dummy gives different
|
||||
behavior to each PCM device:
|
||||
0 = interleaved with mmap support
|
||||
1 = non-interleaved with mmap support
|
||||
2 = interleaved without mmap
|
||||
3 = non-interleaved without mmap
|
||||
|
||||
As default, snd-dummy drivers doesn't allocate the real buffers
|
||||
but either ignores read/write or mmap a single dummy page to all
|
||||
buffer pages, in order to save the resouces. If your apps need
|
||||
the read/ written buffer data to be consistent, pass fake_buffer=0
|
||||
option.
|
||||
|
||||
The power-management is supported.
|
||||
|
||||
Module snd-echo3g
|
||||
@@ -768,6 +794,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
||||
bdl_pos_adj - Specifies the DMA IRQ timing delay in samples.
|
||||
Passing -1 will make the driver to choose the appropriate
|
||||
value based on the controller chip.
|
||||
patch - Specifies the early "patch" files to modify the HD-audio
|
||||
setup before initializing the codecs. This option is
|
||||
available only when CONFIG_SND_HDA_PATCH_LOADER=y is set.
|
||||
See HD-Audio.txt for details.
|
||||
|
||||
[Single (global) options]
|
||||
single_cmd - Use single immediate commands to communicate with
|
||||
|
||||
@@ -114,8 +114,8 @@ ALC662/663/272
|
||||
samsung-nc10 Samsung NC10 mini notebook
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC882/885
|
||||
==========
|
||||
ALC882/883/885/888/889
|
||||
======================
|
||||
3stack-dig 3-jack with SPDIF I/O
|
||||
6stack-dig 6-jack digital with SPDIF I/O
|
||||
arima Arima W820Di1
|
||||
@@ -127,12 +127,8 @@ ALC882/885
|
||||
mbp3 Macbook Pro rev3
|
||||
imac24 iMac 24'' with jack detection
|
||||
w2jc ASUS W2JC
|
||||
auto auto-config reading BIOS (default)
|
||||
|
||||
ALC883/888
|
||||
==========
|
||||
3stack-dig 3-jack with SPDIF I/O
|
||||
6stack-dig 6-jack digital with SPDIF I/O
|
||||
3stack-2ch-dig 3-jack with SPDIF I/O (ALC883)
|
||||
alc883-6stack-dig 6-jack digital with SPDIF I/O (ALC883)
|
||||
3stack-6ch 3-jack 6-channel
|
||||
3stack-6ch-dig 3-jack 6-channel with SPDIF I/O
|
||||
6stack-dig-demo 6-jack digital for Intel demo board
|
||||
@@ -140,6 +136,7 @@ ALC883/888
|
||||
acer-aspire Acer Aspire 9810
|
||||
acer-aspire-4930g Acer Aspire 4930G
|
||||
acer-aspire-6530g Acer Aspire 6530G
|
||||
acer-aspire-7730g Acer Aspire 7730G
|
||||
acer-aspire-8930g Acer Aspire 8930G
|
||||
medion Medion Laptops
|
||||
medion-md2 Medion MD2
|
||||
@@ -155,10 +152,13 @@ ALC883/888
|
||||
3stack-hp HP machines with 3stack (Lucknow, Samba boards)
|
||||
6stack-dell Dell machines with 6stack (Inspiron 530)
|
||||
mitac Mitac 8252D
|
||||
clevo-m540r Clevo M540R (6ch + digital)
|
||||
clevo-m720 Clevo M720 laptop series
|
||||
fujitsu-pi2515 Fujitsu AMILO Pi2515
|
||||
fujitsu-xa3530 Fujitsu AMILO XA3530
|
||||
3stack-6ch-intel Intel DG33* boards
|
||||
intel-alc889a Intel IbexPeak with ALC889A
|
||||
intel-x58 Intel DX58 with ALC889
|
||||
asus-p5q ASUS P5Q-EM boards
|
||||
mb31 MacBook 3,1
|
||||
sony-vaio-tt Sony VAIO TT
|
||||
@@ -229,7 +229,7 @@ AD1984
|
||||
======
|
||||
basic default configuration
|
||||
thinkpad Lenovo Thinkpad T61/X61
|
||||
dell Dell T3400
|
||||
dell_desktop Dell T3400
|
||||
|
||||
AD1986A
|
||||
=======
|
||||
@@ -258,6 +258,7 @@ Conexant 5045
|
||||
laptop-micsense Laptop with Mic sense (old model fujitsu)
|
||||
laptop-hpmicsense Laptop with HP and Mic senses
|
||||
benq Benq R55E
|
||||
laptop-hp530 HP 530 laptop
|
||||
test for testing/debugging purpose, almost all controls
|
||||
can be adjusted. Appearing only when compiled with
|
||||
$CONFIG_SND_DEBUG=y
|
||||
@@ -278,9 +279,16 @@ Conexant 5051
|
||||
hp-dv6736 HP dv6736
|
||||
lenovo-x200 Lenovo X200 laptop
|
||||
|
||||
Conexant 5066
|
||||
=============
|
||||
laptop Basic Laptop config (default)
|
||||
dell-laptop Dell laptops
|
||||
olpc-xo-1_5 OLPC XO 1.5
|
||||
|
||||
STAC9200
|
||||
========
|
||||
ref Reference board
|
||||
oqo OQO Model 2
|
||||
dell-d21 Dell (unknown)
|
||||
dell-d22 Dell (unknown)
|
||||
dell-d23 Dell (unknown)
|
||||
@@ -368,10 +376,12 @@ STAC92HD73*
|
||||
===========
|
||||
ref Reference board
|
||||
no-jd BIOS setup but without jack-detection
|
||||
intel Intel DG45* mobos
|
||||
dell-m6-amic Dell desktops/laptops with analog mics
|
||||
dell-m6-dmic Dell desktops/laptops with digital mics
|
||||
dell-m6 Dell desktops/laptops with both type of mics
|
||||
dell-eq Dell desktops/laptops
|
||||
alienware Alienware M17x
|
||||
auto BIOS setup (default)
|
||||
|
||||
STAC92HD83*
|
||||
@@ -385,3 +395,8 @@ STAC9872
|
||||
========
|
||||
vaio VAIO laptop without SPDIF
|
||||
auto BIOS setup (default)
|
||||
|
||||
Cirrus Logic CS4206/4207
|
||||
========================
|
||||
mbp55 MacBook Pro 5,5
|
||||
auto BIOS setup (default)
|
||||
|
||||
@@ -138,6 +138,10 @@ override the BIOS setup or to provide more comprehensive features.
|
||||
The driver checks PCI SSID and looks through the static configuration
|
||||
table until any matching entry is found. If you have a new machine,
|
||||
you may see a message like below:
|
||||
------------------------------------------------------------------------
|
||||
hda_codec: ALC880: BIOS auto-probing.
|
||||
------------------------------------------------------------------------
|
||||
Meanwhile, in the earlier versions, you would see a message like:
|
||||
------------------------------------------------------------------------
|
||||
hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...
|
||||
------------------------------------------------------------------------
|
||||
@@ -403,6 +407,66 @@ re-configure based on that state, run like below:
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
Early Patching
|
||||
~~~~~~~~~~~~~~
|
||||
When CONFIG_SND_HDA_PATCH_LOADER=y is set, you can pass a "patch" as a
|
||||
firmware file for modifying the HD-audio setup before initializing the
|
||||
codec. This can work basically like the reconfiguration via sysfs in
|
||||
the above, but it does it before the first codec configuration.
|
||||
|
||||
A patch file is a plain text file which looks like below:
|
||||
|
||||
------------------------------------------------------------------------
|
||||
[codec]
|
||||
0x12345678 0xabcd1234 2
|
||||
|
||||
[model]
|
||||
auto
|
||||
|
||||
[pincfg]
|
||||
0x12 0x411111f0
|
||||
|
||||
[verb]
|
||||
0x20 0x500 0x03
|
||||
0x20 0x400 0xff
|
||||
|
||||
[hint]
|
||||
hp_detect = yes
|
||||
------------------------------------------------------------------------
|
||||
|
||||
The file needs to have a line `[codec]`. The next line should contain
|
||||
three numbers indicating the codec vendor-id (0x12345678 in the
|
||||
example), the codec subsystem-id (0xabcd1234) and the address (2) of
|
||||
the codec. The rest patch entries are applied to this specified codec
|
||||
until another codec entry is given.
|
||||
|
||||
The `[model]` line allows to change the model name of the each codec.
|
||||
In the example above, it will be changed to model=auto.
|
||||
Note that this overrides the module option.
|
||||
|
||||
After the `[pincfg]` line, the contents are parsed as the initial
|
||||
default pin-configurations just like `user_pin_configs` sysfs above.
|
||||
The values can be shown in user_pin_configs sysfs file, too.
|
||||
|
||||
Similarly, the lines after `[verb]` are parsed as `init_verbs`
|
||||
sysfs entries, and the lines after `[hint]` are parsed as `hints`
|
||||
sysfs entries, respectively.
|
||||
|
||||
The hd-audio driver reads the file via request_firmware(). Thus,
|
||||
a patch file has to be located on the appropriate firmware path,
|
||||
typically, /lib/firmware. For example, when you pass the option
|
||||
`patch=hda-init.fw`, the file /lib/firmware/hda-init-fw must be
|
||||
present.
|
||||
|
||||
The patch module option is specific to each card instance, and you
|
||||
need to give one file name for each instance, separated by commas.
|
||||
For example, if you have two cards, one for an on-board analog and one
|
||||
for an HDMI video board, you may pass patch option like below:
|
||||
------------------------------------------------------------------------
|
||||
options snd-hda-intel patch=on-board-patch,hdmi-patch
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
Power-Saving
|
||||
~~~~~~~~~~~~
|
||||
The power-saving is a kind of auto-suspend of the device. When the
|
||||
|
||||
@@ -19,6 +19,7 @@ Currently, these files might (depending on your configuration)
|
||||
show up in /proc/sys/kernel:
|
||||
- acpi_video_flags
|
||||
- acct
|
||||
- callhome [ S390 only ]
|
||||
- auto_msgmni
|
||||
- core_pattern
|
||||
- core_uses_pid
|
||||
@@ -91,6 +92,21 @@ valid for 30 seconds.
|
||||
|
||||
==============================================================
|
||||
|
||||
callhome:
|
||||
|
||||
Controls the kernel's callhome behavior in case of a kernel panic.
|
||||
|
||||
The s390 hardware allows an operating system to send a notification
|
||||
to a service organization (callhome) in case of an operating system panic.
|
||||
|
||||
When the value in this file is 0 (which is the default behavior)
|
||||
nothing happens in case of a kernel panic. If this value is set to "1"
|
||||
the complete kernel oops message is send to the IBM customer service
|
||||
organization in case the mainframe the Linux operating system is running
|
||||
on has a service contract with IBM.
|
||||
|
||||
==============================================================
|
||||
|
||||
core_pattern:
|
||||
|
||||
core_pattern is used to specify a core dumpfile pattern name.
|
||||
|
||||
@@ -83,6 +83,15 @@ When reading one of these enable files, there are four results:
|
||||
X - there is a mixture of events enabled and disabled
|
||||
? - this file does not affect any event
|
||||
|
||||
2.3 Boot option
|
||||
---------------
|
||||
|
||||
In order to facilitate early boot debugging, use boot option:
|
||||
|
||||
trace_event=[event-list]
|
||||
|
||||
The format of this boot option is the same as described in section 2.1.
|
||||
|
||||
3. Defining an event-enabled tracepoint
|
||||
=======================================
|
||||
|
||||
|
||||
@@ -85,26 +85,19 @@ of ftrace. Here is a list of some of the key files:
|
||||
This file holds the output of the trace in a human
|
||||
readable format (described below).
|
||||
|
||||
latency_trace:
|
||||
|
||||
This file shows the same trace but the information
|
||||
is organized more to display possible latencies
|
||||
in the system (described below).
|
||||
|
||||
trace_pipe:
|
||||
|
||||
The output is the same as the "trace" file but this
|
||||
file is meant to be streamed with live tracing.
|
||||
Reads from this file will block until new data
|
||||
is retrieved. Unlike the "trace" and "latency_trace"
|
||||
files, this file is a consumer. This means reading
|
||||
from this file causes sequential reads to display
|
||||
more current data. Once data is read from this
|
||||
file, it is consumed, and will not be read
|
||||
again with a sequential read. The "trace" and
|
||||
"latency_trace" files are static, and if the
|
||||
tracer is not adding more data, they will display
|
||||
the same information every time they are read.
|
||||
Reads from this file will block until new data is
|
||||
retrieved. Unlike the "trace" file, this file is a
|
||||
consumer. This means reading from this file causes
|
||||
sequential reads to display more current data. Once
|
||||
data is read from this file, it is consumed, and
|
||||
will not be read again with a sequential read. The
|
||||
"trace" file is static, and if the tracer is not
|
||||
adding more data,they will display the same
|
||||
information every time they are read.
|
||||
|
||||
trace_options:
|
||||
|
||||
@@ -117,10 +110,10 @@ of ftrace. Here is a list of some of the key files:
|
||||
Some of the tracers record the max latency.
|
||||
For example, the time interrupts are disabled.
|
||||
This time is saved in this file. The max trace
|
||||
will also be stored, and displayed by either
|
||||
"trace" or "latency_trace". A new max trace will
|
||||
only be recorded if the latency is greater than
|
||||
the value in this file. (in microseconds)
|
||||
will also be stored, and displayed by "trace".
|
||||
A new max trace will only be recorded if the
|
||||
latency is greater than the value in this
|
||||
file. (in microseconds)
|
||||
|
||||
buffer_size_kb:
|
||||
|
||||
@@ -210,7 +203,7 @@ Here is the list of current tracers that may be configured.
|
||||
the trace with the longest max latency.
|
||||
See tracing_max_latency. When a new max is recorded,
|
||||
it replaces the old trace. It is best to view this
|
||||
trace via the latency_trace file.
|
||||
trace with the latency-format option enabled.
|
||||
|
||||
"preemptoff"
|
||||
|
||||
@@ -307,8 +300,8 @@ the lowest priority thread (pid 0).
|
||||
Latency trace format
|
||||
--------------------
|
||||
|
||||
For traces that display latency times, the latency_trace file
|
||||
gives somewhat more information to see why a latency happened.
|
||||
When the latency-format option is enabled, the trace file gives
|
||||
somewhat more information to see why a latency happened.
|
||||
Here is a typical trace.
|
||||
|
||||
# tracer: irqsoff
|
||||
@@ -380,9 +373,10 @@ explains which is which.
|
||||
|
||||
The above is mostly meaningful for kernel developers.
|
||||
|
||||
time: This differs from the trace file output. The trace file output
|
||||
includes an absolute timestamp. The timestamp used by the
|
||||
latency_trace file is relative to the start of the trace.
|
||||
time: When the latency-format option is enabled, the trace file
|
||||
output includes a timestamp relative to the start of the
|
||||
trace. This differs from the output when latency-format
|
||||
is disabled, which includes an absolute timestamp.
|
||||
|
||||
delay: This is just to help catch your eye a bit better. And
|
||||
needs to be fixed to be only relative to the same CPU.
|
||||
@@ -440,7 +434,8 @@ Here are the available options:
|
||||
sym-addr:
|
||||
bash-4000 [01] 1477.606694: simple_strtoul <c0339346>
|
||||
|
||||
verbose - This deals with the latency_trace file.
|
||||
verbose - This deals with the trace file when the
|
||||
latency-format option is enabled.
|
||||
|
||||
bash 4000 1 0 00000000 00010a95 [58127d26] 1720.415ms \
|
||||
(+0.000ms): simple_strtoul (strict_strtoul)
|
||||
@@ -472,7 +467,7 @@ Here are the available options:
|
||||
the app is no longer running
|
||||
|
||||
The lookup is performed when you read
|
||||
trace,trace_pipe,latency_trace. Example:
|
||||
trace,trace_pipe. Example:
|
||||
|
||||
a.out-1623 [000] 40874.465068: /root/a.out[+0x480] <-/root/a.out[+0
|
||||
x494] <- /root/a.out[+0x4a8] <- /lib/libc-2.7.so[+0x1e1a6]
|
||||
@@ -481,6 +476,11 @@ x494] <- /root/a.out[+0x4a8] <- /lib/libc-2.7.so[+0x1e1a6]
|
||||
every scheduling event. Will add overhead if
|
||||
there's a lot of tasks running at once.
|
||||
|
||||
latency-format - This option changes the trace. When
|
||||
it is enabled, the trace displays
|
||||
additional information about the
|
||||
latencies, as described in "Latency
|
||||
trace format".
|
||||
|
||||
sched_switch
|
||||
------------
|
||||
@@ -596,12 +596,13 @@ To reset the maximum, echo 0 into tracing_max_latency. Here is
|
||||
an example:
|
||||
|
||||
# echo irqsoff > current_tracer
|
||||
# echo latency-format > trace_options
|
||||
# echo 0 > tracing_max_latency
|
||||
# echo 1 > tracing_enabled
|
||||
# ls -ltr
|
||||
[...]
|
||||
# echo 0 > tracing_enabled
|
||||
# cat latency_trace
|
||||
# cat trace
|
||||
# tracer: irqsoff
|
||||
#
|
||||
irqsoff latency trace v1.1.5 on 2.6.26
|
||||
@@ -703,12 +704,13 @@ which preemption was disabled. The control of preemptoff tracer
|
||||
is much like the irqsoff tracer.
|
||||
|
||||
# echo preemptoff > current_tracer
|
||||
# echo latency-format > trace_options
|
||||
# echo 0 > tracing_max_latency
|
||||
# echo 1 > tracing_enabled
|
||||
# ls -ltr
|
||||
[...]
|
||||
# echo 0 > tracing_enabled
|
||||
# cat latency_trace
|
||||
# cat trace
|
||||
# tracer: preemptoff
|
||||
#
|
||||
preemptoff latency trace v1.1.5 on 2.6.26-rc8
|
||||
@@ -850,12 +852,13 @@ Again, using this trace is much like the irqsoff and preemptoff
|
||||
tracers.
|
||||
|
||||
# echo preemptirqsoff > current_tracer
|
||||
# echo latency-format > trace_options
|
||||
# echo 0 > tracing_max_latency
|
||||
# echo 1 > tracing_enabled
|
||||
# ls -ltr
|
||||
[...]
|
||||
# echo 0 > tracing_enabled
|
||||
# cat latency_trace
|
||||
# cat trace
|
||||
# tracer: preemptirqsoff
|
||||
#
|
||||
preemptirqsoff latency trace v1.1.5 on 2.6.26-rc8
|
||||
@@ -1012,11 +1015,12 @@ Instead of performing an 'ls', we will run 'sleep 1' under
|
||||
'chrt' which changes the priority of the task.
|
||||
|
||||
# echo wakeup > current_tracer
|
||||
# echo latency-format > trace_options
|
||||
# echo 0 > tracing_max_latency
|
||||
# echo 1 > tracing_enabled
|
||||
# chrt -f 5 sleep 1
|
||||
# echo 0 > tracing_enabled
|
||||
# cat latency_trace
|
||||
# cat trace
|
||||
# tracer: wakeup
|
||||
#
|
||||
wakeup latency trace v1.1.5 on 2.6.26-rc8
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user