<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/arch/s390/kernel/wti.c, branch linux-rolling-stable</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>s390/wti: Add debugfs file to display missed grace periods per cpu</title>
<updated>2024-08-29T20:56:35+00:00</updated>
<author>
<name>Tobias Huschle</name>
<email>huschle@linux.ibm.com</email>
</author>
<published>2024-08-12T11:39:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=307b675cf0193f37fbc50ff9de5322dc1361aa6b'/>
<id>307b675cf0193f37fbc50ff9de5322dc1361aa6b</id>
<content type='text'>
Introduce a new debug file which allows to determine how many warning
track grace periods were missed on each CPU.
The new file can be found as /sys/kernel/debug/s390/wti

It is formatted as:
       CPU0       CPU1   [...]    CPUx
        xyz        xyz   [...]     xyz

Acked-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Reviewed-by: Mete Durlu &lt;meted@linux.ibm.com&gt;
Signed-off-by: Tobias Huschle &lt;huschle@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a new debug file which allows to determine how many warning
track grace periods were missed on each CPU.
The new file can be found as /sys/kernel/debug/s390/wti

It is formatted as:
       CPU0       CPU1   [...]    CPUx
        xyz        xyz   [...]     xyz

Acked-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Reviewed-by: Mete Durlu &lt;meted@linux.ibm.com&gt;
Signed-off-by: Tobias Huschle &lt;huschle@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/wti: Add wti accounting for missed grace periods</title>
<updated>2024-08-29T20:56:34+00:00</updated>
<author>
<name>Tobias Huschle</name>
<email>huschle@linux.ibm.com</email>
</author>
<published>2024-08-12T11:39:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=42419bcdfdcb287918e53500a04aeb532b41ed1f'/>
<id>42419bcdfdcb287918e53500a04aeb532b41ed1f</id>
<content type='text'>
A virtual CPU that has received a warning-track interrupt may fail to
acknowledge the interrupt within the warning-track grace period.
While this is usually not a problem, it will become necessary to
investigate if there is a large number of such missed warning-track
interrupts. Therefore, it is necessary to track these events.
The information is tracked through the s390 debug facility and can be
found under /sys/kernel/debug/s390dbf/wti/.

The hex_ascii output is formatted as:
 &lt;pid&gt; &lt;symbol&gt;

The values pid and current psw are collected when a warning track
interrupt is received. Symbol is either the kernel symbol matching the
collected psw or redacted to &lt;user&gt; when running in user space.

Each line represents the currently executing process when a warning
track interrupt was received which was then not acknowledged within its
grace period.

Acked-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Reviewed-by: Mete Durlu &lt;meted@linux.ibm.com&gt;
Signed-off-by: Tobias Huschle &lt;huschle@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A virtual CPU that has received a warning-track interrupt may fail to
acknowledge the interrupt within the warning-track grace period.
While this is usually not a problem, it will become necessary to
investigate if there is a large number of such missed warning-track
interrupts. Therefore, it is necessary to track these events.
The information is tracked through the s390 debug facility and can be
found under /sys/kernel/debug/s390dbf/wti/.

The hex_ascii output is formatted as:
 &lt;pid&gt; &lt;symbol&gt;

The values pid and current psw are collected when a warning track
interrupt is received. Symbol is either the kernel symbol matching the
collected psw or redacted to &lt;user&gt; when running in user space.

Each line represents the currently executing process when a warning
track interrupt was received which was then not acknowledged within its
grace period.

Acked-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Reviewed-by: Mete Durlu &lt;meted@linux.ibm.com&gt;
Signed-off-by: Tobias Huschle &lt;huschle@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/wti: Prepare graceful CPU pre-emption on wti reception</title>
<updated>2024-08-29T20:56:34+00:00</updated>
<author>
<name>Tobias Huschle</name>
<email>huschle@linux.ibm.com</email>
</author>
<published>2024-08-12T11:39:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cafeff5a030983bbf37b11ab766b68d7da3b8aab'/>
<id>cafeff5a030983bbf37b11ab766b68d7da3b8aab</id>
<content type='text'>
When a warning track interrupt is received, the kernel has only a very
limited amount of time to make sure, that the CPU can be yielded as
gracefully as possible before being pre-empted by the hypervisor.

The interrupt handler for the wti therefore unparks a kernel thread
which has being created on boot re-using the CPU hotplug kernel thread
infrastructure. These threads exist per CPU and are assigned the
highest possible real-time priority. This makes sure, that said threads
will execute as soon as possible as the scheduler should pre-empt any
other running user tasks to run the real-time thread.

Furthermore, the interrupt handler disables all I/O interrupts to
prevent additional interrupt processing on the soon-preempted CPU.
Interrupt handlers are likely to take kernel locks, which in the worst
case, will be kept while the interrupt handler is pre-empted from itself
underlying physical CPU. In that case, all tasks or interrupt handlers
on other CPUs would have to wait for the pre-empted CPU being dispatched
again. By preventing further interrupt processing, this risk is
minimized.

Once the CPU gets dispatched again, the real-time kernel thread regains
control, reenables interrupts and parks itself again.

Acked-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Reviewed-by: Mete Durlu &lt;meted@linux.ibm.com&gt;
Signed-off-by: Tobias Huschle &lt;huschle@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a warning track interrupt is received, the kernel has only a very
limited amount of time to make sure, that the CPU can be yielded as
gracefully as possible before being pre-empted by the hypervisor.

The interrupt handler for the wti therefore unparks a kernel thread
which has being created on boot re-using the CPU hotplug kernel thread
infrastructure. These threads exist per CPU and are assigned the
highest possible real-time priority. This makes sure, that said threads
will execute as soon as possible as the scheduler should pre-empt any
other running user tasks to run the real-time thread.

Furthermore, the interrupt handler disables all I/O interrupts to
prevent additional interrupt processing on the soon-preempted CPU.
Interrupt handlers are likely to take kernel locks, which in the worst
case, will be kept while the interrupt handler is pre-empted from itself
underlying physical CPU. In that case, all tasks or interrupt handlers
on other CPUs would have to wait for the pre-empted CPU being dispatched
again. By preventing further interrupt processing, this risk is
minimized.

Once the CPU gets dispatched again, the real-time kernel thread regains
control, reenables interrupts and parks itself again.

Acked-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Reviewed-by: Mete Durlu &lt;meted@linux.ibm.com&gt;
Signed-off-by: Tobias Huschle &lt;huschle@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
