Commit fd299b2a authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet

docs: filesystems: convert caching/fscache.txt to ReST format

- Add a SPDX header;
- Adjust document and section titles;
- Comment out text ToC for html/pdf output;
- Some whitespace fixes and new line breaks;
- Add table markups;
- Add it to filesystems/index.rst.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/e33ec382a53cf10ffcbd802f6de3f384159cddba.1588021877.git.mchehab+huawei@kernel.orgSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 67145c23
========================== .. SPDX-License-Identifier: GPL-2.0
General Filesystem Caching
==========================
======== ==========================
OVERVIEW General Filesystem Caching
==========================
Overview
======== ========
This facility is a general purpose cache for network filesystems, though it This facility is a general purpose cache for network filesystems, though it
could be used for caching other things such as ISO9660 filesystems too. could be used for caching other things such as ISO9660 filesystems too.
FS-Cache mediates between cache backends (such as CacheFS) and network FS-Cache mediates between cache backends (such as CacheFS) and network
filesystems: filesystems::
+---------+ +---------+
| | +--------------+ | | +--------------+
...@@ -32,7 +33,7 @@ filesystems: ...@@ -32,7 +33,7 @@ filesystems:
Or to look at it another way, FS-Cache is a module that provides a caching Or to look at it another way, FS-Cache is a module that provides a caching
facility to a network filesystem such that the cache is transparent to the facility to a network filesystem such that the cache is transparent to the
user: user::
+---------+ +---------+
| | | |
...@@ -129,7 +130,7 @@ FS-Cache provides the following facilities: ...@@ -129,7 +130,7 @@ FS-Cache provides the following facilities:
FS-Cache maintains a virtual indexing tree in which all indices, files, objects FS-Cache maintains a virtual indexing tree in which all indices, files, objects
and pages are kept. Bits of this tree may actually reside in one or more and pages are kept. Bits of this tree may actually reside in one or more
caches. caches::
FSDEF FSDEF
| |
...@@ -147,7 +148,7 @@ caches. ...@@ -147,7 +148,7 @@ caches.
| | | | | | | | | |
+---+---+ +-----+ +---+ +------+------+ +-----+----+ +---+---+ +-----+ +---+ +------+------+ +-----+----+
| | | | | | | | | | | | | | | | | | | | | | | | | |
PG0 PG1 PG2 PG0 XATTR PG0 PG1 DIRENT DIRENT DIRENT R/W R/O Bak PG0 PG1 PG2 PG0 XATTR PG0 PG1 DIRENT DIRENT DIRENT R/W R/O Bak
| | | |
PG0 +-------+ PG0 +-------+
| | | |
...@@ -160,13 +161,13 @@ PG0 PG1 PG2 PG0 XATTR PG0 PG1 DIRENT DIRENT DIRENT R/W R/O Bak ...@@ -160,13 +161,13 @@ PG0 PG1 PG2 PG0 XATTR PG0 PG1 DIRENT DIRENT DIRENT R/W R/O Bak
In the example above, you can see two netfs's being backed: NFS and AFS. These In the example above, you can see two netfs's being backed: NFS and AFS. These
have different index hierarchies: have different index hierarchies:
(*) The NFS primary index contains per-server indices. Each server index is * The NFS primary index contains per-server indices. Each server index is
indexed by NFS file handles to get data file objects. Each data file indexed by NFS file handles to get data file objects. Each data file
objects can have an array of pages, but may also have further child objects can have an array of pages, but may also have further child
objects, such as extended attributes and directory entries. Extended objects, such as extended attributes and directory entries. Extended
attribute objects themselves have page-array contents. attribute objects themselves have page-array contents.
(*) The AFS primary index contains per-cell indices. Each cell index contains * The AFS primary index contains per-cell indices. Each cell index contains
per-logical-volume indices. Each of volume index contains up to three per-logical-volume indices. Each of volume index contains up to three
indices for the read-write, read-only and backup mirrors of those volumes. indices for the read-write, read-only and backup mirrors of those volumes.
Each of these contains vnode data file objects, each of which contains an Each of these contains vnode data file objects, each of which contains an
...@@ -194,11 +195,10 @@ found in: ...@@ -194,11 +195,10 @@ found in:
Documentation/filesystems/caching/object.rst Documentation/filesystems/caching/object.rst
======================= Statistical Information
STATISTICAL INFORMATION
======================= =======================
If FS-Cache is compiled with the following options enabled: If FS-Cache is compiled with the following options enabled::
CONFIG_FSCACHE_STATS=y CONFIG_FSCACHE_STATS=y
CONFIG_FSCACHE_HISTOGRAM=y CONFIG_FSCACHE_HISTOGRAM=y
...@@ -206,111 +206,217 @@ If FS-Cache is compiled with the following options enabled: ...@@ -206,111 +206,217 @@ If FS-Cache is compiled with the following options enabled:
then it will gather certain statistics and display them through a number of then it will gather certain statistics and display them through a number of
proc files. proc files.
(*) /proc/fs/fscache/stats /proc/fs/fscache/stats
----------------------
This shows counts of a number of events that can happen in FS-Cache: This shows counts of a number of events that can happen in FS-Cache:
CLASS EVENT MEANING +--------------+-------+-------------------------------------------------------+
======= ======= ======================================================= |CLASS |EVENT |MEANING |
Cookies idx=N Number of index cookies allocated +==============+=======+=======================================================+
dat=N Number of data storage cookies allocated |Cookies |idx=N |Number of index cookies allocated |
spc=N Number of special cookies allocated + +-------+-------------------------------------------------------+
Objects alc=N Number of objects allocated | |dat=N |Number of data storage cookies allocated |
nal=N Number of object allocation failures + +-------+-------------------------------------------------------+
avl=N Number of objects that reached the available state | |spc=N |Number of special cookies allocated |
ded=N Number of objects that reached the dead state +--------------+-------+-------------------------------------------------------+
ChkAux non=N Number of objects that didn't have a coherency check |Objects |alc=N |Number of objects allocated |
ok=N Number of objects that passed a coherency check + +-------+-------------------------------------------------------+
upd=N Number of objects that needed a coherency data update | |nal=N |Number of object allocation failures |
obs=N Number of objects that were declared obsolete + +-------+-------------------------------------------------------+
Pages mrk=N Number of pages marked as being cached | |avl=N |Number of objects that reached the available state |
unc=N Number of uncache page requests seen + +-------+-------------------------------------------------------+
Acquire n=N Number of acquire cookie requests seen | |ded=N |Number of objects that reached the dead state |
nul=N Number of acq reqs given a NULL parent +--------------+-------+-------------------------------------------------------+
noc=N Number of acq reqs rejected due to no cache available |ChkAux |non=N |Number of objects that didn't have a coherency check |
ok=N Number of acq reqs succeeded + +-------+-------------------------------------------------------+
nbf=N Number of acq reqs rejected due to error | |ok=N |Number of objects that passed a coherency check |
oom=N Number of acq reqs failed on ENOMEM + +-------+-------------------------------------------------------+
Lookups n=N Number of lookup calls made on cache backends | |upd=N |Number of objects that needed a coherency data update |
neg=N Number of negative lookups made + +-------+-------------------------------------------------------+
pos=N Number of positive lookups made | |obs=N |Number of objects that were declared obsolete |
crt=N Number of objects created by lookup +--------------+-------+-------------------------------------------------------+
tmo=N Number of lookups timed out and requeued |Pages |mrk=N |Number of pages marked as being cached |
Updates n=N Number of update cookie requests seen | |unc=N |Number of uncache page requests seen |
nul=N Number of upd reqs given a NULL parent +--------------+-------+-------------------------------------------------------+
run=N Number of upd reqs granted CPU time |Acquire |n=N |Number of acquire cookie requests seen |
Relinqs n=N Number of relinquish cookie requests seen + +-------+-------------------------------------------------------+
nul=N Number of rlq reqs given a NULL parent | |nul=N |Number of acq reqs given a NULL parent |
wcr=N Number of rlq reqs waited on completion of creation + +-------+-------------------------------------------------------+
AttrChg n=N Number of attribute changed requests seen | |noc=N |Number of acq reqs rejected due to no cache available |
ok=N Number of attr changed requests queued + +-------+-------------------------------------------------------+
nbf=N Number of attr changed rejected -ENOBUFS | |ok=N |Number of acq reqs succeeded |
oom=N Number of attr changed failed -ENOMEM + +-------+-------------------------------------------------------+
run=N Number of attr changed ops given CPU time | |nbf=N |Number of acq reqs rejected due to error |
Allocs n=N Number of allocation requests seen + +-------+-------------------------------------------------------+
ok=N Number of successful alloc reqs | |oom=N |Number of acq reqs failed on ENOMEM |
wt=N Number of alloc reqs that waited on lookup completion +--------------+-------+-------------------------------------------------------+
nbf=N Number of alloc reqs rejected -ENOBUFS |Lookups |n=N |Number of lookup calls made on cache backends |
int=N Number of alloc reqs aborted -ERESTARTSYS + +-------+-------------------------------------------------------+
ops=N Number of alloc reqs submitted | |neg=N |Number of negative lookups made |
owt=N Number of alloc reqs waited for CPU time + +-------+-------------------------------------------------------+
abt=N Number of alloc reqs aborted due to object death | |pos=N |Number of positive lookups made |
Retrvls n=N Number of retrieval (read) requests seen + +-------+-------------------------------------------------------+
ok=N Number of successful retr reqs | |crt=N |Number of objects created by lookup |
wt=N Number of retr reqs that waited on lookup completion + +-------+-------------------------------------------------------+
nod=N Number of retr reqs returned -ENODATA | |tmo=N |Number of lookups timed out and requeued |
nbf=N Number of retr reqs rejected -ENOBUFS +--------------+-------+-------------------------------------------------------+
int=N Number of retr reqs aborted -ERESTARTSYS |Updates |n=N |Number of update cookie requests seen |
oom=N Number of retr reqs failed -ENOMEM + +-------+-------------------------------------------------------+
ops=N Number of retr reqs submitted | |nul=N |Number of upd reqs given a NULL parent |
owt=N Number of retr reqs waited for CPU time + +-------+-------------------------------------------------------+
abt=N Number of retr reqs aborted due to object death | |run=N |Number of upd reqs granted CPU time |
Stores n=N Number of storage (write) requests seen +--------------+-------+-------------------------------------------------------+
ok=N Number of successful store reqs |Relinqs |n=N |Number of relinquish cookie requests seen |
agn=N Number of store reqs on a page already pending storage + +-------+-------------------------------------------------------+
nbf=N Number of store reqs rejected -ENOBUFS | |nul=N |Number of rlq reqs given a NULL parent |
oom=N Number of store reqs failed -ENOMEM + +-------+-------------------------------------------------------+
ops=N Number of store reqs submitted | |wcr=N |Number of rlq reqs waited on completion of creation |
run=N Number of store reqs granted CPU time +--------------+-------+-------------------------------------------------------+
pgs=N Number of pages given store req processing time |AttrChg |n=N |Number of attribute changed requests seen |
rxd=N Number of store reqs deleted from tracking tree + +-------+-------------------------------------------------------+
olm=N Number of store reqs over store limit | |ok=N |Number of attr changed requests queued |
VmScan nos=N Number of release reqs against pages with no pending store + +-------+-------------------------------------------------------+
gon=N Number of release reqs against pages stored by time lock granted | |nbf=N |Number of attr changed rejected -ENOBUFS |
bsy=N Number of release reqs ignored due to in-progress store + +-------+-------------------------------------------------------+
can=N Number of page stores cancelled due to release req | |oom=N |Number of attr changed failed -ENOMEM |
Ops pend=N Number of times async ops added to pending queues + +-------+-------------------------------------------------------+
run=N Number of times async ops given CPU time | |run=N |Number of attr changed ops given CPU time |
enq=N Number of times async ops queued for processing +--------------+-------+-------------------------------------------------------+
can=N Number of async ops cancelled |Allocs |n=N |Number of allocation requests seen |
rej=N Number of async ops rejected due to object lookup/create failure + +-------+-------------------------------------------------------+
ini=N Number of async ops initialised | |ok=N |Number of successful alloc reqs |
dfr=N Number of async ops queued for deferred release + +-------+-------------------------------------------------------+
rel=N Number of async ops released (should equal ini=N when idle) | |wt=N |Number of alloc reqs that waited on lookup completion |
gc=N Number of deferred-release async ops garbage collected + +-------+-------------------------------------------------------+
CacheOp alo=N Number of in-progress alloc_object() cache ops | |nbf=N |Number of alloc reqs rejected -ENOBUFS |
luo=N Number of in-progress lookup_object() cache ops + +-------+-------------------------------------------------------+
luc=N Number of in-progress lookup_complete() cache ops | |int=N |Number of alloc reqs aborted -ERESTARTSYS |
gro=N Number of in-progress grab_object() cache ops + +-------+-------------------------------------------------------+
upo=N Number of in-progress update_object() cache ops | |ops=N |Number of alloc reqs submitted |
dro=N Number of in-progress drop_object() cache ops + +-------+-------------------------------------------------------+
pto=N Number of in-progress put_object() cache ops | |owt=N |Number of alloc reqs waited for CPU time |
syn=N Number of in-progress sync_cache() cache ops + +-------+-------------------------------------------------------+
atc=N Number of in-progress attr_changed() cache ops | |abt=N |Number of alloc reqs aborted due to object death |
rap=N Number of in-progress read_or_alloc_page() cache ops +--------------+-------+-------------------------------------------------------+
ras=N Number of in-progress read_or_alloc_pages() cache ops |Retrvls |n=N |Number of retrieval (read) requests seen |
alp=N Number of in-progress allocate_page() cache ops + +-------+-------------------------------------------------------+
als=N Number of in-progress allocate_pages() cache ops | |ok=N |Number of successful retr reqs |
wrp=N Number of in-progress write_page() cache ops + +-------+-------------------------------------------------------+
ucp=N Number of in-progress uncache_page() cache ops | |wt=N |Number of retr reqs that waited on lookup completion |
dsp=N Number of in-progress dissociate_pages() cache ops + +-------+-------------------------------------------------------+
CacheEv nsp=N Number of object lookups/creations rejected due to lack of space | |nod=N |Number of retr reqs returned -ENODATA |
stl=N Number of stale objects deleted + +-------+-------------------------------------------------------+
rtr=N Number of objects retired when relinquished | |nbf=N |Number of retr reqs rejected -ENOBUFS |
cul=N Number of objects culled + +-------+-------------------------------------------------------+
| |int=N |Number of retr reqs aborted -ERESTARTSYS |
+ +-------+-------------------------------------------------------+
(*) /proc/fs/fscache/histogram | |oom=N |Number of retr reqs failed -ENOMEM |
+ +-------+-------------------------------------------------------+
| |ops=N |Number of retr reqs submitted |
+ +-------+-------------------------------------------------------+
| |owt=N |Number of retr reqs waited for CPU time |
+ +-------+-------------------------------------------------------+
| |abt=N |Number of retr reqs aborted due to object death |
+--------------+-------+-------------------------------------------------------+
|Stores |n=N |Number of storage (write) requests seen |
+ +-------+-------------------------------------------------------+
| |ok=N |Number of successful store reqs |
+ +-------+-------------------------------------------------------+
| |agn=N |Number of store reqs on a page already pending storage |
+ +-------+-------------------------------------------------------+
| |nbf=N |Number of store reqs rejected -ENOBUFS |
+ +-------+-------------------------------------------------------+
| |oom=N |Number of store reqs failed -ENOMEM |
+ +-------+-------------------------------------------------------+
| |ops=N |Number of store reqs submitted |
+ +-------+-------------------------------------------------------+
| |run=N |Number of store reqs granted CPU time |
+ +-------+-------------------------------------------------------+
| |pgs=N |Number of pages given store req processing time |
+ +-------+-------------------------------------------------------+
| |rxd=N |Number of store reqs deleted from tracking tree |
+ +-------+-------------------------------------------------------+
| |olm=N |Number of store reqs over store limit |
+--------------+-------+-------------------------------------------------------+
|VmScan |nos=N |Number of release reqs against pages with no |
| | |pending store |
+ +-------+-------------------------------------------------------+
| |gon=N |Number of release reqs against pages stored by |
| | |time lock granted |
+ +-------+-------------------------------------------------------+
| |bsy=N |Number of release reqs ignored due to in-progress store|
+ +-------+-------------------------------------------------------+
| |can=N |Number of page stores cancelled due to release req |
+--------------+-------+-------------------------------------------------------+
|Ops |pend=N |Number of times async ops added to pending queues |
+ +-------+-------------------------------------------------------+
| |run=N |Number of times async ops given CPU time |
+ +-------+-------------------------------------------------------+
| |enq=N |Number of times async ops queued for processing |
+ +-------+-------------------------------------------------------+
| |can=N |Number of async ops cancelled |
+ +-------+-------------------------------------------------------+
| |rej=N |Number of async ops rejected due to object |
| | |lookup/create failure |
+ +-------+-------------------------------------------------------+
| |ini=N |Number of async ops initialised |
+ +-------+-------------------------------------------------------+
| |dfr=N |Number of async ops queued for deferred release |
+ +-------+-------------------------------------------------------+
| |rel=N |Number of async ops released |
| | |(should equal ini=N when idle) |
+ +-------+-------------------------------------------------------+
| |gc=N |Number of deferred-release async ops garbage collected |
+--------------+-------+-------------------------------------------------------+
|CacheOp |alo=N |Number of in-progress alloc_object() cache ops |
+ +-------+-------------------------------------------------------+
| |luo=N |Number of in-progress lookup_object() cache ops |
+ +-------+-------------------------------------------------------+
| |luc=N |Number of in-progress lookup_complete() cache ops |
+ +-------+-------------------------------------------------------+
| |gro=N |Number of in-progress grab_object() cache ops |
+ +-------+-------------------------------------------------------+
| |upo=N |Number of in-progress update_object() cache ops |
+ +-------+-------------------------------------------------------+
| |dro=N |Number of in-progress drop_object() cache ops |
+ +-------+-------------------------------------------------------+
| |pto=N |Number of in-progress put_object() cache ops |
+ +-------+-------------------------------------------------------+
| |syn=N |Number of in-progress sync_cache() cache ops |
+ +-------+-------------------------------------------------------+
| |atc=N |Number of in-progress attr_changed() cache ops |
+ +-------+-------------------------------------------------------+
| |rap=N |Number of in-progress read_or_alloc_page() cache ops |
+ +-------+-------------------------------------------------------+
| |ras=N |Number of in-progress read_or_alloc_pages() cache ops |
+ +-------+-------------------------------------------------------+
| |alp=N |Number of in-progress allocate_page() cache ops |
+ +-------+-------------------------------------------------------+
| |als=N |Number of in-progress allocate_pages() cache ops |
+ +-------+-------------------------------------------------------+
| |wrp=N |Number of in-progress write_page() cache ops |
+ +-------+-------------------------------------------------------+
| |ucp=N |Number of in-progress uncache_page() cache ops |
+ +-------+-------------------------------------------------------+
| |dsp=N |Number of in-progress dissociate_pages() cache ops |
+--------------+-------+-------------------------------------------------------+
|CacheEv |nsp=N |Number of object lookups/creations rejected due to |
| | |lack of space |
+ +-------+-------------------------------------------------------+
| |stl=N |Number of stale objects deleted |
+ +-------+-------------------------------------------------------+
| |rtr=N |Number of objects retired when relinquished |
+ +-------+-------------------------------------------------------+
| |cul=N |Number of objects culled |
+--------------+-------+-------------------------------------------------------+
/proc/fs/fscache/histogram
--------------------------
::
cat /proc/fs/fscache/histogram cat /proc/fs/fscache/histogram
JIFS SECS OBJ INST OP RUNS OBJ RUNS RETRV DLY RETRIEVLS JIFS SECS OBJ INST OP RUNS OBJ RUNS RETRV DLY RETRIEVLS
...@@ -320,30 +426,32 @@ proc files. ...@@ -320,30 +426,32 @@ proc files.
between 0 jiffies and HZ-1 jiffies a variety of tasks took to run. The between 0 jiffies and HZ-1 jiffies a variety of tasks took to run. The
columns are as follows: columns are as follows:
========= =======================================================
COLUMN TIME MEASUREMENT COLUMN TIME MEASUREMENT
======= ======================================================= ========= =======================================================
OBJ INST Length of time to instantiate an object OBJ INST Length of time to instantiate an object
OP RUNS Length of time a call to process an operation took OP RUNS Length of time a call to process an operation took
OBJ RUNS Length of time a call to process an object event took OBJ RUNS Length of time a call to process an object event took
RETRV DLY Time between an requesting a read and lookup completing RETRV DLY Time between an requesting a read and lookup completing
RETRIEVLS Time between beginning and end of a retrieval RETRIEVLS Time between beginning and end of a retrieval
========= =======================================================
Each row shows the number of events that took a particular range of times. Each row shows the number of events that took a particular range of times.
Each step is 1 jiffy in size. The JIFS column indicates the particular Each step is 1 jiffy in size. The JIFS column indicates the particular
jiffy range covered, and the SECS field the equivalent number of seconds. jiffy range covered, and the SECS field the equivalent number of seconds.
===========
OBJECT LIST Object List
=========== ===========
If CONFIG_FSCACHE_OBJECT_LIST is enabled, the FS-Cache facility will maintain a If CONFIG_FSCACHE_OBJECT_LIST is enabled, the FS-Cache facility will maintain a
list of all the objects currently allocated and allow them to be viewed list of all the objects currently allocated and allow them to be viewed
through: through::
/proc/fs/fscache/objects /proc/fs/fscache/objects
This will look something like: This will look something like::
[root@andromeda ~]# head /proc/fs/fscache/objects [root@andromeda ~]# head /proc/fs/fscache/objects
OBJECT PARENT STAT CHLDN OPS OOP IPR EX READS EM EV F S | NETFS_COOKIE_DEF TY FL NETFS_DATA OBJECT_KEY, AUX_DATA OBJECT PARENT STAT CHLDN OPS OOP IPR EX READS EM EV F S | NETFS_COOKIE_DEF TY FL NETFS_DATA OBJECT_KEY, AUX_DATA
...@@ -353,6 +461,7 @@ This will look something like: ...@@ -353,6 +461,7 @@ This will look something like:
where the first set of columns before the '|' describe the object: where the first set of columns before the '|' describe the object:
======= ===============================================================
COLUMN DESCRIPTION COLUMN DESCRIPTION
======= =============================================================== ======= ===============================================================
OBJECT Object debugging ID (appears as OBJ%x in some debug messages) OBJECT Object debugging ID (appears as OBJ%x in some debug messages)
...@@ -368,30 +477,36 @@ where the first set of columns before the '|' describe the object: ...@@ -368,30 +477,36 @@ where the first set of columns before the '|' describe the object:
EV Events raised on this object EV Events raised on this object
F Object flags F Object flags
S Object work item busy state mask (1:pending 2:running) S Object work item busy state mask (1:pending 2:running)
======= ===============================================================
and the second set of columns describe the object's cookie, if present: and the second set of columns describe the object's cookie, if present:
================ ======================================================
COLUMN DESCRIPTION COLUMN DESCRIPTION
=============== ======================================================= ================ ======================================================
NETFS_COOKIE_DEF Name of netfs cookie definition NETFS_COOKIE_DEF Name of netfs cookie definition
TY Cookie type (IX - index, DT - data, hex - special) TY Cookie type (IX - index, DT - data, hex - special)
FL Cookie flags FL Cookie flags
NETFS_DATA Netfs private data stored in the cookie NETFS_DATA Netfs private data stored in the cookie
OBJECT_KEY Object key } 1 column, with separating comma OBJECT_KEY Object key } 1 column, with separating comma
AUX_DATA Object aux data } presence may be configured AUX_DATA Object aux data } presence may be configured
================ ======================================================
The data shown may be filtered by attaching the a key to an appropriate keyring The data shown may be filtered by attaching the a key to an appropriate keyring
before viewing the file. Something like: before viewing the file. Something like::
keyctl add user fscache:objlist <restrictions> @s keyctl add user fscache:objlist <restrictions> @s
where <restrictions> are a selection of the following letters: where <restrictions> are a selection of the following letters:
== =========================================================
K Show hexdump of object key (don't show if not given) K Show hexdump of object key (don't show if not given)
A Show hexdump of object aux data (don't show if not given) A Show hexdump of object aux data (don't show if not given)
== =========================================================
and the following paired letters: and the following paired letters:
== =========================================================
C Show objects that have a cookie C Show objects that have a cookie
c Show objects that don't have a cookie c Show objects that don't have a cookie
B Show objects that are busy B Show objects that are busy
...@@ -402,6 +517,7 @@ and the following paired letters: ...@@ -402,6 +517,7 @@ and the following paired letters:
r Show objects that don't have outstanding reads r Show objects that don't have outstanding reads
S Show objects that have work queued S Show objects that have work queued
s Show objects that don't have work queued s Show objects that don't have work queued
== =========================================================
If neither side of a letter pair is given, then both are implied. For example: If neither side of a letter pair is given, then both are implied. For example:
...@@ -414,17 +530,17 @@ not implied. ...@@ -414,17 +530,17 @@ not implied.
By default all objects and all fields will be shown. By default all objects and all fields will be shown.
========= Debugging
DEBUGGING
========= =========
If CONFIG_FSCACHE_DEBUG is enabled, the FS-Cache facility can have runtime If CONFIG_FSCACHE_DEBUG is enabled, the FS-Cache facility can have runtime
debugging enabled by adjusting the value in: debugging enabled by adjusting the value in::
/sys/module/fscache/parameters/debug /sys/module/fscache/parameters/debug
This is a bitmask of debugging streams to enable: This is a bitmask of debugging streams to enable:
======= ======= =============================== =======================
BIT VALUE STREAM POINT BIT VALUE STREAM POINT
======= ======= =============================== ======================= ======= ======= =============================== =======================
0 1 Cache management Function entry trace 0 1 Cache management Function entry trace
...@@ -439,9 +555,10 @@ This is a bitmask of debugging streams to enable: ...@@ -439,9 +555,10 @@ This is a bitmask of debugging streams to enable:
9 512 Operation management Function entry trace 9 512 Operation management Function entry trace
10 1024 Function exit trace 10 1024 Function exit trace
11 2048 General 11 2048 General
======= ======= =============================== =======================
The appropriate set of values should be OR'd together and the result written to The appropriate set of values should be OR'd together and the result written to
the control file. For example: the control file. For example::
echo $((1|8|64)) >/sys/module/fscache/parameters/debug echo $((1|8|64)) >/sys/module/fscache/parameters/debug
......
...@@ -6,4 +6,5 @@ Filesystem Caching ...@@ -6,4 +6,5 @@ Filesystem Caching
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
fscache
object object
...@@ -8,7 +8,7 @@ config FSCACHE ...@@ -8,7 +8,7 @@ config FSCACHE
Different sorts of caches can be plugged in, depending on the Different sorts of caches can be plugged in, depending on the
resources available. resources available.
See Documentation/filesystems/caching/fscache.txt for more information. See Documentation/filesystems/caching/fscache.rst for more information.
config FSCACHE_STATS config FSCACHE_STATS
bool "Gather statistical information on local caching" bool "Gather statistical information on local caching"
...@@ -25,7 +25,7 @@ config FSCACHE_STATS ...@@ -25,7 +25,7 @@ config FSCACHE_STATS
between CPUs. On the other hand, the stats are very useful for between CPUs. On the other hand, the stats are very useful for
debugging purposes. Saying 'Y' here is recommended. debugging purposes. Saying 'Y' here is recommended.
See Documentation/filesystems/caching/fscache.txt for more information. See Documentation/filesystems/caching/fscache.rst for more information.
config FSCACHE_HISTOGRAM config FSCACHE_HISTOGRAM
bool "Gather latency information on local caching" bool "Gather latency information on local caching"
...@@ -42,7 +42,7 @@ config FSCACHE_HISTOGRAM ...@@ -42,7 +42,7 @@ config FSCACHE_HISTOGRAM
bouncing between CPUs. On the other hand, the histogram may be bouncing between CPUs. On the other hand, the histogram may be
useful for debugging purposes. Saying 'N' here is recommended. useful for debugging purposes. Saying 'N' here is recommended.
See Documentation/filesystems/caching/fscache.txt for more information. See Documentation/filesystems/caching/fscache.rst for more information.
config FSCACHE_DEBUG config FSCACHE_DEBUG
bool "Debug FS-Cache" bool "Debug FS-Cache"
...@@ -52,7 +52,7 @@ config FSCACHE_DEBUG ...@@ -52,7 +52,7 @@ config FSCACHE_DEBUG
management module. If this is set, the debugging output may be management module. If this is set, the debugging output may be
enabled by setting bits in /sys/modules/fscache/parameter/debug. enabled by setting bits in /sys/modules/fscache/parameter/debug.
See Documentation/filesystems/caching/fscache.txt for more information. See Documentation/filesystems/caching/fscache.rst for more information.
config FSCACHE_OBJECT_LIST config FSCACHE_OBJECT_LIST
bool "Maintain global object list for debugging purposes" bool "Maintain global object list for debugging purposes"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment