Skip to content

Commit

Permalink
Merge tag 'docs/v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/mchehab/linux-media

Pull rst conversion of docs from Mauro Carvalho Chehab:
 "As agreed with Jon, I'm sending this big series directly to you, c/c
  him, as this series required a special care, in order to avoid
  conflicts with other trees"

* tag 'docs/v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (77 commits)
  docs: kbuild: fix build with pdf and fix some minor issues
  docs: block: fix pdf output
  docs: arm: fix a breakage with pdf output
  docs: don't use nested tables
  docs: gpio: add sysfs interface to the admin-guide
  docs: locking: add it to the main index
  docs: add some directories to the main documentation index
  docs: add SPDX tags to new index files
  docs: add a memory-devices subdir to driver-api
  docs: phy: place documentation under driver-api
  docs: serial: move it to the driver-api
  docs: driver-api: add remaining converted dirs to it
  docs: driver-api: add xilinx driver API documentation
  docs: driver-api: add a series of orphaned documents
  docs: admin-guide: add a series of orphaned documents
  docs: cgroup-v1: add it to the admin-guide book
  docs: aoe: add it to the driver-api book
  docs: add some documentation dirs to the driver-api book
  docs: driver-model: move it to the driver-api book
  docs: lp855x-driver.rst: add it to the driver-api book
  ...
  • Loading branch information
torvalds committed Jul 16, 2019
2 parents 3e85947 + 1688694 commit c309b6f
Show file tree
Hide file tree
Showing 559 changed files with 10,527 additions and 7,593 deletions.
2 changes: 1 addition & 1 deletion CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -3120,7 +3120,7 @@ S: France
N: Rik van Riel
E: riel@redhat.com
W: http://www.surriel.com/
D: Linux-MM site, Documentation/sysctl/*, swap/mm readaround
D: Linux-MM site, Documentation/admin-guide/sysctl/*, swap/mm readaround
D: kswapd fixes, random kernel hacker, rmap VM,
D: nl.linux.org administrator, minor scheduler additions
S: Red Hat Boston
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ABI/obsolete/sysfs-gpio
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Description:
Kernel code may export it for complete or partial access.

GPIOs are identified as they are inside the kernel, using integers in
the range 0..INT_MAX. See Documentation/gpio for more information.
the range 0..INT_MAX. See Documentation/admin-guide/gpio for more information.

/sys/class/gpio
/export ... asks the kernel to export a GPIO to userspace
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ABI/removed/sysfs-class-rfkill
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rfkill - radio frequency (RF) connector kill switch support

For details to this subsystem look at Documentation/rfkill.txt.
For details to this subsystem look at Documentation/driver-api/rfkill.rst.

What: /sys/class/rfkill/rfkill[0-9]+/claim
Date: 09-Jul-2007
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ABI/stable/sysfs-class-rfkill
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rfkill - radio frequency (RF) connector kill switch support

For details to this subsystem look at Documentation/rfkill.txt.
For details to this subsystem look at Documentation/driver-api/rfkill.rst.

For the deprecated /sys/class/rfkill/*/claim knobs of this interface look in
Documentation/ABI/removed/sysfs-class-rfkill.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ABI/stable/sysfs-devices-node
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Date: October 2002
Contact: Linux Memory Management list <linux-mm@kvack.org>
Description:
The node's hit/miss statistics, in units of pages.
See Documentation/numastat.txt
See Documentation/admin-guide/numastat.rst

What: /sys/devices/system/node/nodeX/distance
Date: October 2002
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ABI/testing/procfs-diskstats
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ Description:
17 - sectors discarded
18 - time spent discarding

For more details refer to Documentation/iostats.txt
For more details refer to Documentation/admin-guide/iostats.rst
2 changes: 1 addition & 1 deletion Documentation/ABI/testing/sysfs-block
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Description:
9 - I/Os currently in progress
10 - time spent doing I/Os (ms)
11 - weighted time spent doing I/Os (ms)
For more details refer Documentation/iostats.txt
For more details refer Documentation/admin-guide/iostats.rst


What: /sys/block/<disk>/<part>/stat
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ABI/testing/sysfs-block-device
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Description:
- Values below -2 are rejected with -EINVAL

For more information, see
Documentation/laptops/disk-shock-protection.txt
Documentation/admin-guide/laptops/disk-shock-protection.rst


What: /sys/block/*/device/ncq_prio_enable
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ABI/testing/sysfs-class-switchtec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
switchtec - Microsemi Switchtec PCI Switch Management Endpoint

For details on this subsystem look at Documentation/switchtec.txt.
For details on this subsystem look at Documentation/driver-api/switchtec.rst.

What: /sys/class/switchtec
Date: 05-Jan-2017
Expand Down
4 changes: 2 additions & 2 deletions Documentation/ABI/testing/sysfs-devices-system-cpu
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Description: CPU topology files that describe kernel limits related to
present: cpus that have been identified as being present in
the system.

See Documentation/cputopology.txt for more information.
See Documentation/admin-guide/cputopology.rst for more information.


What: /sys/devices/system/cpu/probe
Expand Down Expand Up @@ -103,7 +103,7 @@ Description: CPU topology files that describe a logical CPU's relationship
thread_siblings_list: human-readable list of cpu#'s hardware
threads within the same core as cpu#

See Documentation/cputopology.txt for more information.
See Documentation/admin-guide/cputopology.rst for more information.


What: /sys/devices/system/cpu/cpuidle/current_driver
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ABI/testing/sysfs-platform-asus-laptop
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Description:
To control the LED display, use the following :
echo 0x0T000DDD > /sys/devices/platform/asus_laptop/
where T control the 3 letters display, and DDD the 3 digits display.
The DDD table can be found in Documentation/laptops/asus-laptop.txt
The DDD table can be found in Documentation/admin-guide/laptops/asus-laptop.rst

What: /sys/devices/platform/asus_laptop/bluetooth
Date: January 2007
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Documentation/DMA-API-HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ The standard 64-bit addressing device would do something like this::

If the device only supports 32-bit addressing for descriptors in the
coherent allocations, but supports full 64-bits for streaming mappings
it would look like this:
it would look like this::

if (dma_set_mask(dev, DMA_BIT_MASK(64))) {
dev_warn(dev, "mydev: No suitable DMA available\n");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
==================
Control Groupstats
==================

Control Groupstats is inspired by the discussion at
http://lkml.org/lkml/2007/4/11/187 and implements per cgroup statistics as
suggested by Andrew Morton in http://lkml.org/lkml/2007/4/11/263.
Expand All @@ -19,9 +23,9 @@ about tasks blocked on I/O. If CONFIG_TASK_DELAY_ACCT is disabled, this
information will not be available.

To extract cgroup statistics a utility very similar to getdelays.c
has been developed, the sample output of the utility is shown below
has been developed, the sample output of the utility is shown below::

~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup/a"
sleeping 1, blocked 0, running 1, stopped 0, uninterruptible 0
~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup"
sleeping 155, blocked 0, running 1, stopped 0, uninterruptible 2
~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup/a"
sleeping 1, blocked 0, running 1, stopped 0, uninterruptible 0
~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup"
sleeping 155, blocked 0, running 1, stopped 0, uninterruptible 2
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
================
Delay accounting
----------------
================

Tasks encounter delays in execution when they wait
for some kernel resource to become available e.g. a
Expand Down Expand Up @@ -39,7 +40,9 @@ in detail in a separate document in this directory. Taskstats returns a
generic data structure to userspace corresponding to per-pid and per-tgid
statistics. The delay accounting functionality populates specific fields of
this structure. See

include/linux/taskstats.h

for a description of the fields pertaining to delay accounting.
It will generally be in the form of counters returning the cumulative
delay seen for cpu, sync block I/O, swapin, memory reclaim etc.
Expand All @@ -61,13 +64,16 @@ also serves as an example of using the taskstats interface.
Usage
-----

Compile the kernel with
Compile the kernel with::

CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASKSTATS=y

Delay accounting is enabled by default at boot up.
To disable, add
To disable, add::

nodelayacct

to the kernel boot options. The rest of the instructions
below assume this has not been done.

Expand All @@ -78,40 +84,43 @@ The utility also allows a given command to be
executed and the corresponding delays to be
seen.

General format of the getdelays command
General format of the getdelays command::

getdelays [-t tgid] [-p pid] [-c cmd...]
getdelays [-t tgid] [-p pid] [-c cmd...]


Get delays, since system boot, for pid 10
# ./getdelays -p 10
(output similar to next case)
Get delays, since system boot, for pid 10::

Get sum of delays, since system boot, for all pids with tgid 5
# ./getdelays -t 5
# ./getdelays -p 10
(output similar to next case)

Get sum of delays, since system boot, for all pids with tgid 5::

CPU count real total virtual total delay total
7876 92005750 100000000 24001500
IO count delay total
0 0
SWAP count delay total
0 0
RECLAIM count delay total
0 0
# ./getdelays -t 5


CPU count real total virtual total delay total
7876 92005750 100000000 24001500
IO count delay total
0 0
SWAP count delay total
0 0
RECLAIM count delay total
0 0

Get delays seen in executing a given simple command::

Get delays seen in executing a given simple command
# ./getdelays -c ls /
# ./getdelays -c ls /

bin data1 data3 data5 dev home media opt root srv sys usr
boot data2 data4 data6 etc lib mnt proc sbin subdomain tmp var
bin data1 data3 data5 dev home media opt root srv sys usr
boot data2 data4 data6 etc lib mnt proc sbin subdomain tmp var


CPU count real total virtual total delay total
CPU count real total virtual total delay total
6 4000250 4000000 0
IO count delay total
IO count delay total
0 0
SWAP count delay total
SWAP count delay total
0 0
RECLAIM count delay total
RECLAIM count delay total
0 0
14 changes: 14 additions & 0 deletions Documentation/accounting/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. SPDX-License-Identifier: GPL-2.0
==========
Accounting
==========

.. toctree::
:maxdepth: 1

cgroupstats
delay-accounting
psi
taskstats
taskstats-struct
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ Pressure interface
Pressure information for each resource is exported through the
respective file in /proc/pressure/ -- cpu, memory, and io.

The format for CPU is as such:
The format for CPU is as such::

some avg10=0.00 avg60=0.00 avg300=0.00 total=0
some avg10=0.00 avg60=0.00 avg300=0.00 total=0

and for memory and IO:
and for memory and IO::

some avg10=0.00 avg60=0.00 avg300=0.00 total=0
full avg10=0.00 avg60=0.00 avg300=0.00 total=0
some avg10=0.00 avg60=0.00 avg300=0.00 total=0
full avg10=0.00 avg60=0.00 avg300=0.00 total=0

The "some" line indicates the share of time in which at least some
tasks are stalled on a given resource.
Expand Down Expand Up @@ -77,9 +77,9 @@ To register a trigger user has to open psi interface file under
/proc/pressure/ representing the resource to be monitored and write the
desired threshold and time window. The open file descriptor should be
used to wait for trigger events using select(), poll() or epoll().
The following format is used:
The following format is used::

<some|full> <stall amount in us> <time window in us>
<some|full> <stall amount in us> <time window in us>

For example writing "some 150000 1000000" into /proc/pressure/memory
would add 150ms threshold for partial memory stall measured within
Expand Down Expand Up @@ -115,18 +115,20 @@ trigger is closed.
Userspace monitor usage example
===============================

#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <poll.h>
#include <string.h>
#include <unistd.h>

/*
* Monitor memory partial stall with 1s tracking window size
* and 150ms threshold.
*/
int main() {
::

#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <poll.h>
#include <string.h>
#include <unistd.h>

/*
* Monitor memory partial stall with 1s tracking window size
* and 150ms threshold.
*/
int main() {
const char trig[] = "some 150000 1000000";
struct pollfd fds;
int n;
Expand Down Expand Up @@ -165,7 +167,7 @@ int main() {
}

return 0;
}
}

Cgroup2 interface
=================
Expand Down
Loading

0 comments on commit c309b6f

Please sign in to comment.