Skip to content

Commit 059db43

Browse files
rddunlapJonathan Corbet
authored andcommitted
Documentation/filesystems/proc.rst: copy-editing cleanup
Clean up Documentation/filesystems/proc.rst. This is basically fixing lots of spelling, grammar, punctuation, typos, spacing, consistency, section numbering, and headings. Signed-off-by: Randy Dunlap <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Corbet <[email protected]>
1 parent 6db35a2 commit 059db43

File tree

1 file changed

+55
-56
lines changed

1 file changed

+55
-56
lines changed

Documentation/filesystems/proc.rst

Lines changed: 55 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ show you how you can use /proc/sys to change settings.
123123
The directory /proc contains (among other things) one subdirectory for each
124124
process running on the system, which is named after the process ID (PID).
125125

126-
The link self points to the process reading the file system. Each process
126+
The link 'self' points to the process reading the file system. Each process
127127
subdirectory has the entries listed in Table 1-1.
128128

129-
Note that an open a file descriptor to /proc/<pid> or to any of its
129+
Note that an open file descriptor to /proc/<pid> or to any of its
130130
contained files or subdirectories does not prevent <pid> being reused
131131
for some other process in the event that <pid> exits. Operations on
132132
open /proc/<pid> file descriptors corresponding to dead processes
@@ -220,7 +220,7 @@ file /proc/PID/status. It fields are described in table 1-2.
220220

221221
The statm file contains more detailed information about the process
222222
memory usage. Its seven fields are explained in Table 1-3. The stat file
223-
contains details information about the process itself. Its fields are
223+
contains detailed information about the process itself. Its fields are
224224
explained in Table 1-4.
225225

226226
(for SMP CONFIG users)
@@ -782,7 +782,7 @@ SPU
782782
For this case the APIC will generate the interrupt with a IRQ vector
783783
of 0xff. This might also be generated by chipset bugs.
784784

785-
RES, CAL, TLB]
785+
RES, CAL, TLB
786786
rescheduling, call and TLB flush interrupts are
787787
sent from one CPU to another per the needs of the OS. Typically,
788788
their statistics are used by kernel developers and interested users to
@@ -794,7 +794,7 @@ suppressed when the system is a uniprocessor. As of this writing, only
794794
i386 and x86_64 platforms support the new IRQ vector displays.
795795

796796
Of some interest is the introduction of the /proc/irq directory to 2.4.
797-
It could be used to set IRQ to CPU affinity, this means that you can "hook" an
797+
It could be used to set IRQ to CPU affinity. This means that you can "hook" an
798798
IRQ to only one CPU, or to exclude a CPU of handling IRQs. The contents of the
799799
irq subdir is one subdir for each IRQ, and two files; default_smp_affinity and
800800
prof_cpu_mask.
@@ -808,7 +808,7 @@ For example::
808808
smp_affinity
809809

810810
smp_affinity is a bitmask, in which you can specify which CPUs can handle the
811-
IRQ, you can set it by doing::
811+
IRQ. You can set it by doing::
812812

813813
> echo 1 > /proc/irq/10/smp_affinity
814814

@@ -821,7 +821,7 @@ The contents of each smp_affinity file is the same by default::
821821
ffffffff
822822

823823
There is an alternate interface, smp_affinity_list which allows specifying
824-
a cpu range instead of a bitmask::
824+
a CPU range instead of a bitmask::
825825

826826
> cat /proc/irq/0/smp_affinity_list
827827
1024-1031
@@ -835,7 +835,7 @@ reports itself as being attached. This hardware locality information does not
835835
include information about any possible driver locality preference.
836836

837837
prof_cpu_mask specifies which CPUs are to be profiled by the system wide
838-
profiler. Default value is ffffffff (all cpus if there are only 32 of them).
838+
profiler. Default value is ffffffff (all CPUs if there are only 32 of them).
839839

840840
The way IRQs are routed is handled by the IO-APIC, and it's Round Robin
841841
between all the CPUs which are allowed to handle it. As usual the kernel has
@@ -897,7 +897,7 @@ pagetypeinfo::
897897

898898
Fragmentation avoidance in the kernel works by grouping pages of different
899899
migrate types into the same contiguous regions of memory called page blocks.
900-
A page block is typically the size of the default hugepage size e.g. 2MB on
900+
A page block is typically the size of the default hugepage size, e.g. 2MB on
901901
X86-64. By keeping pages grouped based on their ability to move, the kernel
902902
can reclaim pages within a page block to satisfy a high-order allocation.
903903

@@ -965,7 +965,7 @@ varies by architecture and compile options. The following is from a
965965
ShmemPmdMapped: 0 kB
966966

967967
MemTotal
968-
Total usable ram (i.e. physical ram minus a few reserved
968+
Total usable RAM (i.e. physical RAM minus a few reserved
969969
bits and the kernel binary code)
970970
MemFree
971971
The sum of LowFree+HighFree
@@ -996,7 +996,7 @@ Inactive
996996
Memory which has been less recently used. It is more
997997
eligible to be reclaimed for other purposes
998998
HighTotal, HighFree
999-
Highmem is all memory above ~860MB of physical memory
999+
Highmem is all memory above ~860MB of physical memory.
10001000
Highmem areas are for use by userspace programs, or
10011001
for the pagecache. The kernel must use tricks to access
10021002
this memory, making it slower to access than lowmem.
@@ -1078,7 +1078,7 @@ Committed_AS
10781078
using 1G. This 1G is memory which has been "committed" to
10791079
by the VM and can be used at any time by the allocating
10801080
application. With strict overcommit enabled on the system
1081-
(mode 2 in 'vm.overcommit_memory'),allocations which would
1081+
(mode 2 in 'vm.overcommit_memory'), allocations which would
10821082
exceed the CommitLimit (detailed above) will not be permitted.
10831083
This is useful if one needs to guarantee that processes will
10841084
not fail due to lack of memory once that memory has been
@@ -1099,7 +1099,7 @@ vmallocinfo
10991099
Provides information about vmalloced/vmaped areas. One line per area,
11001100
containing the virtual address range of the area, size in bytes,
11011101
caller information of the creator, and optional information depending
1102-
on the kind of area :
1102+
on the kind of area:
11031103

11041104
========== ===================================================
11051105
pages=nr number of pages
@@ -1144,21 +1144,21 @@ on the kind of area :
11441144
softirqs
11451145
~~~~~~~~
11461146

1147-
Provides counts of softirq handlers serviced since boot time, for each cpu.
1147+
Provides counts of softirq handlers serviced since boot time, for each CPU.
11481148

11491149
::
11501150

11511151
> cat /proc/softirqs
1152-
CPU0 CPU1 CPU2 CPU3
1152+
CPU0 CPU1 CPU2 CPU3
11531153
HI: 0 0 0 0
1154-
TIMER: 27166 27120 27097 27034
1154+
TIMER: 27166 27120 27097 27034
11551155
NET_TX: 0 0 0 17
11561156
NET_RX: 42 0 0 39
1157-
BLOCK: 0 0 107 1121
1158-
TASKLET: 0 0 0 290
1159-
SCHED: 27035 26983 26971 26746
1160-
HRTIMER: 0 0 0 0
1161-
RCU: 1678 1769 2178 2250
1157+
BLOCK: 0 0 107 1121
1158+
TASKLET: 0 0 0 290
1159+
SCHED: 27035 26983 26971 26746
1160+
HRTIMER: 0 0 0 0
1161+
RCU: 1678 1769 2178 2250
11621162

11631163

11641164
1.3 IDE devices in /proc/ide
@@ -1169,7 +1169,7 @@ the kernel is aware. There is one subdirectory for each IDE controller, the
11691169
file drivers and a link for each IDE device, pointing to the device directory
11701170
in the controller specific subtree.
11711171

1172-
The file drivers contains general information about the drivers used for the
1172+
The file 'drivers' contains general information about the drivers used for the
11731173
IDE devices::
11741174

11751175
> cat /proc/ide/drivers
@@ -1409,7 +1409,7 @@ These directories contain the four files shown in Table 1-10.
14091409
-------------------------
14101410

14111411
Information about the available and actually used tty's can be found in the
1412-
directory /proc/tty.You'll find entries for drivers and line disciplines in
1412+
directory /proc/tty. You'll find entries for drivers and line disciplines in
14131413
this directory, as shown in Table 1-11.
14141414

14151415

@@ -1471,9 +1471,9 @@ second). The meanings of the columns are as follows, from left to right:
14711471
- iowait: In a word, iowait stands for waiting for I/O to complete. But there
14721472
are several problems:
14731473

1474-
1. Cpu will not wait for I/O to complete, iowait is the time that a task is
1475-
waiting for I/O to complete. When cpu goes into idle state for
1476-
outstanding task io, another task will be scheduled on this CPU.
1474+
1. CPU will not wait for I/O to complete, iowait is the time that a task is
1475+
waiting for I/O to complete. When CPU goes into idle state for
1476+
outstanding task I/O, another task will be scheduled on this CPU.
14771477
2. In a multi-core CPU, the task waiting for I/O to complete is not running
14781478
on any CPU, so the iowait of each CPU is difficult to calculate.
14791479
3. The value of iowait field in /proc/stat will decrease in certain
@@ -1529,8 +1529,8 @@ in Table 1-12, below.
15291529
mb_groups details of multiblock allocator buddy cache of free blocks
15301530
============== ==========================================================
15311531

1532-
2.0 /proc/consoles
1533-
------------------
1532+
1.10 /proc/consoles
1533+
-------------------
15341534
Shows registered system console lines.
15351535

15361536
To see which character device lines are currently used for the system console
@@ -1590,10 +1590,9 @@ production system. Set up a development machine and test to make sure that
15901590
everything works the way you want it to. You may have no alternative but to
15911591
reboot the machine once an error has been made.
15921592

1593-
To change a value, simply echo the new value into the file. An example is
1594-
given below in the section on the file system data. You need to be root to do
1595-
this. You can create your own boot script to perform this every time your
1596-
system boots.
1593+
To change a value, simply echo the new value into the file.
1594+
You need to be root to do this. You can create your own boot script
1595+
to perform this every time your system boots.
15971596

15981597
The files in /proc/sys can be used to fine tune and monitor miscellaneous and
15991598
general things in the operation of the Linux kernel. Since some of the files
@@ -1624,8 +1623,8 @@ Chapter 3: Per-process Parameters
16241623
3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score
16251624
--------------------------------------------------------------------------------
16261625

1627-
These file can be used to adjust the badness heuristic used to select which
1628-
process gets killed in out of memory conditions.
1626+
These files can be used to adjust the badness heuristic used to select which
1627+
process gets killed in out of memory (oom) conditions.
16291628

16301629
The badness heuristic assigns a value to each candidate task ranging from 0
16311630
(never kill) to 1000 (always kill) to determine which process is targeted. The
@@ -1681,15 +1680,15 @@ minimal amount of work.
16811680
3.2 /proc/<pid>/oom_score - Display current oom-killer score
16821681
-------------------------------------------------------------
16831682

1684-
This file can be used to check the current score used by the oom-killer is for
1683+
This file can be used to check the current score used by the oom-killer for
16851684
any given <pid>. Use it together with /proc/<pid>/oom_score_adj to tune which
16861685
process should be killed in an out-of-memory situation.
16871686

16881687

16891688
3.3 /proc/<pid>/io - Display the IO accounting fields
16901689
-------------------------------------------------------
16911690

1692-
This file contains IO statistics for each running process
1691+
This file contains IO statistics for each running process.
16931692

16941693
Example
16951694
~~~~~~~
@@ -1720,7 +1719,7 @@ The number of bytes which this task has caused to be read from storage. This
17201719
is simply the sum of bytes which this process passed to read() and pread().
17211720
It includes things like tty IO and it is unaffected by whether or not actual
17221721
physical disk IO was required (the read might have been satisfied from
1723-
pagecache)
1722+
pagecache).
17241723

17251724

17261725
wchar
@@ -1878,7 +1877,7 @@ For more information on mount propagation see:
18781877

18791878
3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm
18801879
--------------------------------------------------------
1881-
These files provide a method to access a tasks comm value. It also allows for
1880+
These files provide a method to access a task's comm value. It also allows for
18821881
a task to set its own or one of its thread siblings comm value. The comm value
18831882
is limited in size compared to the cmdline value, so writing anything longer
18841883
then the kernel's TASK_COMM_LEN (currently 16 chars) will result in a truncated
@@ -1891,21 +1890,21 @@ This file provides a fast way to retrieve first level children pids
18911890
of a task pointed by <pid>/<tid> pair. The format is a space separated
18921891
stream of pids.
18931892

1894-
Note the "first level" here -- if a child has own children they will
1895-
not be listed here, one needs to read /proc/<children-pid>/task/<tid>/children
1893+
Note the "first level" here -- if a child has its own children they will
1894+
not be listed here; one needs to read /proc/<children-pid>/task/<tid>/children
18961895
to obtain the descendants.
18971896

18981897
Since this interface is intended to be fast and cheap it doesn't
18991898
guarantee to provide precise results and some children might be
19001899
skipped, especially if they've exited right after we printed their
1901-
pids, so one need to either stop or freeze processes being inspected
1900+
pids, so one needs to either stop or freeze processes being inspected
19021901
if precise results are needed.
19031902

19041903

19051904
3.8 /proc/<pid>/fdinfo/<fd> - Information about opened file
19061905
---------------------------------------------------------------
19071906
This file provides information associated with an opened file. The regular
1908-
files have at least three fields -- 'pos', 'flags' and mnt_id. The 'pos'
1907+
files have at least three fields -- 'pos', 'flags' and 'mnt_id'. The 'pos'
19091908
represents the current offset of the opened file in decimal form [see lseek(2)
19101909
for details], 'flags' denotes the octal O_xxx mask the file has been
19111910
created with [see open(2) for details] and 'mnt_id' represents mount ID of
@@ -1976,7 +1975,7 @@ For inotify files the format is the following::
19761975
flags: 02000000
19771976
inotify wd:3 ino:9e7e sdev:800013 mask:800afce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:7e9e0000640d1b6d
19781977

1979-
where 'wd' is a watch descriptor in decimal form, ie a target file
1978+
where 'wd' is a watch descriptor in decimal form, i.e. a target file
19801979
descriptor number, 'ino' and 'sdev' are inode and device where the
19811980
target file resides and the 'mask' is the mask of events, all in hex
19821981
form [see inotify(7) for more details].
@@ -2003,10 +2002,10 @@ For fanotify files the format is::
20032002
where fanotify 'flags' and 'event-flags' are values used in fanotify_init
20042003
call, 'mnt_id' is the mount point identifier, 'mflags' is the value of
20052004
flags associated with mark which are tracked separately from events
2006-
mask. 'ino', 'sdev' are target inode and device, 'mask' is the events
2005+
mask. 'ino' and 'sdev' are target inode and device, 'mask' is the events
20072006
mask and 'ignored_mask' is the mask of events which are to be ignored.
2008-
All in hex format. Incorporation of 'mflags', 'mask' and 'ignored_mask'
2009-
does provide information about flags and mask used in fanotify_mark
2007+
All are in hex format. Incorporation of 'mflags', 'mask' and 'ignored_mask'
2008+
provide information about flags and mask used in fanotify_mark
20102009
call [see fsnotify manpage for details].
20112010

20122011
While the first three lines are mandatory and always printed, the rest is
@@ -2029,7 +2028,7 @@ Timerfd files
20292028
where 'clockid' is the clock type and 'ticks' is the number of the timer expirations
20302029
that have occurred [see timerfd_create(2) for details]. 'settime flags' are
20312030
flags in octal form been used to setup the timer [see timerfd_settime(2) for
2032-
details]. 'it_value' is remaining time until the timer exiration.
2031+
details]. 'it_value' is remaining time until the timer expiration.
20332032
'it_interval' is the interval for the timer. Note the timer might be set up
20342033
with TIMER_ABSTIME option which will be shown in 'settime flags', but 'it_value'
20352034
still exhibits timer's remaining time.
@@ -2059,13 +2058,13 @@ are actually shared.
20592058
3.10 /proc/<pid>/timerslack_ns - Task timerslack value
20602059
---------------------------------------------------------
20612060
This file provides the value of the task's timerslack value in nanoseconds.
2062-
This value specifies a amount of time that normal timers may be deferred
2061+
This value specifies an amount of time that normal timers may be deferred
20632062
in order to coalesce timers and avoid unnecessary wakeups.
20642063

2065-
This allows a task's interactivity vs power consumption trade off to be
2064+
This allows a task's interactivity vs power consumption tradeoff to be
20662065
adjusted.
20672066

2068-
Writing 0 to the file will set the tasks timerslack to the default value.
2067+
Writing 0 to the file will set the task's timerslack to the default value.
20692068

20702069
Valid values are from 0 - ULLONG_MAX
20712070

@@ -2105,10 +2104,10 @@ Example
21052104
Description
21062105
~~~~~~~~~~~
21072106

2108-
x86 specific entries:
2107+
x86 specific entries
21092108
~~~~~~~~~~~~~~~~~~~~~
21102109

2111-
AVX512_elapsed_ms:
2110+
AVX512_elapsed_ms
21122111
^^^^^^^^^^^^^^^^^^
21132112

21142113
If AVX512 is supported on the machine, this entry shows the milliseconds
@@ -2134,8 +2133,8 @@ AVX512_elapsed_ms:
21342133
the task is unlikely an AVX512 user, but depends on the workload and the
21352134
scheduling scenario, it also could be a false negative mentioned above.
21362135

2137-
Configuring procfs
2138-
------------------
2136+
Chapter 4: Configuring procfs
2137+
=============================
21392138

21402139
4.1 Mount options
21412140
---------------------
@@ -2178,8 +2177,8 @@ information about processes information, just add identd to this group.
21782177
subset=pid hides all top level files and directories in the procfs that
21792178
are not related to tasks.
21802179

2181-
5 Filesystem behavior
2182-
---------------------------
2180+
Chapter 5: Filesystem behavior
2181+
==============================
21832182

21842183
Originally, before the advent of pid namepsace, procfs was a global file
21852184
system. It means that there was only one procfs instance in the system.

0 commit comments

Comments
 (0)