Skip to contentSkip to conversation

doc: cgroup: improve formatting

PATCH Applied Jakub Kicinski 2 participants 7 messages Feb 28, 2020 – Mar 2, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover doc: cgroup: improve formatting

A few small changes to the cgroup-v2 doc to improve it's rendering.

Jakub Kicinski (5):
doc: cgroup: improve formatting
doc: cgroup: improve formatting of mem stats
doc: cgroup: improve formatting of io example
doc: cgroup: improve formatting of cpuset examples
doc: cgroup: improve formatting of references

 Documentation/accounting/psi.rst              |  2 ++
 Documentation/admin-guide/cgroup-v1/index.rst |  2 ++
 Documentation/admin-guide/cgroup-v2.rst       | 28 ++++++-------------
 3 files changed, 12 insertions(+), 20 deletions(-)
Signature · 1 line
2.24.1
#1 lore raw

PATCH 1/5 doc: cgroup: improve formatting

Fix tabs vs spaces issue which cases the line to be considered a new list entry.

---
 Documentation/admin-guide/cgroup-v2.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/admin-guide/cgroup-v2.rst +1 -1
index 3f801461f0f3..723c8bd422cc 100644
@@ -1103,7 +1103,7 @@ PAGE_SIZE multiple when read back.
 	proportionally to the overage, reducing reclaim pressure for
 	smaller overages.
 
-       Effective min boundary is limited by memory.min values of
+	Effective min boundary is limited by memory.min values of
 	all ancestor cgroups. If there is memory.min overcommitment
 	(child cgroup or cgroups are requiring more protected memory
 	than parent will allow), then each child cgroup will get
Signature · 1 line
2.24.1
#2 lore raw

PATCH 2/5 doc: cgroup: improve formatting of mem stats

In reply to Jakub Kicinski

If there is an empty line between item and description Sphinx does not emphasize the item. First half of the list does not have the empty line and is emphasized correctly.

---
 Documentation/admin-guide/cgroup-v2.rst | 12 ------------
 1 file changed, 12 deletions(-)
Documentation/admin-guide/cgroup-v2.rst +0 -12
index 723c8bd422cc..ab8b91014afb 100644
@@ -1313,53 +1313,41 @@ PAGE_SIZE multiple when read back.
 		Number of major page faults incurred
 
 	  workingset_refault
-
 		Number of refaults of previously evicted pages
 
 	  workingset_activate
-
 		Number of refaulted pages that were immediately activated
 
 	  workingset_nodereclaim
-
 		Number of times a shadow node has been reclaimed
 
 	  pgrefill
-
 		Amount of scanned pages (in an active LRU list)
 
 	  pgscan
-
 		Amount of scanned pages (in an inactive LRU list)
 
 	  pgsteal
-
 		Amount of reclaimed pages
 
 	  pgactivate
-
 		Amount of pages moved to the active LRU list
 
 	  pgdeactivate
-
 		Amount of pages moved to the inactive LRU list
 
 	  pglazyfree
-
 		Amount of pages postponed to be freed under memory pressure
 
 	  pglazyfreed
-
 		Amount of reclaimed lazyfree pages
 
 	  thp_fault_alloc
-
 		Number of transparent hugepages which were allocated to satisfy
 		a page fault, including COW faults. This counter is not present
 		when CONFIG_TRANSPARENT_HUGEPAGE is not set.
 
 	  thp_collapse_alloc
-
 		Number of transparent hugepages which were allocated to allow
 		collapsing an existing range of pages. This counter is not
 		present when CONFIG_TRANSPARENT_HUGEPAGE is not set.
Signature · 1 line
2.24.1
#3 lore raw

PATCH 3/5 doc: cgroup: improve formatting of io example

In reply to Jakub Kicinski

We need a literal section, like few paragraphs below.

---
 Documentation/admin-guide/cgroup-v2.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/admin-guide/cgroup-v2.rst +1 -1
index ab8b91014afb..9d16fbc5df63 100644
@@ -1466,7 +1466,7 @@ IO Interface Files
 	  dios		Number of discard IOs
 	  ======	=====================
 
-	An example read output follows:
+	An example read output follows::
 
 	  8:16 rbytes=1459200 wbytes=314773504 rios=192 wios=353 dbytes=0 dios=0
 	  8:0 rbytes=90430464 wbytes=299008000 rios=8950 wios=1252 dbytes=50331648 dios=3021
Signature · 1 line
2.24.1
#4 lore raw

PATCH 4/5 doc: cgroup: improve formatting of cpuset examples

In reply to Jakub Kicinski

We need literal sections otherwise the entire example is rendered as a single line.

---
 Documentation/admin-guide/cgroup-v2.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/admin-guide/cgroup-v2.rst +2 -2
index 9d16fbc5df63..308d096af071 100644
@@ -1841,7 +1841,7 @@ Cpuset Interface Files
 	from the requested CPUs.
 
 	The CPU numbers are comma-separated numbers or ranges.
-	For example:
+	For example::
 
 	  # cat cpuset.cpus
 	  0-4,6,8-10
@@ -1880,7 +1880,7 @@ Cpuset Interface Files
 	from the requested memory nodes.
 
 	The memory node numbers are comma-separated numbers or ranges.
-	For example:
+	For example::
 
 	  # cat cpuset.mems
 	  0-1,3
Signature · 1 line
2.24.1
#5 lore raw

PATCH 5/5 doc: cgroup: improve formatting of references

In reply to Jakub Kicinski

Annotate references to other documents to make them clickable.

---
 Documentation/accounting/psi.rst              | 2 ++
 Documentation/admin-guide/cgroup-v1/index.rst | 2 ++
 Documentation/admin-guide/cgroup-v2.rst       | 8 ++++----
 3 files changed, 8 insertions(+), 4 deletions(-)
Documentation/accounting/psi.rst +2 -0
index 621111ce5740..f2b3439edcc2 100644
@@ -1,3 +1,5 @@
+.. _psi:
+
 ================================
 PSI - Pressure Stall Information
 ================================
Documentation/admin-guide/cgroup-v1/index.rst +2 -0
index 10bf48bae0b0..226f64473e8e 100644
@@ -1,3 +1,5 @@
+.. _cgroup-v1:
+
 ========================
 Control Groups version 1
 ========================
Documentation/admin-guide/cgroup-v2.rst +4 -4
index 308d096af071..fbb111616705 100644
@@ -9,7 +9,7 @@ This is the authoritative documentation on the design, interface and
 conventions of cgroup v2.  It describes all userland-visible aspects
 of cgroup including core and specific controller behaviors.  All
 future changes must be reflected in this document.  Documentation for
-v1 is available under Documentation/admin-guide/cgroup-v1/.
+v1 is available under :ref:`Documentation/admin-guide/cgroup-v1/index.rst <cgroup-v1>`.
 
 .. CONTENTS
 
@@ -1023,7 +1023,7 @@ All time durations are in microseconds.
 	A read-only nested-key file which exists on non-root cgroups.
 
 	Shows pressure stall information for CPU. See
-	Documentation/accounting/psi.rst for details.
+	:ref:`Documentation/accounting/psi.rst <psi>` for details.
 
   cpu.uclamp.min
         A read-write single value file which exists on non-root cgroups.
@@ -1391,7 +1391,7 @@ PAGE_SIZE multiple when read back.
 	A read-only nested-key file which exists on non-root cgroups.
 
 	Shows pressure stall information for memory. See
-	Documentation/accounting/psi.rst for details.
+	:ref:`Documentation/accounting/psi.rst <psi>` for details.
 
 
 Usage Guidelines
@@ -1631,7 +1631,7 @@ IO Interface Files
 	A read-only nested-key file which exists on non-root cgroups.
 
 	Shows pressure stall information for IO. See
-	Documentation/accounting/psi.rst for details.
+	:ref:`Documentation/accounting/psi.rst <psi>` for details.
 
 
 Writeback
Signature · 1 line
2.24.1
maintainer Applied
#6 lore raw
In reply to Jakub Kicinski
Quoted 10 lines · On Thu, 27 Feb 2020 16:06:48 -0800 Jakub Kicinski <[email protected]> wrote:

A few small changes to the cgroup-v2 doc to improve it's rendering.

Jakub Kicinski (5):
doc: cgroup: improve formatting
doc: cgroup: improve formatting of mem stats
doc: cgroup: improve formatting of io example
doc: cgroup: improve formatting of cpuset examples
doc: cgroup: improve formatting of references

Quoted 4 lines
 Documentation/accounting/psi.rst              |  2 ++
 Documentation/admin-guide/cgroup-v1/index.rst |  2 ++
 Documentation/admin-guide/cgroup-v2.rst       | 28 ++++++-------------
 3 files changed, 12 insertions(+), 20 deletions(-)

I've applied the set, thanks.

jon