Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed images/src/png/kernel_tasks.png
Binary file not shown.
38 changes: 26 additions & 12 deletions xml/MAIN.SLERT.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="urn:x-suse:xslt:profiling:docbook51-profile.xsl"
type="text/xml"
title="Profiling step"?>
<!DOCTYPE set
[
<?xml version="1.0"?>
<!DOCTYPE set [
<!ENTITY % entities SYSTEM "entity-decl.ent">
%entities;
]>
<set version="5.0" xml:lang="en" xml:id="set-slert"
xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink">

<?xml-stylesheet href="urn:x-suse:xslt:profiling:docbook51-profile.xsl"
type="text/xml"
title="Profiling step"?><set xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en" xml:id="set-slert">
<title>&slert; Documentation</title>
<info>
<info xmlns:d="http://docbook.org/ns/docbook">
<productname>&productname;</productname>
<productname role="abbrev">&productnameshort;</productname>
<productnumber>&productnumber;</productnumber>
Expand All @@ -26,12 +22,30 @@
<dm:editurl>https://github.com/SUSE/doc-slert/edit/main/xml/</dm:editurl>
<dm:translation>no</dm:translation>
</dm:docmanager>
</info>
<revhistory xml:id="rh-set-slert">
<revision>
<date>2022-11-09</date>
<revdescription>
<para/>
</revdescription>
</revision>
</revhistory>
</info>

<xi:include href="book_slert_shielding.xml"/>

<book xml:id="book-slert-qs">
<title>Quick Start Guides</title>
<info>
<revhistory xml:id="rh-book-slert-qs">
<revision>
<date>2022-11-09</date>
<revdescription>
<para/>
</revdescription>
</revision>
</revhistory>
</info>
<xi:include href="article_setup.xml"/>
<xi:include href="article_hardware_testing.xml"/>
<xi:include href="article_virtualization.xml"/>
Expand Down
32 changes: 20 additions & 12 deletions xml/article_kernel_tasks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
<dm:editurl>https://github.com/SUSE/doc-slert/edit/main/xml/</dm:editurl>
<dm:translation>no</dm:translation>
</dm:docmanager>
<revhistory xml:id="rh-kernel-tasks">
<revision>
<date>2022-11-09</date>
<revdescription>
<para/>
</revdescription>
</revision>
</revhistory>
</info>
<section xml:id="sec-slert-kernel-tasks-intro">
<title>Processes and task states</title>
Expand All @@ -40,7 +48,7 @@
Each process runs through different states during its life cycle,
like <parameter>running</parameter> or <parameter>idle</parameter>.
</para>

<para>
A process might be unable to run (<parameter>idle</parameter>) at any time
and for different reasons.
Expand All @@ -49,7 +57,7 @@
the maximum amount of time units allowed and that it must yield to another
process.
</para>

<para>
The following list describes the most important task states needed for
programming the Linux Kernel.
Expand All @@ -69,7 +77,7 @@
<para>The task state is not visible from the userspace.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<parameter>TASK_DEAD</parameter>
Expand All @@ -83,7 +91,7 @@
<para>The task state is visible from the userspace.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<parameter>TASK_RUNNING</parameter>
Expand All @@ -97,7 +105,7 @@
<para>The task state is visible from the userspace.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<parameter>TASK_INTERRUPTIBLE</parameter>
Expand All @@ -114,7 +122,7 @@
<para>The task state is visible from the userspace.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<parameter>TASK_UNINTERUPTIBLE</parameter>
Expand All @@ -130,7 +138,7 @@
<para>The task state is visible from the userspace.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<parameter>TASK_KILLABLE</parameter>
Expand All @@ -149,7 +157,7 @@
<para>The task state is not visible from the userspace.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<parameter>TASK_IDLE</parameter>
Expand All @@ -168,7 +176,7 @@
<para>The task state is not visible from the userspace.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<parameter>TASK_STOPPED</parameter>
Expand All @@ -181,7 +189,7 @@
<para>The task state is visible from the userspace.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<parameter>TASK_TRACED</parameter>
Expand All @@ -195,7 +203,7 @@
<para>The task state is visible from the userspace.</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<parameter>TASK_PARKED</parameter>
Expand Down Expand Up @@ -231,6 +239,6 @@
</mediaobject>
</figure>
</section>

<xi:include href="common_legal.xml" parse="xml"/>
</article>
15 changes: 12 additions & 3 deletions xml/common_copyright_gfdl.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE legalnotice
[
<?xml version="1.0"?>
<!DOCTYPE legalnotice [
<!ENTITY % entities SYSTEM "entity-decl.ent">
%entities;
]>

<!--
Please keep this document neatly formatted, because a text version
for LICENSE.txt is created form this source. That means only the
xml tags will be stripped, the rest of the formatting will appear
in the txt file as is.
-->
<legalnotice xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink">
<info xmlns:d="http://docbook.org/ns/docbook"><revhistory>
<revision>
<date>2024-01-11</date>
<revdescription>
<para/>
</revdescription>
</revision>
</revhistory>
</info>
<para>
Copyright &copy; 2006&ndash;<?dbtimestamp format="Y"?>
SUSE LLC and contributors. All rights reserved.
Expand Down
16 changes: 12 additions & 4 deletions xml/common_legal.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE appendix
[
<?xml version="1.0"?>
<!DOCTYPE appendix [
<!ENTITY % entities SYSTEM "entity-decl.ent">
%entities;
]>

<appendix xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" role="legal">
<title>GNU Licenses</title>
<info/>
<info xmlns:d="http://docbook.org/ns/docbook"><revhistory>
<revision>
<date>2021-07-20</date>
<revdescription>
<para/>
</revdescription>
</revision>
</revhistory>
</info>
<para>
This appendix contains the GNU Free Documentation License version 1.2.
</para>
Expand Down
53 changes: 31 additions & 22 deletions xml/slert_cpuset_manipulation.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter
[
<?xml version="1.0"?>
<!DOCTYPE chapter [
<!ENTITY % entities SYSTEM "entity-decl.ent">
%entities;
]>

<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="cha-shielding-cpuset">
<title>Full-featured cpuset manipulation commands</title>
<info xmlns:d="http://docbook.org/ns/docbook"><revhistory xml:id="rh-cha-shielding-cpuset">
<revision>
<date>2022-11-25</date>
<revdescription>
<para/>
</revdescription>
</revision>
</revhistory>
</info>
<para>
While basic shielding as described above is useful and a common use model
for <command>cset</command>, there comes a time when more functionality
Expand All @@ -29,7 +38,7 @@
The basic syntax of <command>set</command> for cpuset creation is:
</para>
<screen>&prompt.user;<command>cset</command> set -c 1-3 -s my_cpuset1
cset: --> created cpuset "my_cpuset1"</screen>
cset: --&gt; created cpuset "my_cpuset1"</screen>
<para>
This creates a cpuset named <literal>my_cpuset1</literal> with a CPUSPEC
of CPU1, CPU2 and CPU3. The CPUSPEC is the same concept as described in
Expand All @@ -48,7 +57,7 @@ cset: --> created cpuset "my_cpuset1"</screen>
omit CPU2), then issue the following command.
</para>
<screen>&prompt.user;<command>cset</command> set -c 1,3 -s my_cpuset1
cset: --> modified cpuset "my_cpuset</screen>
cset: --&gt; modified cpuset "my_cpuset</screen>
<para>
<command>cset</command> will then adjust the CPUs that are assigned to
the <literal>my_cpuset1</literal> set to only use CPU1 and CPU3.
Expand All @@ -58,7 +67,7 @@ cset: --> modified cpuset "my_cpuset</screen>
example:
</para>
<screen>&prompt.user;<command>cset</command> set -s my_cpuset1 -n super_set
cset: --> renaming "/cpusets/my_cpuset1" to "super_set"</screen>
cset: --&gt; renaming "/cpusets/my_cpuset1" to "super_set"</screen>
<para>
Renames the cpuset called <literal>my_cpuset1</literal> to
<literal>super_set</literal>.
Expand All @@ -68,8 +77,8 @@ cset: --> renaming "/cpusets/my_cpuset1" to "super_set"</screen>
follows.
</para>
<screen>&prompt.user;<command>cset</command> set -d super_set
cset: --> processing cpuset "super_set", moving 0 tasks to parent "/"...
cset: --> deleting cpuset "/super_set"
cset: --&gt; processing cpuset "super_set", moving 0 tasks to parent "/"...
cset: --&gt; deleting cpuset "/super_set"
cset: done</screen>
<para>
This command destroys the newly created cpuset called
Expand Down Expand Up @@ -97,11 +106,11 @@ cset: done</screen>
example:
</para>
<screen>&prompt.user;<command>cset</command> set -c 1,3 -s top_set
cset: --> created cpuset "top_set"
cset: --&gt; created cpuset "top_set"


&prompt.user;<command>cset</command> set -c 3 -s /top_set/sub_set
cset: --> created cpuset "/top_set/sub_set"</screen>
cset: --&gt; created cpuset "/top_set/sub_set"</screen>
<para>
These commands created two cpusets: <literal>top_set</literal> and
<literal>sub_set</literal>. The <literal>top_set</literal> uses CPU1 and
Expand All @@ -112,7 +121,7 @@ cset: --> created cpuset "/top_set/sub_set"</screen>
ask you to use the path. For example:
</para>
<screen>&prompt.user;<command>cset</command> set -c 1,3 -s sub_set
cset: --> modified cpuset "sub_set</screen>
cset: --&gt; modified cpuset "sub_set</screen>
<para>
This command adds CPU1 to the <literal>sub_set</literal> cpuset for its
use. Note that using the path in this case is optional.
Expand Down Expand Up @@ -310,7 +319,7 @@ USER PID PPID SPPr TASK NAME
cset: "two" cpuset of CPUSPEC(2) with 0 tasks running

&prompt.user;<command>cset</command> proc -s two -e bash
cset: --> last message, executed args into cpuset "/two", new pid is: 20955
cset: --&gt; last message, executed args into cpuset "/two", new pid is: 20955

&prompt.user;<command>cset</command> proc -l -s two
cset: "two" cpuset of CPUSPEC(2) with 2 tasks running
Expand Down Expand Up @@ -373,8 +382,8 @@ root 21147 21118 Roth python ./cset proc -l two</screen>
executed, the result may be puzzling. For example:
</para>
<screen>&prompt.user;<command>cset</command> proc -s two -e blah-blah
cset: --> last message, executed args into cpuset "/two", new pid is: 21655
cset: **> [Errno 2] No such file or directory</screen>
cset: --&gt; last message, executed args into cpuset "/two", new pid is: 21655
cset: **&gt; [Errno 2] No such file or directory</screen>
<para>
The result is no new process even though a new PID is output. The reason
for the message is of course that the <command>cset</command> process
Expand Down Expand Up @@ -645,11 +654,11 @@ three 3 n 0 n 10 0 /three</screen>
</para>

<screen>&prompt.user;<command>cset</command> set -c 0 -s system
cset: --> created cpuset "system"
cset: --&gt; created cpuset "system"


&prompt.user;<command>cset</command> set -c 1-3 -s user
cset: --> created cpuset "user"
cset: --&gt; created cpuset "user"


&prompt.user;<command>cset</command> set -l
Expand Down Expand Up @@ -688,7 +697,7 @@ system 0 n 0 n 187 0 /system</screen>
<command>proc</command> subcommand as described above. If you also want
to eliminate kernel threads from <literal>root</literal> that could interfere
with <literal>user</literal> workload (to achieve a form of <quote>interrupt
shielding</quote> on a real time Linux kernel, for example), you should look
shielding</quote> on a real time Linux kernel, for example), you should look
at <literal>isolcpus=</literal> kernel command line argument.
</para>

Expand Down Expand Up @@ -781,23 +790,23 @@ root 0-3 y 0 y 344 0 /


&prompt.user;<command>cset</command> set -c 0-3 prio_all
cset: --> created cpuset "prio_all"
cset: --&gt; created cpuset "prio_all"


&prompt.user;<command>cset</command> set -c 1-3 /prio_all/prio_high
cset: --> created cpuset "/prio_all/prio_high"
cset: --&gt; created cpuset "/prio_all/prio_high"


&prompt.user;<command>cset</command> set -c 2-3 /prio_all/prio_high/prio_med
cset: --> created cpuset "/prio_all/prio_high/prio_med"
cset: --&gt; created cpuset "/prio_all/prio_high/prio_med"


&prompt.user;<command>cset</command> set -c 3 /prio_all/prio_high/prio_med/prio_low
cset: --> created cpuset "/prio_all/prio_high/prio_med/prio_low"
cset: --&gt; created cpuset "/prio_all/prio_high/prio_med/prio_low"


&prompt.user;<command>cset</command> set -c 0 system
cset: --> created cpuset "system"
cset: --&gt; created cpuset "system"


&prompt.user;<command>cset</command> set -l -r
Expand Down
Loading