<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/s390/kernel/vtime.c, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-03-26T22:22:24Z</updated>
<entry>
<title>s390/vtime: fix average steal time calculation</title>
<updated>2024-03-26T22:22:24Z</updated>
<author>
<name>Mete Durlu</name>
</author>
<published>2024-03-06T11:31:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=48cef94b6910604f681ab1fc1d6e69b781643bb2'/>
<id>urn:sha1:48cef94b6910604f681ab1fc1d6e69b781643bb2</id>
<content type='text'>
[ Upstream commit 367c50f78451d3bd7ad70bc5c89f9ba6dec46ca9 ]

Current average steal timer calculation produces volatile and inflated
values. The only user of this value is KVM so far and it uses that to
decide whether or not to yield the vCPU which is seeing steal time.
KVM compares average steal timer to a threshold and if the threshold
is past then it does not allow CPU polling and yields it to host, else
it keeps the CPU by polling.
Since KVM's steal time threshold is very low by default (%10) it most
likely is not effected much by the bloated average steal timer values
because the operating region is pretty small. However there might be
new users in the future who might rely on this number. Fix average
steal timer calculation by changing the formula from:

	avg_steal_timer = avg_steal_timer / 2 + steal_timer;

to the following:

	avg_steal_timer = (avg_steal_timer + steal_timer) / 2;

This ensures that avg_steal_timer is actually a naive average of steal
timer values. It now closely follows steal timer values but of course
in a smoother manner.

Fixes: 152e9b8676c6 ("s390/vtime: steal time exponential moving average")
Signed-off-by: Mete Durlu &lt;meted@linux.ibm.com&gt;
Acked-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>s390/vtime: fix increased steal time accounting</title>
<updated>2021-03-24T10:26:35Z</updated>
<author>
<name>Gerald Schaefer</name>
</author>
<published>2021-03-10T13:23:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34794bc0e7687950ed2c4a5c92504cd22a9466d2'/>
<id>urn:sha1:34794bc0e7687950ed2c4a5c92504cd22a9466d2</id>
<content type='text'>
commit d54cb7d54877d529bc1e0e1f47a3dd082f73add3 upstream.

Commit 152e9b8676c6e ("s390/vtime: steal time exponential moving average")
inadvertently changed the input value for account_steal_time() from
"cputime_to_nsecs(steal)" to just "steal", resulting in broken increased
steal time accounting.

Fix this by changing it back to "cputime_to_nsecs(steal)".

Fixes: 152e9b8676c6e ("s390/vtime: steal time exponential moving average")
Cc: &lt;stable@vger.kernel.org&gt; # 5.1
Reported-by: Sabine Forkel &lt;sabine.forkel@de.ibm.com&gt;
Reviewed-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Gerald Schaefer &lt;gerald.schaefer@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/vtime: fix inline assembly clobber list</title>
<updated>2021-03-04T09:26:50Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2021-02-02T15:45:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e6c8cfa9aee65d4ca9b89634d14eed2215ddc07'/>
<id>urn:sha1:8e6c8cfa9aee65d4ca9b89634d14eed2215ddc07</id>
<content type='text'>
commit b29c5093820d333eef22f58cd04ec0d089059c39 upstream.

The stck/stckf instruction used within the inline assembly within
do_account_vtime() changes the condition code. This is not reflected
with the clobber list, and therefore might result in incorrect code
generation.

It seems unlikely that the compiler could generate incorrect code
considering the surrounding C code, but it must still be fixed.

Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390: correct some inline assembly constraints</title>
<updated>2019-04-17T08:40:57Z</updated>
<author>
<name>Vasily Gorbik</name>
</author>
<published>2019-04-15T10:41:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=35af0d469c6694c05f06e75c5d75caee9be66122'/>
<id>urn:sha1:35af0d469c6694c05f06e75c5d75caee9be66122</id>
<content type='text'>
Inline assembly code changed in this patch should really use "Q"
constraint "Memory reference without index register and with short
displacement". The kernel build with kasan instrumentation enabled
might occasionally break otherwise (due to stack instrumentation).

Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/vtime: steal time exponential moving average</title>
<updated>2019-03-06T13:59:50Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2019-03-06T11:31:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=152e9b8676c6e788c6bff095c1eaae7b86df5003'/>
<id>urn:sha1:152e9b8676c6e788c6bff095c1eaae7b86df5003</id>
<content type='text'>
To be able to judge the current overcommitment ratio for a CPU add
a lowcore field with the exponential moving average of the steal time.
The average is updated every tick.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cpu_mf: replace stcctm5() with the stcctm() function</title>
<updated>2019-02-22T08:19:53Z</updated>
<author>
<name>Hendrik Brueckner</name>
</author>
<published>2018-08-29T16:12:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=346d034d7f13da9eb135458a2f6cf14c9b77a637'/>
<id>urn:sha1:346d034d7f13da9eb135458a2f6cf14c9b77a637</id>
<content type='text'>
Remove the stcctm5() function to extract counters from the MT-diagnostic
counter set with the stcctm() function.  For readability, introduce an
enum to map the counter sets names to respective numbers for the stcctm
instruction.

Signed-off-by: Hendrik Brueckner &lt;brueckner@linux.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390: kernel: add SPDX identifiers to the remaining files</title>
<updated>2017-11-24T14:37:12Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2017-11-24T14:00:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a17ae4c3a6add7579e9962df5dd12cb1f3bed431'/>
<id>urn:sha1:a17ae4c3a6add7579e9962df5dd12cb1f3bed431</id>
<content type='text'>
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the arch/s390/kernel/ files with the correct SPDX license
identifier based on the license text in the file itself.  The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/cputime: simplify account_system_index_scaled</title>
<updated>2017-06-12T14:25:57Z</updated>
<author>
<name>Martin Schwidefsky</name>
</author>
<published>2017-05-12T13:31:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b29e061bb7a8d2e2fbf7826fb30ab5477d595e92'/>
<id>urn:sha1:b29e061bb7a8d2e2fbf7826fb30ab5477d595e92</id>
<content type='text'>
The account_system_index_scaled gets two cputime values, a raw value
derived from CPU timer deltas and a scaled value. The scaled value
is always calculated from the raw value, the code can be simplified
by moving the scale_vtime call into account_system_index_scaled.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux</title>
<updated>2017-03-12T21:22:25Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2017-03-12T21:22:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=56b24d1bbcff213dc9e1625eea5b8e13bb50feb8'/>
<id>urn:sha1:56b24d1bbcff213dc9e1625eea5b8e13bb50feb8</id>
<content type='text'>
Pull s390 fixes from Martin Schwidefsky:

 - four patches to get the new cputime code in shape for s390

 - add the new statx system call

 - a few bug fixes

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390: wire up statx system call
  KVM: s390: Fix guest migration for huge guests resulting in panic
  s390/ipl: always use load normal for CCW-type re-IPL
  s390/timex: micro optimization for tod_to_ns
  s390/cputime: provide archicture specific cputime_to_nsecs
  s390/cputime: reset all accounting fields on fork
  s390/cputime: remove last traces of cputime_t
  s390: fix in-kernel program checks
  s390/crypt: fix missing unlock in ctr_paes_crypt on error path
</content>
</entry>
<entry>
<title>sched/headers: Prepare to move cputime functionality from &lt;linux/sched.h&gt; into &lt;linux/sched/cputime.h&gt;</title>
<updated>2017-03-02T07:42:39Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2017-02-05T10:48:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=32ef5517c298042ed58408545f475df43afe1f24'/>
<id>urn:sha1:32ef5517c298042ed58408545f475df43afe1f24</id>
<content type='text'>
Introduce a trivial, mostly empty &lt;linux/sched/cputime.h&gt; header
to prepare for the moving of cputime functionality out of sched.h.

Update all code that relies on these facilities.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
</feed>
