Fix errors reported by textproc/igor:

- wrap long line
- use tabs istead of spaces
- straggling closing tags (like </entry>)
- add blank line after <tag> on previous line

Event:	    vBSDcon FreeBSD Hackathon
This commit is contained in:
Benedict Reuschling 2019-09-05 17:28:51 +00:00
parent 743c61d608
commit de67b5b784
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=53371

View file

@ -5,12 +5,17 @@
$FreeBSD$ $FreeBSD$
--> -->
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="locking"> <chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
xml:id="locking">
<title>Locking Notes</title> <title>Locking Notes</title>
<indexterm><primary>SMP Next Generation Project</primary></indexterm> <indexterm>
<primary>SMP Next Generation Project</primary>
</indexterm>
<para><emphasis>This chapter is maintained by the FreeBSD SMP Next <para><emphasis>This chapter is maintained by the FreeBSD SMP Next
Generation Project.</emphasis></para> Generation Project.</emphasis></para>
<indexterm><primary>locking</primary></indexterm> <indexterm><primary>locking</primary></indexterm>
<indexterm><primary>multi-processing</primary></indexterm> <indexterm><primary>multi-processing</primary></indexterm>
@ -41,7 +46,7 @@
<para>Each mutex has several properties of interest:</para> <para>Each mutex has several properties of interest:</para>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>Variable Name</term> <term>Variable Name</term>
<listitem> <listitem>
<para>The name of the <type>struct mtx</type> variable in <para>The name of the <type>struct mtx</type> variable in
@ -97,8 +102,9 @@
<listitem> <listitem>
<para>A list of data structures or data structure members <para>A list of data structures or data structure members
that this entry protects. For data structure members, the that this entry protects. For data structure members, the
name will be in the form of name will be in the form of <varname
<varname remap="structname">structure name</varname>.<varname remap="structfield">member name</varname>.</para> remap="structname">structure name</varname>.<varname
remap="structfield">member name</varname>.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -114,17 +120,25 @@
<table frame="all" colsep="1" rowsep="1" pgwide="1"> <table frame="all" colsep="1" rowsep="1" pgwide="1">
<title>Mutex List</title> <title>Mutex List</title>
<indexterm><primary>locks</primary> <indexterm>
<secondary>sched_lock</secondary></indexterm> <primary>locks</primary>
<secondary>sched_lock</secondary>
</indexterm>
<indexterm><primary>locks</primary> <indexterm>
<secondary>vm86pcb_lock</secondary></indexterm> <primary>locks</primary>
<secondary>vm86pcb_lock</secondary>
</indexterm>
<indexterm><primary>locks</primary> <indexterm>
<secondary>Giant</secondary></indexterm> <primary>locks</primary>
<secondary>Giant</secondary>
</indexterm>
<indexterm><primary>locks</primary> <indexterm>
<secondary>callout_lock</secondary></indexterm> <primary>locks</primary>
<secondary>callout_lock</secondary>
</indexterm>
<tgroup cols="5"> <tgroup cols="5">
<thead> <thead>
@ -141,48 +155,80 @@
<tbody> <tbody>
<row> <row>
<entry>sched_lock</entry> <entry>sched_lock</entry>
<entry><quote>sched lock</quote></entry> <entry>
<quote>sched lock</quote></entry>
<entry> <entry>
<constant>MTX_SPIN</constant> | <constant>MTX_SPIN</constant> |
<constant>MTX_RECURSE</constant> <constant>MTX_RECURSE</constant></entry>
</entry>
<entry> <entry>
<varname>_gmonparam</varname>, <varname>_gmonparam</varname>,
<varname>cnt.v_swtch</varname>, <varname>cnt.v_swtch</varname>,
<varname>cp_time</varname>, <varname>cp_time</varname>,
<varname>curpriority</varname>, <varname>curpriority</varname>,
<varname remap="structname">mtx</varname>.<varname remap="structfield">mtx_blocked</varname>, <varname remap="structname">mtx</varname>.<varname
<varname remap="structname">mtx</varname>.<varname remap="structfield">mtx_contested</varname>, remap="structfield">mtx_blocked</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_procq</varname>, <varname remap="structname">mtx</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_slpq</varname>, remap="structfield">mtx_contested</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_sflag</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_stat</varname>, remap="structfield">p_procq</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_estcpu</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_cpticks</varname> remap="structfield">p_slpq</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_pctcpu</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_wchan</varname>, remap="structfield">p_sflag</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_wmesg</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_swtime</varname>, remap="structfield">p_stat</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_slptime</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_runtime</varname>, remap="structfield">p_estcpu</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_uu</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_su</varname>, remap="structfield">p_cpticks</varname>
<varname remap="structname">proc</varname>.<varname remap="structfield">p_iu</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_uticks</varname>, remap="structfield">p_pctcpu</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_sticks</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_iticks</varname>, remap="structfield">p_wchan</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_oncpu</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_lastcpu</varname>, remap="structfield">p_wmesg</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_rqindex</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_heldmtx</varname>, remap="structfield">p_swtime</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_blocked</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_mtxname</varname>, remap="structfield">p_slptime</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_contested</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_priority</varname>, remap="structfield">p_runtime</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_usrpri</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_nativepri</varname>, remap="structfield">p_uu</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_nice</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_rtprio</varname>, remap="structfield">p_su</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_iu</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_uticks</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_sticks</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_iticks</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_oncpu</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_lastcpu</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_rqindex</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_heldmtx</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_blocked</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_mtxname</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_contested</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_priority</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_usrpri</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_nativepri</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_nice</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_rtprio</varname>,
<varname>pscnt</varname>, <varname>pscnt</varname>,
<varname>slpque</varname>, <varname>slpque</varname>,
<varname>itqueuebits</varname>, <varname>itqueuebits</varname>,
@ -194,8 +240,7 @@
<varname>idqueuebits</varname>, <varname>idqueuebits</varname>,
<varname>idqueues</varname>, <varname>idqueues</varname>,
<varname>switchtime</varname>, <varname>switchtime</varname>,
<varname>switchticks</varname> <varname>switchticks</varname></entry>
</entry>
<entry> <entry>
<function>setrunqueue</function>, <function>setrunqueue</function>,
<function>remrunqueue</function>, <function>remrunqueue</function>,
@ -214,8 +259,7 @@
<function>astoff</function>, <function>astoff</function>,
<function>astpending</function>, <function>astpending</function>,
<function>calcru</function>, <function>calcru</function>,
<function>proc_compare</function> <function>proc_compare</function></entry>
</entry>
</row> </row>
<!-- The vm86 pcb lock --> <!-- The vm86 pcb lock -->
@ -223,14 +267,11 @@
<entry>vm86pcb_lock</entry> <entry>vm86pcb_lock</entry>
<entry><quote>vm86pcb lock</quote></entry> <entry><quote>vm86pcb lock</quote></entry>
<entry> <entry>
<constant>MTX_DEF</constant> <constant>MTX_DEF</constant></entry>
</entry>
<entry> <entry>
<varname>vm86pcb</varname> <varname>vm86pcb</varname></entry>
</entry>
<entry> <entry>
<function>vm86_bioscall</function> <function>vm86_bioscall</function></entry>
</entry>
</row> </row>
<!-- Giant --> <!-- Giant -->
@ -239,8 +280,7 @@
<entry><quote>Giant</quote></entry> <entry><quote>Giant</quote></entry>
<entry> <entry>
<constant>MTX_DEF</constant> | <constant>MTX_DEF</constant> |
<constant>MTX_RECURSE</constant> <constant>MTX_RECURSE</constant></entry>
</entry>
<entry>nearly everything</entry> <entry>nearly everything</entry>
<entry>lots</entry> <entry>lots</entry>
</row> </row>
@ -251,19 +291,18 @@
<entry><quote>callout lock</quote></entry> <entry><quote>callout lock</quote></entry>
<entry> <entry>
<constant>MTX_SPIN</constant> | <constant>MTX_SPIN</constant> |
<constant>MTX_RECURSE</constant> <constant>MTX_RECURSE</constant></entry>
</entry>
<entry> <entry>
<varname>callfree</varname>, <varname>callfree</varname>,
<varname>callwheel</varname>, <varname>callwheel</varname>,
<varname>nextsoftcheck</varname>, <varname>nextsoftcheck</varname>,
<varname remap="structname">proc</varname>.<varname remap="structfield">p_itcallout</varname>, <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_slpcallout</varname>, remap="structfield">p_itcallout</varname>,
<varname remap="structname">proc</varname>.<varname
remap="structfield">p_slpcallout</varname>,
<varname>softticks</varname>, <varname>softticks</varname>,
<varname>ticks</varname> <varname>ticks</varname></entry>
</entry> <entry></entry>
<entry>
</entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
@ -276,15 +315,22 @@
<para>These locks provide basic reader-writer type functionality <para>These locks provide basic reader-writer type functionality
and may be held by a sleeping process. Currently they are and may be held by a sleeping process. Currently they are
backed by &man.lockmgr.9;.</para> backed by &man.lockmgr.9;.</para>
<indexterm><primary>locks</primary> <indexterm>
<secondary>shared exclusive</secondary></indexterm> <primary>locks</primary>
<secondary>shared exclusive</secondary>
</indexterm>
<table> <table>
<title>Shared Exclusive Lock List</title> <title>Shared Exclusive Lock List</title>
<indexterm><primary>locks</primary>
<secondary>allproc_lock</secondary></indexterm> <indexterm>
<indexterm><primary>locks</primary> <primary>locks</primary>
<secondary>proctree_lock</secondary></indexterm> <secondary>allproc_lock</secondary>
</indexterm>
<indexterm>
<primary>locks</primary>
<secondary>proctree_lock</secondary>
</indexterm>
<tgroup cols="2"> <tgroup cols="2">
<thead> <thead>
@ -300,17 +346,20 @@
<varname>allproc</varname> <varname>allproc</varname>
<varname>zombproc</varname> <varname>zombproc</varname>
<varname>pidhashtbl</varname> <varname>pidhashtbl</varname>
<varname remap="structname">proc</varname>.<varname remap="structfield">p_list</varname> <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_hash</varname> remap="structfield">p_list</varname>
<varname>nextpid</varname> <varname remap="structname">proc</varname>.<varname
</entry> remap="structfield">p_hash</varname>
<varname>nextpid</varname></entry>
</row> </row>
<row> <row>
<entry><varname>proctree_lock</varname></entry> <entry><varname>proctree_lock</varname></entry>
<entry> <entry>
<varname remap="structname">proc</varname>.<varname remap="structfield">p_children</varname> <varname remap="structname">proc</varname>.<varname
<varname remap="structname">proc</varname>.<varname remap="structfield">p_sibling</varname> remap="structfield">p_children</varname>
</entry> <varname remap="structname">proc</varname>.<varname
remap="structfield">p_sibling</varname></entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
@ -320,7 +369,9 @@
<sect1 xml:id="locking-atomic"> <sect1 xml:id="locking-atomic">
<title>Atomically Protected Variables</title> <title>Atomically Protected Variables</title>
<indexterm><primary>atomically protected variables</primary></indexterm> <indexterm>
<primary>atomically protected variables</primary>
</indexterm>
<para>An atomically protected variable is a special variable that <para>An atomically protected variable is a special variable that
is not protected by an explicit lock. Instead, all data is not protected by an explicit lock. Instead, all data
@ -332,7 +383,8 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para><varname remap="structname">mtx</varname>.<varname remap="structfield">mtx_lock</varname></para> <para><varname remap="structname">mtx</varname>.<varname
remap="structfield">mtx_lock</varname></para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</sect1> </sect1>