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 'linus' into perfcounters/core
Conflicts: arch/x86/kernel/irqinit.c arch/x86/kernel/irqinit_64.c arch/x86/kernel/traps.c arch/x86/mm/fault.c include/linux/sched.h kernel/exit.c
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
What: /sys/devices/system/cpu/cpu*/cache/index*/cache_disable_X
|
||||||
|
Date: August 2008
|
||||||
|
KernelVersion: 2.6.27
|
||||||
|
Contact: mark.langsdorf@amd.com
|
||||||
|
Description: These files exist in every cpu's cache index directories.
|
||||||
|
There are currently 2 cache_disable_# files in each
|
||||||
|
directory. Reading from these files on a supported
|
||||||
|
processor will return that cache disable index value
|
||||||
|
for that processor and node. Writing to one of these
|
||||||
|
files will cause the specificed cache index to be disabled.
|
||||||
|
|
||||||
|
Currently, only AMD Family 10h Processors support cache index
|
||||||
|
disable, and only for their L3 caches. See the BIOS and
|
||||||
|
Kernel Developer's Guide at
|
||||||
|
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/31116-Public-GH-BKDG_3.20_2-4-09.pdf
|
||||||
|
for formatting information and other details on the
|
||||||
|
cache index disable.
|
||||||
|
Users: joachim.deguara@amd.com
|
||||||
@@ -704,12 +704,24 @@ this directory the following files can currently be found:
|
|||||||
The current number of free dma_debug_entries
|
The current number of free dma_debug_entries
|
||||||
in the allocator.
|
in the allocator.
|
||||||
|
|
||||||
|
dma-api/driver-filter
|
||||||
|
You can write a name of a driver into this file
|
||||||
|
to limit the debug output to requests from that
|
||||||
|
particular driver. Write an empty string to
|
||||||
|
that file to disable the filter and see
|
||||||
|
all errors again.
|
||||||
|
|
||||||
If you have this code compiled into your kernel it will be enabled by default.
|
If you have this code compiled into your kernel it will be enabled by default.
|
||||||
If you want to boot without the bookkeeping anyway you can provide
|
If you want to boot without the bookkeeping anyway you can provide
|
||||||
'dma_debug=off' as a boot parameter. This will disable DMA-API debugging.
|
'dma_debug=off' as a boot parameter. This will disable DMA-API debugging.
|
||||||
Notice that you can not enable it again at runtime. You have to reboot to do
|
Notice that you can not enable it again at runtime. You have to reboot to do
|
||||||
so.
|
so.
|
||||||
|
|
||||||
|
If you want to see debug messages only for a special device driver you can
|
||||||
|
specify the dma_debug_driver=<drivername> parameter. This will enable the
|
||||||
|
driver filter at boot time. The debug code will only print errors for that
|
||||||
|
driver afterwards. This filter can be disabled or changed later using debugfs.
|
||||||
|
|
||||||
When the code disables itself at runtime this is most likely because it ran
|
When the code disables itself at runtime this is most likely because it ran
|
||||||
out of dma_debug_entries. These entries are preallocated at boot. The number
|
out of dma_debug_entries. These entries are preallocated at boot. The number
|
||||||
of preallocated entries is defined per architecture. If it is too low for you
|
of preallocated entries is defined per architecture. If it is too low for you
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \
|
|||||||
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
|
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
|
||||||
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
|
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
|
||||||
mac80211.xml debugobjects.xml sh.xml regulator.xml \
|
mac80211.xml debugobjects.xml sh.xml regulator.xml \
|
||||||
alsa-driver-api.xml writing-an-alsa-driver.xml
|
alsa-driver-api.xml writing-an-alsa-driver.xml \
|
||||||
|
tracepoint.xml
|
||||||
|
|
||||||
###
|
###
|
||||||
# The build process is as follows (targets):
|
# The build process is as follows (targets):
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||||
|
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
|
||||||
|
|
||||||
|
<book id="Tracepoints">
|
||||||
|
<bookinfo>
|
||||||
|
<title>The Linux Kernel Tracepoint API</title>
|
||||||
|
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<firstname>Jason</firstname>
|
||||||
|
<surname>Baron</surname>
|
||||||
|
<affiliation>
|
||||||
|
<address>
|
||||||
|
<email>jbaron@redhat.com</email>
|
||||||
|
</address>
|
||||||
|
</affiliation>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
|
|
||||||
|
<legalnotice>
|
||||||
|
<para>
|
||||||
|
This documentation is free software; you can redistribute
|
||||||
|
it and/or modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later
|
||||||
|
version.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This program is distributed in the hope that it will be
|
||||||
|
useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
See the GNU General Public License for more details.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You should have received a copy of the GNU General Public
|
||||||
|
License along with this program; if not, write to the Free
|
||||||
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||||
|
MA 02111-1307 USA
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For more details see the file COPYING in the source
|
||||||
|
distribution of Linux.
|
||||||
|
</para>
|
||||||
|
</legalnotice>
|
||||||
|
</bookinfo>
|
||||||
|
|
||||||
|
<toc></toc>
|
||||||
|
<chapter id="intro">
|
||||||
|
<title>Introduction</title>
|
||||||
|
<para>
|
||||||
|
Tracepoints are static probe points that are located in strategic points
|
||||||
|
throughout the kernel. 'Probes' register/unregister with tracepoints
|
||||||
|
via a callback mechanism. The 'probes' are strictly typed functions that
|
||||||
|
are passed a unique set of parameters defined by each tracepoint.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
From this simple callback mechanism, 'probes' can be used to profile, debug,
|
||||||
|
and understand kernel behavior. There are a number of tools that provide a
|
||||||
|
framework for using 'probes'. These tools include Systemtap, ftrace, and
|
||||||
|
LTTng.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Tracepoints are defined in a number of header files via various macros. Thus,
|
||||||
|
the purpose of this document is to provide a clear accounting of the available
|
||||||
|
tracepoints. The intention is to understand not only what tracepoints are
|
||||||
|
available but also to understand where future tracepoints might be added.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The API presented has functions of the form:
|
||||||
|
<function>trace_tracepointname(function parameters)</function>. These are the
|
||||||
|
tracepoints callbacks that are found throughout the code. Registering and
|
||||||
|
unregistering probes with these callback sites is covered in the
|
||||||
|
<filename>Documentation/trace/*</filename> directory.
|
||||||
|
</para>
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
<chapter id="irq">
|
||||||
|
<title>IRQ</title>
|
||||||
|
!Iinclude/trace/events/irq.h
|
||||||
|
</chapter>
|
||||||
|
|
||||||
|
</book>
|
||||||
+80
-22
@@ -192,23 +192,24 @@ rcu/rcuhier (which displays the struct rcu_node hierarchy).
|
|||||||
The output of "cat rcu/rcudata" looks as follows:
|
The output of "cat rcu/rcudata" looks as follows:
|
||||||
|
|
||||||
rcu:
|
rcu:
|
||||||
0 c=4011 g=4012 pq=1 pqc=4011 qp=0 rpfq=1 rp=3c2a dt=23301/73 dn=2 df=1882 of=0 ri=2126 ql=2 b=10
|
rcu:
|
||||||
1 c=4011 g=4012 pq=1 pqc=4011 qp=0 rpfq=3 rp=39a6 dt=78073/1 dn=2 df=1402 of=0 ri=1875 ql=46 b=10
|
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
|
||||||
2 c=4010 g=4010 pq=1 pqc=4010 qp=0 rpfq=-5 rp=1d12 dt=16646/0 dn=2 df=3140 of=0 ri=2080 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
|
||||||
3 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=2b50 dt=21159/1 dn=2 df=2230 of=0 ri=1923 ql=72 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
|
||||||
4 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=1644 dt=5783/1 dn=2 df=3348 of=0 ri=2805 ql=7 b=10
|
3 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=6681/1 dn=0 df=1545 of=0 ri=0 ql=0 b=10
|
||||||
5 c=4012 g=4013 pq=0 pqc=4011 qp=1 rpfq=3 rp=1aac dt=5879/1 dn=2 df=3140 of=0 ri=2066 ql=10 b=10
|
4 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=1003/1 dn=0 df=1992 of=0 ri=0 ql=0 b=10
|
||||||
6 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=ed8 dt=5847/1 dn=2 df=3797 of=0 ri=1266 ql=10 b=10
|
5 c=17829 g=17830 pq=1 pqc=17829 qp=1 dt=3887/1 dn=0 df=3331 of=0 ri=4 ql=2 b=10
|
||||||
7 c=4012 g=4013 pq=1 pqc=4012 qp=1 rpfq=3 rp=1fa2 dt=6199/1 dn=2 df=2795 of=0 ri=2162 ql=28 b=10
|
6 c=17829 g=17829 pq=1 pqc=17829 qp=0 dt=859/1 dn=0 df=3224 of=0 ri=0 ql=0 b=10
|
||||||
|
7 c=17829 g=17830 pq=0 pqc=17829 qp=1 dt=3761/1 dn=0 df=1818 of=0 ri=0 ql=2 b=10
|
||||||
rcu_bh:
|
rcu_bh:
|
||||||
0 c=-268 g=-268 pq=1 pqc=-268 qp=0 rpfq=-145 rp=21d6 dt=23301/73 dn=2 df=0 of=0 ri=0 ql=0 b=10
|
0 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=10951/1 dn=0 df=0 of=0 ri=0 ql=0 b=10
|
||||||
1 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-170 rp=20ce dt=78073/1 dn=2 df=26 of=0 ri=5 ql=0 b=10
|
1 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=16117/1 dn=0 df=13 of=0 ri=0 ql=0 b=10
|
||||||
2 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-83 rp=fbd dt=16646/0 dn=2 df=28 of=0 ri=4 ql=0 b=10
|
2 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=1445/1 dn=0 df=15 of=0 ri=0 ql=0 b=10
|
||||||
3 c=-268 g=-268 pq=1 pqc=-268 qp=0 rpfq=-105 rp=178c dt=21159/1 dn=2 df=28 of=0 ri=2 ql=0 b=10
|
3 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=6681/1 dn=0 df=9 of=0 ri=0 ql=0 b=10
|
||||||
4 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-30 rp=b54 dt=5783/1 dn=2 df=32 of=0 ri=0 ql=0 b=10
|
4 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=1003/1 dn=0 df=15 of=0 ri=0 ql=0 b=10
|
||||||
5 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-29 rp=df5 dt=5879/1 dn=2 df=30 of=0 ri=3 ql=0 b=10
|
5 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=3887/1 dn=0 df=15 of=0 ri=0 ql=0 b=10
|
||||||
6 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-28 rp=788 dt=5847/1 dn=2 df=32 of=0 ri=0 ql=0 b=10
|
6 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=859/1 dn=0 df=15 of=0 ri=0 ql=0 b=10
|
||||||
7 c=-268 g=-268 pq=1 pqc=-268 qp=1 rpfq=-53 rp=1098 dt=6199/1 dn=2 df=30 of=0 ri=3 ql=0 b=10
|
7 c=-275 g=-275 pq=1 pqc=-275 qp=0 dt=3761/1 dn=0 df=15 of=0 ri=0 ql=0 b=10
|
||||||
|
|
||||||
The first section lists the rcu_data structures for rcu, the second for
|
The first section lists the rcu_data structures for rcu, the second for
|
||||||
rcu_bh. Each section has one line per CPU, or eight for this 8-CPU system.
|
rcu_bh. Each section has one line per CPU, or eight for this 8-CPU system.
|
||||||
@@ -253,12 +254,6 @@ o "pqc" indicates which grace period the last-observed quiescent
|
|||||||
o "qp" indicates that RCU still expects a quiescent state from
|
o "qp" indicates that RCU still expects a quiescent state from
|
||||||
this CPU.
|
this CPU.
|
||||||
|
|
||||||
o "rpfq" is the number of rcu_pending() calls on this CPU required
|
|
||||||
to induce this CPU to invoke force_quiescent_state().
|
|
||||||
|
|
||||||
o "rp" is low-order four hex digits of the count of how many times
|
|
||||||
rcu_pending() has been invoked on this CPU.
|
|
||||||
|
|
||||||
o "dt" is the current value of the dyntick counter that is incremented
|
o "dt" is the current value of the dyntick counter that is incremented
|
||||||
when entering or leaving dynticks idle state, either by the
|
when entering or leaving dynticks idle state, either by the
|
||||||
scheduler or by irq. The number after the "/" is the interrupt
|
scheduler or by irq. The number after the "/" is the interrupt
|
||||||
@@ -305,6 +300,9 @@ o "b" is the batch limit for this CPU. If more than this number
|
|||||||
of RCU callbacks is ready to invoke, then the remainder will
|
of RCU callbacks is ready to invoke, then the remainder will
|
||||||
be deferred.
|
be deferred.
|
||||||
|
|
||||||
|
There is also an rcu/rcudata.csv file with the same information in
|
||||||
|
comma-separated-variable spreadsheet format.
|
||||||
|
|
||||||
|
|
||||||
The output of "cat rcu/rcugp" looks as follows:
|
The output of "cat rcu/rcugp" looks as follows:
|
||||||
|
|
||||||
@@ -411,3 +409,63 @@ o Each element of the form "1/1 0:127 ^0" represents one struct
|
|||||||
For example, the first entry at the lowest level shows
|
For example, the first entry at the lowest level shows
|
||||||
"^0", indicating that it corresponds to bit zero in
|
"^0", indicating that it corresponds to bit zero in
|
||||||
the first entry at the middle level.
|
the first entry at the middle level.
|
||||||
|
|
||||||
|
|
||||||
|
The output of "cat rcu/rcu_pending" looks as follows:
|
||||||
|
|
||||||
|
rcu:
|
||||||
|
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
|
||||||
|
3 np=236249 qsp=48766 cbr=0 cng=286 gpc=48049 gps=1218 nf=207 nn=137723
|
||||||
|
4 np=221310 qsp=46850 cbr=0 cng=26 gpc=43161 gps=4634 nf=3529 nn=123110
|
||||||
|
5 np=237332 qsp=48449 cbr=0 cng=54 gpc=47920 gps=3252 nf=201 nn=137456
|
||||||
|
6 np=219995 qsp=46718 cbr=0 cng=50 gpc=42098 gps=6093 nf=4202 nn=120834
|
||||||
|
7 np=249893 qsp=49390 cbr=0 cng=72 gpc=38400 gps=17102 nf=41 nn=144888
|
||||||
|
rcu_bh:
|
||||||
|
0 np=146741 qsp=1419 cbr=0 cng=6 gpc=0 gps=0 nf=2 nn=145314
|
||||||
|
1 np=155792 qsp=12597 cbr=0 cng=0 gpc=4 gps=8 nf=3 nn=143180
|
||||||
|
2 np=136629 qsp=18680 cbr=0 cng=0 gpc=7 gps=6 nf=0 nn=117936
|
||||||
|
3 np=137723 qsp=2843 cbr=0 cng=0 gpc=10 gps=7 nf=0 nn=134863
|
||||||
|
4 np=123110 qsp=12433 cbr=0 cng=0 gpc=4 gps=2 nf=0 nn=110671
|
||||||
|
5 np=137456 qsp=4210 cbr=0 cng=0 gpc=6 gps=5 nf=0 nn=133235
|
||||||
|
6 np=120834 qsp=9902 cbr=0 cng=0 gpc=6 gps=3 nf=2 nn=110921
|
||||||
|
7 np=144888 qsp=26336 cbr=0 cng=0 gpc=8 gps=2 nf=0 nn=118542
|
||||||
|
|
||||||
|
As always, this is once again split into "rcu" and "rcu_bh" portions.
|
||||||
|
The fields are as follows:
|
||||||
|
|
||||||
|
o "np" is the number of times that __rcu_pending() has been invoked
|
||||||
|
for the corresponding flavor of RCU.
|
||||||
|
|
||||||
|
o "qsp" is the number of times that the RCU was waiting for a
|
||||||
|
quiescent state from this CPU.
|
||||||
|
|
||||||
|
o "cbr" is the number of times that this CPU had RCU callbacks
|
||||||
|
that had passed through a grace period, and were thus ready
|
||||||
|
to be invoked.
|
||||||
|
|
||||||
|
o "cng" is the number of times that this CPU needed another
|
||||||
|
grace period while RCU was idle.
|
||||||
|
|
||||||
|
o "gpc" is the number of times that an old grace period had
|
||||||
|
completed, but this CPU was not yet aware of it.
|
||||||
|
|
||||||
|
o "gps" is the number of times that a new grace period had started,
|
||||||
|
but this CPU was not yet aware of it.
|
||||||
|
|
||||||
|
o "nf" is the number of times that this CPU suspected that the
|
||||||
|
current grace period had run for too long, and thus needed to
|
||||||
|
be forced.
|
||||||
|
|
||||||
|
Please note that "forcing" consists of sending resched IPIs
|
||||||
|
to holdout CPUs. If that CPU really still is in an old RCU
|
||||||
|
read-side critical section, then we really do have to wait for it.
|
||||||
|
The assumption behing "forcing" is that the CPU is not still in
|
||||||
|
an old RCU read-side critical section, but has not yet responded
|
||||||
|
for some other reason.
|
||||||
|
|
||||||
|
o "nn" is the number of times that this CPU needed nothing. Alert
|
||||||
|
readers will note that the rcu "nn" number for a given CPU very
|
||||||
|
closely matches the rcu_bh "np" number for that same CPU. This
|
||||||
|
is due to short-circuit evaluation in rcu_pending().
|
||||||
|
|||||||
@@ -0,0 +1,131 @@
|
|||||||
|
Futex Requeue PI
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Requeueing of tasks from a non-PI futex to a PI futex requires
|
||||||
|
special handling in order to ensure the underlying rt_mutex is never
|
||||||
|
left without an owner if it has waiters; doing so would break the PI
|
||||||
|
boosting logic [see rt-mutex-desgin.txt] For the purposes of
|
||||||
|
brevity, this action will be referred to as "requeue_pi" throughout
|
||||||
|
this document. Priority inheritance is abbreviated throughout as
|
||||||
|
"PI".
|
||||||
|
|
||||||
|
Motivation
|
||||||
|
----------
|
||||||
|
|
||||||
|
Without requeue_pi, the glibc implementation of
|
||||||
|
pthread_cond_broadcast() must resort to waking all the tasks waiting
|
||||||
|
on a pthread_condvar and letting them try to sort out which task
|
||||||
|
gets to run first in classic thundering-herd formation. An ideal
|
||||||
|
implementation would wake the highest-priority waiter, and leave the
|
||||||
|
rest to the natural wakeup inherent in unlocking the mutex
|
||||||
|
associated with the condvar.
|
||||||
|
|
||||||
|
Consider the simplified glibc calls:
|
||||||
|
|
||||||
|
/* caller must lock mutex */
|
||||||
|
pthread_cond_wait(cond, mutex)
|
||||||
|
{
|
||||||
|
lock(cond->__data.__lock);
|
||||||
|
unlock(mutex);
|
||||||
|
do {
|
||||||
|
unlock(cond->__data.__lock);
|
||||||
|
futex_wait(cond->__data.__futex);
|
||||||
|
lock(cond->__data.__lock);
|
||||||
|
} while(...)
|
||||||
|
unlock(cond->__data.__lock);
|
||||||
|
lock(mutex);
|
||||||
|
}
|
||||||
|
|
||||||
|
pthread_cond_broadcast(cond)
|
||||||
|
{
|
||||||
|
lock(cond->__data.__lock);
|
||||||
|
unlock(cond->__data.__lock);
|
||||||
|
futex_requeue(cond->data.__futex, cond->mutex);
|
||||||
|
}
|
||||||
|
|
||||||
|
Once pthread_cond_broadcast() requeues the tasks, the cond->mutex
|
||||||
|
has waiters. Note that pthread_cond_wait() attempts to lock the
|
||||||
|
mutex only after it has returned to user space. This will leave the
|
||||||
|
underlying rt_mutex with waiters, and no owner, breaking the
|
||||||
|
previously mentioned PI-boosting algorithms.
|
||||||
|
|
||||||
|
In order to support PI-aware pthread_condvar's, the kernel needs to
|
||||||
|
be able to requeue tasks to PI futexes. This support implies that
|
||||||
|
upon a successful futex_wait system call, the caller would return to
|
||||||
|
user space already holding the PI futex. The glibc implementation
|
||||||
|
would be modified as follows:
|
||||||
|
|
||||||
|
|
||||||
|
/* caller must lock mutex */
|
||||||
|
pthread_cond_wait_pi(cond, mutex)
|
||||||
|
{
|
||||||
|
lock(cond->__data.__lock);
|
||||||
|
unlock(mutex);
|
||||||
|
do {
|
||||||
|
unlock(cond->__data.__lock);
|
||||||
|
futex_wait_requeue_pi(cond->__data.__futex);
|
||||||
|
lock(cond->__data.__lock);
|
||||||
|
} while(...)
|
||||||
|
unlock(cond->__data.__lock);
|
||||||
|
/* the kernel acquired the the mutex for us */
|
||||||
|
}
|
||||||
|
|
||||||
|
pthread_cond_broadcast_pi(cond)
|
||||||
|
{
|
||||||
|
lock(cond->__data.__lock);
|
||||||
|
unlock(cond->__data.__lock);
|
||||||
|
futex_requeue_pi(cond->data.__futex, cond->mutex);
|
||||||
|
}
|
||||||
|
|
||||||
|
The actual glibc implementation will likely test for PI and make the
|
||||||
|
necessary changes inside the existing calls rather than creating new
|
||||||
|
calls for the PI cases. Similar changes are needed for
|
||||||
|
pthread_cond_timedwait() and pthread_cond_signal().
|
||||||
|
|
||||||
|
Implementation
|
||||||
|
--------------
|
||||||
|
|
||||||
|
In order to ensure the rt_mutex has an owner if it has waiters, it
|
||||||
|
is necessary for both the requeue code, as well as the waiting code,
|
||||||
|
to be able to acquire the rt_mutex before returning to user space.
|
||||||
|
The requeue code cannot simply wake the waiter and leave it to
|
||||||
|
acquire the rt_mutex as it would open a race window between the
|
||||||
|
requeue call returning to user space and the waiter waking and
|
||||||
|
starting to run. This is especially true in the uncontended case.
|
||||||
|
|
||||||
|
The solution involves two new rt_mutex helper routines,
|
||||||
|
rt_mutex_start_proxy_lock() and rt_mutex_finish_proxy_lock(), which
|
||||||
|
allow the requeue code to acquire an uncontended rt_mutex on behalf
|
||||||
|
of the waiter and to enqueue the waiter on a contended rt_mutex.
|
||||||
|
Two new system calls provide the kernel<->user interface to
|
||||||
|
requeue_pi: FUTEX_WAIT_REQUEUE_PI and FUTEX_REQUEUE_CMP_PI.
|
||||||
|
|
||||||
|
FUTEX_WAIT_REQUEUE_PI is called by the waiter (pthread_cond_wait()
|
||||||
|
and pthread_cond_timedwait()) to block on the initial futex and wait
|
||||||
|
to be requeued to a PI-aware futex. The implementation is the
|
||||||
|
result of a high-speed collision between futex_wait() and
|
||||||
|
futex_lock_pi(), with some extra logic to check for the additional
|
||||||
|
wake-up scenarios.
|
||||||
|
|
||||||
|
FUTEX_REQUEUE_CMP_PI is called by the waker
|
||||||
|
(pthread_cond_broadcast() and pthread_cond_signal()) to requeue and
|
||||||
|
possibly wake the waiting tasks. Internally, this system call is
|
||||||
|
still handled by futex_requeue (by passing requeue_pi=1). Before
|
||||||
|
requeueing, futex_requeue() attempts to acquire the requeue target
|
||||||
|
PI futex on behalf of the top waiter. If it can, this waiter is
|
||||||
|
woken. futex_requeue() then proceeds to requeue the remaining
|
||||||
|
nr_wake+nr_requeue tasks to the PI futex, calling
|
||||||
|
rt_mutex_start_proxy_lock() prior to each requeue to prepare the
|
||||||
|
task as a waiter on the underlying rt_mutex. It is possible that
|
||||||
|
the lock can be acquired at this stage as well, if so, the next
|
||||||
|
waiter is woken to finish the acquisition of the lock.
|
||||||
|
|
||||||
|
FUTEX_REQUEUE_PI accepts nr_wake and nr_requeue as arguments, but
|
||||||
|
their sum is all that really matters. futex_requeue() will wake or
|
||||||
|
requeue up to nr_wake + nr_requeue tasks. It will wake only as many
|
||||||
|
tasks as it can acquire the lock for, which in the majority of cases
|
||||||
|
should be 0 as good programming practice dictates that the caller of
|
||||||
|
either pthread_cond_broadcast() or pthread_cond_signal() acquire the
|
||||||
|
mutex prior to making the call. FUTEX_REQUEUE_PI requires that
|
||||||
|
nr_wake=1. nr_requeue should be INT_MAX for broadcast and 0 for
|
||||||
|
signal.
|
||||||
@@ -56,7 +56,6 @@ parameter is applicable:
|
|||||||
ISAPNP ISA PnP code is enabled.
|
ISAPNP ISA PnP code is enabled.
|
||||||
ISDN Appropriate ISDN support is enabled.
|
ISDN Appropriate ISDN support is enabled.
|
||||||
JOY Appropriate joystick support is enabled.
|
JOY Appropriate joystick support is enabled.
|
||||||
KMEMTRACE kmemtrace is enabled.
|
|
||||||
LIBATA Libata driver is enabled
|
LIBATA Libata driver is enabled
|
||||||
LP Printer support is enabled.
|
LP Printer support is enabled.
|
||||||
LOOP Loopback device support is enabled.
|
LOOP Loopback device support is enabled.
|
||||||
@@ -329,11 +328,6 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
flushed before they will be reused, which
|
flushed before they will be reused, which
|
||||||
is a lot of faster
|
is a lot of faster
|
||||||
|
|
||||||
amd_iommu_size= [HW,X86-64]
|
|
||||||
Define the size of the aperture for the AMD IOMMU
|
|
||||||
driver. Possible values are:
|
|
||||||
'32M', '64M' (default), '128M', '256M', '512M', '1G'
|
|
||||||
|
|
||||||
amijoy.map= [HW,JOY] Amiga joystick support
|
amijoy.map= [HW,JOY] Amiga joystick support
|
||||||
Map of devices attached to JOY0DAT and JOY1DAT
|
Map of devices attached to JOY0DAT and JOY1DAT
|
||||||
Format: <a>,<b>
|
Format: <a>,<b>
|
||||||
@@ -646,6 +640,13 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
DMA-API debugging code disables itself because the
|
DMA-API debugging code disables itself because the
|
||||||
architectural default is too low.
|
architectural default is too low.
|
||||||
|
|
||||||
|
dma_debug_driver=<driver_name>
|
||||||
|
With this option the DMA-API debugging driver
|
||||||
|
filter feature can be enabled at boot time. Just
|
||||||
|
pass the driver to filter for as the parameter.
|
||||||
|
The filter can be disabled or changed to another
|
||||||
|
driver later using sysfs.
|
||||||
|
|
||||||
dscc4.setup= [NET]
|
dscc4.setup= [NET]
|
||||||
|
|
||||||
dtc3181e= [HW,SCSI]
|
dtc3181e= [HW,SCSI]
|
||||||
@@ -752,12 +753,25 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
ia64_pal_cache_flush instead of SAL_CACHE_FLUSH.
|
ia64_pal_cache_flush instead of SAL_CACHE_FLUSH.
|
||||||
|
|
||||||
ftrace=[tracer]
|
ftrace=[tracer]
|
||||||
[ftrace] will set and start the specified tracer
|
[FTRACE] will set and start the specified tracer
|
||||||
as early as possible in order to facilitate early
|
as early as possible in order to facilitate early
|
||||||
boot debugging.
|
boot debugging.
|
||||||
|
|
||||||
ftrace_dump_on_oops
|
ftrace_dump_on_oops
|
||||||
[ftrace] will dump the trace buffers on oops.
|
[FTRACE] will dump the trace buffers on oops.
|
||||||
|
|
||||||
|
ftrace_filter=[function-list]
|
||||||
|
[FTRACE] Limit the functions traced by the function
|
||||||
|
tracer at boot up. function-list is a comma separated
|
||||||
|
list of functions. This list can be changed at run
|
||||||
|
time by the set_ftrace_filter file in the debugfs
|
||||||
|
tracing directory.
|
||||||
|
|
||||||
|
ftrace_notrace=[function-list]
|
||||||
|
[FTRACE] Do not trace the functions specified in
|
||||||
|
function-list. This list can be changed at run time
|
||||||
|
by the set_ftrace_notrace file in the debugfs
|
||||||
|
tracing directory.
|
||||||
|
|
||||||
gamecon.map[2|3]=
|
gamecon.map[2|3]=
|
||||||
[HW,JOY] Multisystem joystick and NES/SNES/PSX pad
|
[HW,JOY] Multisystem joystick and NES/SNES/PSX pad
|
||||||
@@ -1054,15 +1068,6 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
use the HighMem zone if it exists, and the Normal
|
use the HighMem zone if it exists, and the Normal
|
||||||
zone if it does not.
|
zone if it does not.
|
||||||
|
|
||||||
kmemtrace.enable= [KNL,KMEMTRACE] Format: { yes | no }
|
|
||||||
Controls whether kmemtrace is enabled
|
|
||||||
at boot-time.
|
|
||||||
|
|
||||||
kmemtrace.subbufs=n [KNL,KMEMTRACE] Overrides the number of
|
|
||||||
subbufs kmemtrace's relay channel has. Set this
|
|
||||||
higher than default (KMEMTRACE_N_SUBBUFS in code) if
|
|
||||||
you experience buffer overruns.
|
|
||||||
|
|
||||||
kgdboc= [HW] kgdb over consoles.
|
kgdboc= [HW] kgdb over consoles.
|
||||||
Requires a tty driver that supports console polling.
|
Requires a tty driver that supports console polling.
|
||||||
(only serial suported for now)
|
(only serial suported for now)
|
||||||
@@ -1575,6 +1580,9 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
noinitrd [RAM] Tells the kernel not to load any configured
|
noinitrd [RAM] Tells the kernel not to load any configured
|
||||||
initial RAM disk.
|
initial RAM disk.
|
||||||
|
|
||||||
|
nointremap [X86-64, Intel-IOMMU] Do not enable interrupt
|
||||||
|
remapping.
|
||||||
|
|
||||||
nointroute [IA-64]
|
nointroute [IA-64]
|
||||||
|
|
||||||
nojitter [IA64] Disables jitter checking for ITC timers.
|
nojitter [IA64] Disables jitter checking for ITC timers.
|
||||||
@@ -1660,6 +1668,14 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||||||
oprofile.timer= [HW]
|
oprofile.timer= [HW]
|
||||||
Use timer interrupt instead of performance counters
|
Use timer interrupt instead of performance counters
|
||||||
|
|
||||||
|
oprofile.cpu_type= Force an oprofile cpu type
|
||||||
|
This might be useful if you have an older oprofile
|
||||||
|
userland or if you want common events.
|
||||||
|
Format: { archperfmon }
|
||||||
|
archperfmon: [X86] Force use of architectural
|
||||||
|
perfmon on Intel CPUs instead of the
|
||||||
|
CPU specific event set.
|
||||||
|
|
||||||
osst= [HW,SCSI] SCSI Tape Driver
|
osst= [HW,SCSI] SCSI Tape Driver
|
||||||
Format: <buffer_size>,<write_threshold>
|
Format: <buffer_size>,<write_threshold>
|
||||||
See also Documentation/scsi/st.txt.
|
See also Documentation/scsi/st.txt.
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ Contents:
|
|||||||
|
|
||||||
- Locking functions.
|
- Locking functions.
|
||||||
- Interrupt disabling functions.
|
- Interrupt disabling functions.
|
||||||
|
- Sleep and wake-up functions.
|
||||||
- Miscellaneous functions.
|
- Miscellaneous functions.
|
||||||
|
|
||||||
(*) Inter-CPU locking barrier effects.
|
(*) Inter-CPU locking barrier effects.
|
||||||
@@ -1217,6 +1218,132 @@ barriers are required in such a situation, they must be provided from some
|
|||||||
other means.
|
other means.
|
||||||
|
|
||||||
|
|
||||||
|
SLEEP AND WAKE-UP FUNCTIONS
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
Sleeping and waking on an event flagged in global data can be viewed as an
|
||||||
|
interaction between two pieces of data: the task state of the task waiting for
|
||||||
|
the event and the global data used to indicate the event. To make sure that
|
||||||
|
these appear to happen in the right order, the primitives to begin the process
|
||||||
|
of going to sleep, and the primitives to initiate a wake up imply certain
|
||||||
|
barriers.
|
||||||
|
|
||||||
|
Firstly, the sleeper normally follows something like this sequence of events:
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
set_current_state(TASK_UNINTERRUPTIBLE);
|
||||||
|
if (event_indicated)
|
||||||
|
break;
|
||||||
|
schedule();
|
||||||
|
}
|
||||||
|
|
||||||
|
A general memory barrier is interpolated automatically by set_current_state()
|
||||||
|
after it has altered the task state:
|
||||||
|
|
||||||
|
CPU 1
|
||||||
|
===============================
|
||||||
|
set_current_state();
|
||||||
|
set_mb();
|
||||||
|
STORE current->state
|
||||||
|
<general barrier>
|
||||||
|
LOAD event_indicated
|
||||||
|
|
||||||
|
set_current_state() may be wrapped by:
|
||||||
|
|
||||||
|
prepare_to_wait();
|
||||||
|
prepare_to_wait_exclusive();
|
||||||
|
|
||||||
|
which therefore also imply a general memory barrier after setting the state.
|
||||||
|
The whole sequence above is available in various canned forms, all of which
|
||||||
|
interpolate the memory barrier in the right place:
|
||||||
|
|
||||||
|
wait_event();
|
||||||
|
wait_event_interruptible();
|
||||||
|
wait_event_interruptible_exclusive();
|
||||||
|
wait_event_interruptible_timeout();
|
||||||
|
wait_event_killable();
|
||||||
|
wait_event_timeout();
|
||||||
|
wait_on_bit();
|
||||||
|
wait_on_bit_lock();
|
||||||
|
|
||||||
|
|
||||||
|
Secondly, code that performs a wake up normally follows something like this:
|
||||||
|
|
||||||
|
event_indicated = 1;
|
||||||
|
wake_up(&event_wait_queue);
|
||||||
|
|
||||||
|
or:
|
||||||
|
|
||||||
|
event_indicated = 1;
|
||||||
|
wake_up_process(event_daemon);
|
||||||
|
|
||||||
|
A write memory barrier is implied by wake_up() and co. if and only if they wake
|
||||||
|
something up. The barrier occurs before the task state is cleared, and so sits
|
||||||
|
between the STORE to indicate the event and the STORE to set TASK_RUNNING:
|
||||||
|
|
||||||
|
CPU 1 CPU 2
|
||||||
|
=============================== ===============================
|
||||||
|
set_current_state(); STORE event_indicated
|
||||||
|
set_mb(); wake_up();
|
||||||
|
STORE current->state <write barrier>
|
||||||
|
<general barrier> STORE current->state
|
||||||
|
LOAD event_indicated
|
||||||
|
|
||||||
|
The available waker functions include:
|
||||||
|
|
||||||
|
complete();
|
||||||
|
wake_up();
|
||||||
|
wake_up_all();
|
||||||
|
wake_up_bit();
|
||||||
|
wake_up_interruptible();
|
||||||
|
wake_up_interruptible_all();
|
||||||
|
wake_up_interruptible_nr();
|
||||||
|
wake_up_interruptible_poll();
|
||||||
|
wake_up_interruptible_sync();
|
||||||
|
wake_up_interruptible_sync_poll();
|
||||||
|
wake_up_locked();
|
||||||
|
wake_up_locked_poll();
|
||||||
|
wake_up_nr();
|
||||||
|
wake_up_poll();
|
||||||
|
wake_up_process();
|
||||||
|
|
||||||
|
|
||||||
|
[!] Note that the memory barriers implied by the sleeper and the waker do _not_
|
||||||
|
order multiple stores before the wake-up with respect to loads of those stored
|
||||||
|
values after the sleeper has called set_current_state(). For instance, if the
|
||||||
|
sleeper does:
|
||||||
|
|
||||||
|
set_current_state(TASK_INTERRUPTIBLE);
|
||||||
|
if (event_indicated)
|
||||||
|
break;
|
||||||
|
__set_current_state(TASK_RUNNING);
|
||||||
|
do_something(my_data);
|
||||||
|
|
||||||
|
and the waker does:
|
||||||
|
|
||||||
|
my_data = value;
|
||||||
|
event_indicated = 1;
|
||||||
|
wake_up(&event_wait_queue);
|
||||||
|
|
||||||
|
there's no guarantee that the change to event_indicated will be perceived by
|
||||||
|
the sleeper as coming after the change to my_data. In such a circumstance, the
|
||||||
|
code on both sides must interpolate its own memory barriers between the
|
||||||
|
separate data accesses. Thus the above sleeper ought to do:
|
||||||
|
|
||||||
|
set_current_state(TASK_INTERRUPTIBLE);
|
||||||
|
if (event_indicated) {
|
||||||
|
smp_rmb();
|
||||||
|
do_something(my_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
and the waker should do:
|
||||||
|
|
||||||
|
my_data = value;
|
||||||
|
smp_wmb();
|
||||||
|
event_indicated = 1;
|
||||||
|
wake_up(&event_wait_queue);
|
||||||
|
|
||||||
|
|
||||||
MISCELLANEOUS FUNCTIONS
|
MISCELLANEOUS FUNCTIONS
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
@@ -1366,7 +1493,7 @@ WHERE ARE MEMORY BARRIERS NEEDED?
|
|||||||
|
|
||||||
Under normal operation, memory operation reordering is generally not going to
|
Under normal operation, memory operation reordering is generally not going to
|
||||||
be a problem as a single-threaded linear piece of code will still appear to
|
be a problem as a single-threaded linear piece of code will still appear to
|
||||||
work correctly, even if it's in an SMP kernel. There are, however, three
|
work correctly, even if it's in an SMP kernel. There are, however, four
|
||||||
circumstances in which reordering definitely _could_ be a problem:
|
circumstances in which reordering definitely _could_ be a problem:
|
||||||
|
|
||||||
(*) Interprocessor interaction.
|
(*) Interprocessor interaction.
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
CONTENTS
|
CONTENTS
|
||||||
========
|
========
|
||||||
|
|
||||||
|
0. WARNING
|
||||||
1. Overview
|
1. Overview
|
||||||
1.1 The problem
|
1.1 The problem
|
||||||
1.2 The solution
|
1.2 The solution
|
||||||
@@ -14,6 +15,23 @@ CONTENTS
|
|||||||
3. Future plans
|
3. Future plans
|
||||||
|
|
||||||
|
|
||||||
|
0. WARNING
|
||||||
|
==========
|
||||||
|
|
||||||
|
Fiddling with these settings can result in an unstable system, the knobs are
|
||||||
|
root only and assumes root knows what he is doing.
|
||||||
|
|
||||||
|
Most notable:
|
||||||
|
|
||||||
|
* very small values in sched_rt_period_us can result in an unstable
|
||||||
|
system when the period is smaller than either the available hrtimer
|
||||||
|
resolution, or the time it takes to handle the budget refresh itself.
|
||||||
|
|
||||||
|
* very small values in sched_rt_runtime_us can result in an unstable
|
||||||
|
system when the runtime is so small the system has difficulty making
|
||||||
|
forward progress (NOTE: the migration thread and kstopmachine both
|
||||||
|
are real-time processes).
|
||||||
|
|
||||||
1. Overview
|
1. Overview
|
||||||
===========
|
===========
|
||||||
|
|
||||||
@@ -169,7 +187,7 @@ get their allocated time.
|
|||||||
|
|
||||||
Implementing SCHED_EDF might take a while to complete. Priority Inheritance is
|
Implementing SCHED_EDF might take a while to complete. Priority Inheritance is
|
||||||
the biggest challenge as the current linux PI infrastructure is geared towards
|
the biggest challenge as the current linux PI infrastructure is geared towards
|
||||||
the limited static priority levels 0-139. With deadline scheduling you need to
|
the limited static priority levels 0-99. With deadline scheduling you need to
|
||||||
do deadline inheritance (since priority is inversely proportional to the
|
do deadline inheritance (since priority is inversely proportional to the
|
||||||
deadline delta (deadline - now).
|
deadline delta (deadline - now).
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
Event Tracing
|
||||||
|
|
||||||
|
Documentation written by Theodore Ts'o
|
||||||
|
Updated by Li Zefan
|
||||||
|
|
||||||
|
1. Introduction
|
||||||
|
===============
|
||||||
|
|
||||||
|
Tracepoints (see Documentation/trace/tracepoints.txt) can be used
|
||||||
|
without creating custom kernel modules to register probe functions
|
||||||
|
using the event tracing infrastructure.
|
||||||
|
|
||||||
|
Not all tracepoints can be traced using the event tracing system;
|
||||||
|
the kernel developer must provide code snippets which define how the
|
||||||
|
tracing information is saved into the tracing buffer, and how the
|
||||||
|
tracing information should be printed.
|
||||||
|
|
||||||
|
2. Using Event Tracing
|
||||||
|
======================
|
||||||
|
|
||||||
|
2.1 Via the 'set_event' interface
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
The events which are available for tracing can be found in the file
|
||||||
|
/debug/tracing/available_events.
|
||||||
|
|
||||||
|
To enable a particular event, such as 'sched_wakeup', simply echo it
|
||||||
|
to /debug/tracing/set_event. For example:
|
||||||
|
|
||||||
|
# echo sched_wakeup >> /debug/tracing/set_event
|
||||||
|
|
||||||
|
[ Note: '>>' is necessary, otherwise it will firstly disable
|
||||||
|
all the events. ]
|
||||||
|
|
||||||
|
To disable an event, echo the event name to the set_event file prefixed
|
||||||
|
with an exclamation point:
|
||||||
|
|
||||||
|
# echo '!sched_wakeup' >> /debug/tracing/set_event
|
||||||
|
|
||||||
|
To disable all events, echo an empty line to the set_event file:
|
||||||
|
|
||||||
|
# echo > /debug/tracing/set_event
|
||||||
|
|
||||||
|
To enable all events, echo '*:*' or '*:' to the set_event file:
|
||||||
|
|
||||||
|
# echo *:* > /debug/tracing/set_event
|
||||||
|
|
||||||
|
The events are organized into subsystems, such as ext4, irq, sched,
|
||||||
|
etc., and a full event name looks like this: <subsystem>:<event>. The
|
||||||
|
subsystem name is optional, but it is displayed in the available_events
|
||||||
|
file. All of the events in a subsystem can be specified via the syntax
|
||||||
|
"<subsystem>:*"; for example, to enable all irq events, you can use the
|
||||||
|
command:
|
||||||
|
|
||||||
|
# echo 'irq:*' > /debug/tracing/set_event
|
||||||
|
|
||||||
|
2.2 Via the 'enable' toggle
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
The events available are also listed in /debug/tracing/events/ hierarchy
|
||||||
|
of directories.
|
||||||
|
|
||||||
|
To enable event 'sched_wakeup':
|
||||||
|
|
||||||
|
# echo 1 > /debug/tracing/events/sched/sched_wakeup/enable
|
||||||
|
|
||||||
|
To disable it:
|
||||||
|
|
||||||
|
# echo 0 > /debug/tracing/events/sched/sched_wakeup/enable
|
||||||
|
|
||||||
|
To enable all events in sched subsystem:
|
||||||
|
|
||||||
|
# echo 1 > /debug/tracing/events/sched/enable
|
||||||
|
|
||||||
|
To eanble all events:
|
||||||
|
|
||||||
|
# echo 1 > /debug/tracing/events/enable
|
||||||
|
|
||||||
|
When reading one of these enable files, there are four results:
|
||||||
|
|
||||||
|
0 - all events this file affects are disabled
|
||||||
|
1 - all events this file affects are enabled
|
||||||
|
X - there is a mixture of events enabled and disabled
|
||||||
|
? - this file does not affect any event
|
||||||
|
|
||||||
|
3. Defining an event-enabled tracepoint
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
See The example provided in samples/trace_events
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ Here is the list of current tracers that may be configured.
|
|||||||
|
|
||||||
Function call tracer to trace all kernel functions.
|
Function call tracer to trace all kernel functions.
|
||||||
|
|
||||||
"function_graph_tracer"
|
"function_graph"
|
||||||
|
|
||||||
Similar to the function tracer except that the
|
Similar to the function tracer except that the
|
||||||
function tracer probes the functions on their entry
|
function tracer probes the functions on their entry
|
||||||
@@ -518,9 +518,18 @@ priority with zero (0) being the highest priority and the nice
|
|||||||
values starting at 100 (nice -20). Below is a quick chart to map
|
values starting at 100 (nice -20). Below is a quick chart to map
|
||||||
the kernel priority to user land priorities.
|
the kernel priority to user land priorities.
|
||||||
|
|
||||||
Kernel priority: 0 to 99 ==> user RT priority 99 to 0
|
Kernel Space User Space
|
||||||
Kernel priority: 100 to 139 ==> user nice -20 to 19
|
===============================================================
|
||||||
Kernel priority: 140 ==> idle task priority
|
0(high) to 98(low) user RT priority 99(high) to 1(low)
|
||||||
|
with SCHED_RR or SCHED_FIFO
|
||||||
|
---------------------------------------------------------------
|
||||||
|
99 sched_priority is not used in scheduling
|
||||||
|
decisions(it must be specified as 0)
|
||||||
|
---------------------------------------------------------------
|
||||||
|
100(high) to 139(low) user nice -20(high) to 19(low)
|
||||||
|
---------------------------------------------------------------
|
||||||
|
140 idle task priority
|
||||||
|
---------------------------------------------------------------
|
||||||
|
|
||||||
The task states are:
|
The task states are:
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
The power tracer collects detailed information about C-state and P-state
|
||||||
|
transitions, instead of just looking at the high-level "average"
|
||||||
|
information.
|
||||||
|
|
||||||
|
There is a helper script found in scrips/tracing/power.pl in the kernel
|
||||||
|
sources which can be used to parse this information and create a
|
||||||
|
Scalable Vector Graphics (SVG) picture from the trace data.
|
||||||
|
|
||||||
|
To use this tracer:
|
||||||
|
|
||||||
|
echo 0 > /sys/kernel/debug/tracing/tracing_enabled
|
||||||
|
echo power > /sys/kernel/debug/tracing/current_tracer
|
||||||
|
echo 1 > /sys/kernel/debug/tracing/tracing_enabled
|
||||||
|
sleep 1
|
||||||
|
echo 0 > /sys/kernel/debug/tracing/tracing_enabled
|
||||||
|
cat /sys/kernel/debug/tracing/trace | \
|
||||||
|
perl scripts/tracing/power.pl > out.sv
|
||||||
+114
-8
@@ -50,6 +50,10 @@ Protocol 2.08: (Kernel 2.6.26) Added crc32 checksum and ELF format
|
|||||||
Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical
|
Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical
|
||||||
pointer to single linked list of struct setup_data.
|
pointer to single linked list of struct setup_data.
|
||||||
|
|
||||||
|
Protocol 2.10: (Kernel 2.6.31) Added a protocol for relaxed alignment
|
||||||
|
beyond the kernel_alignment added, new init_size and
|
||||||
|
pref_address fields. Added extended boot loader IDs.
|
||||||
|
|
||||||
**** MEMORY LAYOUT
|
**** MEMORY LAYOUT
|
||||||
|
|
||||||
The traditional memory map for the kernel loader, used for Image or
|
The traditional memory map for the kernel loader, used for Image or
|
||||||
@@ -168,12 +172,13 @@ Offset Proto Name Meaning
|
|||||||
021C/4 2.00+ ramdisk_size initrd size (set by boot loader)
|
021C/4 2.00+ ramdisk_size initrd size (set by boot loader)
|
||||||
0220/4 2.00+ bootsect_kludge DO NOT USE - for bootsect.S use only
|
0220/4 2.00+ bootsect_kludge DO NOT USE - for bootsect.S use only
|
||||||
0224/2 2.01+ heap_end_ptr Free memory after setup end
|
0224/2 2.01+ heap_end_ptr Free memory after setup end
|
||||||
0226/2 N/A pad1 Unused
|
0226/1 2.02+(3 ext_loader_ver Extended boot loader version
|
||||||
|
0227/1 2.02+(3 ext_loader_type Extended boot loader ID
|
||||||
0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line
|
0228/4 2.02+ cmd_line_ptr 32-bit pointer to the kernel command line
|
||||||
022C/4 2.03+ ramdisk_max Highest legal initrd address
|
022C/4 2.03+ ramdisk_max Highest legal initrd address
|
||||||
0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel
|
0230/4 2.05+ kernel_alignment Physical addr alignment required for kernel
|
||||||
0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not
|
0234/1 2.05+ relocatable_kernel Whether kernel is relocatable or not
|
||||||
0235/1 N/A pad2 Unused
|
0235/1 2.10+ min_alignment Minimum alignment, as a power of two
|
||||||
0236/2 N/A pad3 Unused
|
0236/2 N/A pad3 Unused
|
||||||
0238/4 2.06+ cmdline_size Maximum size of the kernel command line
|
0238/4 2.06+ cmdline_size Maximum size of the kernel command line
|
||||||
023C/4 2.07+ hardware_subarch Hardware subarchitecture
|
023C/4 2.07+ hardware_subarch Hardware subarchitecture
|
||||||
@@ -182,6 +187,8 @@ Offset Proto Name Meaning
|
|||||||
024C/4 2.08+ payload_length Length of kernel payload
|
024C/4 2.08+ payload_length Length of kernel payload
|
||||||
0250/8 2.09+ setup_data 64-bit physical pointer to linked list
|
0250/8 2.09+ setup_data 64-bit physical pointer to linked list
|
||||||
of struct setup_data
|
of struct setup_data
|
||||||
|
0258/8 2.10+ pref_address Preferred loading address
|
||||||
|
0260/4 2.10+ init_size Linear memory required during initialization
|
||||||
|
|
||||||
(1) For backwards compatibility, if the setup_sects field contains 0, the
|
(1) For backwards compatibility, if the setup_sects field contains 0, the
|
||||||
real value is 4.
|
real value is 4.
|
||||||
@@ -190,6 +197,8 @@ Offset Proto Name Meaning
|
|||||||
field are unusable, which means the size of a bzImage kernel
|
field are unusable, which means the size of a bzImage kernel
|
||||||
cannot be determined.
|
cannot be determined.
|
||||||
|
|
||||||
|
(3) Ignored, but safe to set, for boot protocols 2.02-2.09.
|
||||||
|
|
||||||
If the "HdrS" (0x53726448) magic number is not found at offset 0x202,
|
If the "HdrS" (0x53726448) magic number is not found at offset 0x202,
|
||||||
the boot protocol version is "old". Loading an old kernel, the
|
the boot protocol version is "old". Loading an old kernel, the
|
||||||
following parameters should be assumed:
|
following parameters should be assumed:
|
||||||
@@ -343,18 +352,32 @@ Protocol: 2.00+
|
|||||||
0xTV here, where T is an identifier for the boot loader and V is
|
0xTV here, where T is an identifier for the boot loader and V is
|
||||||
a version number. Otherwise, enter 0xFF here.
|
a version number. Otherwise, enter 0xFF here.
|
||||||
|
|
||||||
|
For boot loader IDs above T = 0xD, write T = 0xE to this field and
|
||||||
|
write the extended ID minus 0x10 to the ext_loader_type field.
|
||||||
|
Similarly, the ext_loader_ver field can be used to provide more than
|
||||||
|
four bits for the bootloader version.
|
||||||
|
|
||||||
|
For example, for T = 0x15, V = 0x234, write:
|
||||||
|
|
||||||
|
type_of_loader <- 0xE4
|
||||||
|
ext_loader_type <- 0x05
|
||||||
|
ext_loader_ver <- 0x23
|
||||||
|
|
||||||
Assigned boot loader ids:
|
Assigned boot loader ids:
|
||||||
0 LILO (0x00 reserved for pre-2.00 bootloader)
|
0 LILO (0x00 reserved for pre-2.00 bootloader)
|
||||||
1 Loadlin
|
1 Loadlin
|
||||||
2 bootsect-loader (0x20, all other values reserved)
|
2 bootsect-loader (0x20, all other values reserved)
|
||||||
3 SYSLINUX
|
3 Syslinux
|
||||||
4 EtherBoot
|
4 Etherboot/gPXE
|
||||||
5 ELILO
|
5 ELILO
|
||||||
7 GRUB
|
7 GRUB
|
||||||
8 U-BOOT
|
8 U-Boot
|
||||||
9 Xen
|
9 Xen
|
||||||
A Gujin
|
A Gujin
|
||||||
B Qemu
|
B Qemu
|
||||||
|
C Arcturus Networks uCbootloader
|
||||||
|
E Extended (see ext_loader_type)
|
||||||
|
F Special (0xFF = undefined)
|
||||||
|
|
||||||
Please contact <hpa@zytor.com> if you need a bootloader ID
|
Please contact <hpa@zytor.com> if you need a bootloader ID
|
||||||
value assigned.
|
value assigned.
|
||||||
@@ -453,6 +476,35 @@ Protocol: 2.01+
|
|||||||
Set this field to the offset (from the beginning of the real-mode
|
Set this field to the offset (from the beginning of the real-mode
|
||||||
code) of the end of the setup stack/heap, minus 0x0200.
|
code) of the end of the setup stack/heap, minus 0x0200.
|
||||||
|
|
||||||
|
Field name: ext_loader_ver
|
||||||
|
Type: write (optional)
|
||||||
|
Offset/size: 0x226/1
|
||||||
|
Protocol: 2.02+
|
||||||
|
|
||||||
|
This field is used as an extension of the version number in the
|
||||||
|
type_of_loader field. The total version number is considered to be
|
||||||
|
(type_of_loader & 0x0f) + (ext_loader_ver << 4).
|
||||||
|
|
||||||
|
The use of this field is boot loader specific. If not written, it
|
||||||
|
is zero.
|
||||||
|
|
||||||
|
Kernels prior to 2.6.31 did not recognize this field, but it is safe
|
||||||
|
to write for protocol version 2.02 or higher.
|
||||||
|
|
||||||
|
Field name: ext_loader_type
|
||||||
|
Type: write (obligatory if (type_of_loader & 0xf0) == 0xe0)
|
||||||
|
Offset/size: 0x227/1
|
||||||
|
Protocol: 2.02+
|
||||||
|
|
||||||
|
This field is used as an extension of the type number in
|
||||||
|
type_of_loader field. If the type in type_of_loader is 0xE, then
|
||||||
|
the actual type is (ext_loader_type + 0x10).
|
||||||
|
|
||||||
|
This field is ignored if the type in type_of_loader is not 0xE.
|
||||||
|
|
||||||
|
Kernels prior to 2.6.31 did not recognize this field, but it is safe
|
||||||
|
to write for protocol version 2.02 or higher.
|
||||||
|
|
||||||
Field name: cmd_line_ptr
|
Field name: cmd_line_ptr
|
||||||
Type: write (obligatory)
|
Type: write (obligatory)
|
||||||
Offset/size: 0x228/4
|
Offset/size: 0x228/4
|
||||||
@@ -482,11 +534,19 @@ Protocol: 2.03+
|
|||||||
0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)
|
0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)
|
||||||
|
|
||||||
Field name: kernel_alignment
|
Field name: kernel_alignment
|
||||||
Type: read (reloc)
|
Type: read/modify (reloc)
|
||||||
Offset/size: 0x230/4
|
Offset/size: 0x230/4
|
||||||
Protocol: 2.05+
|
Protocol: 2.05+ (read), 2.10+ (modify)
|
||||||
|
|
||||||
Alignment unit required by the kernel (if relocatable_kernel is true.)
|
Alignment unit required by the kernel (if relocatable_kernel is
|
||||||
|
true.) A relocatable kernel that is loaded at an alignment
|
||||||
|
incompatible with the value in this field will be realigned during
|
||||||
|
kernel initialization.
|
||||||
|
|
||||||
|
Starting with protocol version 2.10, this reflects the kernel
|
||||||
|
alignment preferred for optimal performance; it is possible for the
|
||||||
|
loader to modify this field to permit a lesser alignment. See the
|
||||||
|
min_alignment and pref_address field below.
|
||||||
|
|
||||||
Field name: relocatable_kernel
|
Field name: relocatable_kernel
|
||||||
Type: read (reloc)
|
Type: read (reloc)
|
||||||
@@ -498,6 +558,22 @@ Protocol: 2.05+
|
|||||||
After loading, the boot loader must set the code32_start field to
|
After loading, the boot loader must set the code32_start field to
|
||||||
point to the loaded code, or to a boot loader hook.
|
point to the loaded code, or to a boot loader hook.
|
||||||
|
|
||||||
|
Field name: min_alignment
|
||||||
|
Type: read (reloc)
|
||||||
|
Offset/size: 0x235/1
|
||||||
|
Protocol: 2.10+
|
||||||
|
|
||||||
|
This field, if nonzero, indicates as a power of two the minimum
|
||||||
|
alignment required, as opposed to preferred, by the kernel to boot.
|
||||||
|
If a boot loader makes use of this field, it should update the
|
||||||
|
kernel_alignment field with the alignment unit desired; typically:
|
||||||
|
|
||||||
|
kernel_alignment = 1 << min_alignment
|
||||||
|
|
||||||
|
There may be a considerable performance cost with an excessively
|
||||||
|
misaligned kernel. Therefore, a loader should typically try each
|
||||||
|
power-of-two alignment from kernel_alignment down to this alignment.
|
||||||
|
|
||||||
Field name: cmdline_size
|
Field name: cmdline_size
|
||||||
Type: read
|
Type: read
|
||||||
Offset/size: 0x238/4
|
Offset/size: 0x238/4
|
||||||
@@ -582,6 +658,36 @@ Protocol: 2.09+
|
|||||||
sure to consider the case where the linked list already contains
|
sure to consider the case where the linked list already contains
|
||||||
entries.
|
entries.
|
||||||
|
|
||||||
|
Field name: pref_address
|
||||||
|
Type: read (reloc)
|
||||||
|
Offset/size: 0x258/8
|
||||||
|
Protocol: 2.10+
|
||||||
|
|
||||||
|
This field, if nonzero, represents a preferred load address for the
|
||||||
|
kernel. A relocating bootloader should attempt to load at this
|
||||||
|
address if possible.
|
||||||
|
|
||||||
|
A non-relocatable kernel will unconditionally move itself and to run
|
||||||
|
at this address.
|
||||||
|
|
||||||
|
Field name: init_size
|
||||||
|
Type: read
|
||||||
|
Offset/size: 0x25c/4
|
||||||
|
|
||||||
|
This field indicates the amount of linear contiguous memory starting
|
||||||
|
at the kernel runtime start address that the kernel needs before it
|
||||||
|
is capable of examining its memory map. This is not the same thing
|
||||||
|
as the total amount of memory the kernel needs to boot, but it can
|
||||||
|
be used by a relocating boot loader to help select a safe load
|
||||||
|
address for the kernel.
|
||||||
|
|
||||||
|
The kernel runtime start address is determined by the following algorithm:
|
||||||
|
|
||||||
|
if (relocatable_kernel)
|
||||||
|
runtime_start = align_up(load_address, kernel_alignment)
|
||||||
|
else
|
||||||
|
runtime_start = pref_address
|
||||||
|
|
||||||
|
|
||||||
**** THE IMAGE CHECKSUM
|
**** THE IMAGE CHECKSUM
|
||||||
|
|
||||||
|
|||||||
@@ -150,11 +150,6 @@ NUMA
|
|||||||
Otherwise, the remaining system RAM is allocated to an
|
Otherwise, the remaining system RAM is allocated to an
|
||||||
additional node.
|
additional node.
|
||||||
|
|
||||||
numa=hotadd=percent
|
|
||||||
Only allow hotadd memory to preallocate page structures upto
|
|
||||||
percent of already available memory.
|
|
||||||
numa=hotadd=0 will disable hotadd memory.
|
|
||||||
|
|
||||||
ACPI
|
ACPI
|
||||||
|
|
||||||
acpi=off Don't enable ACPI
|
acpi=off Don't enable ACPI
|
||||||
|
|||||||
@@ -6,10 +6,11 @@ Virtual memory map with 4 level page tables:
|
|||||||
0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm
|
0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm
|
||||||
hole caused by [48:63] sign extension
|
hole caused by [48:63] sign extension
|
||||||
ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole
|
ffff800000000000 - ffff80ffffffffff (=40 bits) guard hole
|
||||||
ffff880000000000 - ffffc0ffffffffff (=57 TB) direct mapping of all phys. memory
|
ffff880000000000 - ffffc7ffffffffff (=64 TB) direct mapping of all phys. memory
|
||||||
ffffc10000000000 - ffffc1ffffffffff (=40 bits) hole
|
ffffc80000000000 - ffffc8ffffffffff (=40 bits) hole
|
||||||
ffffc20000000000 - ffffe1ffffffffff (=45 bits) vmalloc/ioremap space
|
ffffc90000000000 - ffffe8ffffffffff (=45 bits) vmalloc/ioremap space
|
||||||
ffffe20000000000 - ffffe2ffffffffff (=40 bits) virtual memory map (1TB)
|
ffffe90000000000 - ffffe9ffffffffff (=40 bits) hole
|
||||||
|
ffffea0000000000 - ffffeaffffffffff (=40 bits) virtual memory map (1TB)
|
||||||
... unused hole ...
|
... unused hole ...
|
||||||
ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0
|
ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0
|
||||||
ffffffffa0000000 - fffffffffff00000 (=1536 MB) module mapping space
|
ffffffffa0000000 - fffffffffff00000 (=1536 MB) module mapping space
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
VERSION = 2
|
VERSION = 2
|
||||||
PATCHLEVEL = 6
|
PATCHLEVEL = 6
|
||||||
SUBLEVEL = 30
|
SUBLEVEL = 30
|
||||||
EXTRAVERSION = -rc8
|
EXTRAVERSION =
|
||||||
NAME = Man-Eating Seals of Antiquity
|
NAME = Man-Eating Seals of Antiquity
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
@@ -533,7 +533,7 @@ endif
|
|||||||
|
|
||||||
include $(srctree)/arch/$(SRCARCH)/Makefile
|
include $(srctree)/arch/$(SRCARCH)/Makefile
|
||||||
|
|
||||||
ifneq (CONFIG_FRAME_WARN,0)
|
ifneq ($(CONFIG_FRAME_WARN),0)
|
||||||
KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
|
KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -176,22 +176,26 @@ cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
dp264_set_affinity(unsigned int irq, const struct cpumask *affinity)
|
dp264_set_affinity(unsigned int irq, const struct cpumask *affinity)
|
||||||
{
|
{
|
||||||
spin_lock(&dp264_irq_lock);
|
spin_lock(&dp264_irq_lock);
|
||||||
cpu_set_irq_affinity(irq, *affinity);
|
cpu_set_irq_affinity(irq, *affinity);
|
||||||
tsunami_update_irq_hw(cached_irq_mask);
|
tsunami_update_irq_hw(cached_irq_mask);
|
||||||
spin_unlock(&dp264_irq_lock);
|
spin_unlock(&dp264_irq_lock);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
clipper_set_affinity(unsigned int irq, const struct cpumask *affinity)
|
clipper_set_affinity(unsigned int irq, const struct cpumask *affinity)
|
||||||
{
|
{
|
||||||
spin_lock(&dp264_irq_lock);
|
spin_lock(&dp264_irq_lock);
|
||||||
cpu_set_irq_affinity(irq - 16, *affinity);
|
cpu_set_irq_affinity(irq - 16, *affinity);
|
||||||
tsunami_update_irq_hw(cached_irq_mask);
|
tsunami_update_irq_hw(cached_irq_mask);
|
||||||
spin_unlock(&dp264_irq_lock);
|
spin_unlock(&dp264_irq_lock);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct hw_interrupt_type dp264_irq_type = {
|
static struct hw_interrupt_type dp264_irq_type = {
|
||||||
|
|||||||
@@ -157,13 +157,15 @@ titan_cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
titan_set_irq_affinity(unsigned int irq, const struct cpumask *affinity)
|
titan_set_irq_affinity(unsigned int irq, const struct cpumask *affinity)
|
||||||
{
|
{
|
||||||
spin_lock(&titan_irq_lock);
|
spin_lock(&titan_irq_lock);
|
||||||
titan_cpu_set_irq_affinity(irq - 16, *affinity);
|
titan_cpu_set_irq_affinity(irq - 16, *affinity);
|
||||||
titan_update_irq_hw(titan_cached_irq_mask);
|
titan_update_irq_hw(titan_cached_irq_mask);
|
||||||
spin_unlock(&titan_irq_lock);
|
spin_unlock(&titan_irq_lock);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ static void gic_unmask_irq(unsigned int irq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
static void gic_set_cpu(unsigned int irq, const struct cpumask *mask_val)
|
static int gic_set_cpu(unsigned int irq, const struct cpumask *mask_val)
|
||||||
{
|
{
|
||||||
void __iomem *reg = gic_dist_base(irq) + GIC_DIST_TARGET + (gic_irq(irq) & ~3);
|
void __iomem *reg = gic_dist_base(irq) + GIC_DIST_TARGET + (gic_irq(irq) & ~3);
|
||||||
unsigned int shift = (irq % 4) * 8;
|
unsigned int shift = (irq % 4) * 8;
|
||||||
@@ -122,6 +122,8 @@ static void gic_set_cpu(unsigned int irq, const struct cpumask *mask_val)
|
|||||||
val |= 1 << (cpu + shift);
|
val |= 1 << (cpu + shift);
|
||||||
writel(val, reg);
|
writel(val, reg);
|
||||||
spin_unlock(&irq_controller_lock);
|
spin_unlock(&irq_controller_lock);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -7,4 +7,20 @@
|
|||||||
#define L1_CACHE_SHIFT 5
|
#define L1_CACHE_SHIFT 5
|
||||||
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
|
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Memory returned by kmalloc() may be used for DMA, so we must make
|
||||||
|
* sure that all such allocations are cache aligned. Otherwise,
|
||||||
|
* unrelated code may cause parts of the buffer to be read into the
|
||||||
|
* cache before the transfer is done, causing old data to be seen by
|
||||||
|
* the CPU.
|
||||||
|
*/
|
||||||
|
#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
|
||||||
|
|
||||||
|
/*
|
||||||
|
* With EABI on ARMv5 and above we must have 64-bit aligned slab pointers.
|
||||||
|
*/
|
||||||
|
#if defined(CONFIG_AEABI) && (__LINUX_ARM_ARCH__ >= 5)
|
||||||
|
#define ARCH_SLAB_MINALIGN 8
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user