summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2026-10-09 15:52:03 +0200
committerHeiko Carstens <hca@linux.ibm.com>2026-10-09 15:52:03 +0200
commit87c3772e1adcbfa220635b7db8086cbc2067f09d (patch)
treed39bba999562f381d3dc1dac333bf61bc8c18735 /tools/lib/python
parentf28aeaecc28dec067fbe24abdbd48f4c584a517f (diff)
parent13efc382cc7cc0dfba557b55dc65477c2d24ddf3 (diff)
downloadlinux-next-87c3772e1adcbfa220635b7db8086cbc2067f09d.tar.gz
linux-next-87c3772e1adcbfa220635b7db8086cbc2067f09d.zip
Merge branch 'vtimer'
Heiko Carstens says: ==================== s390's virtual timer infrastructure has only a single user and the semantics of the interface are not straightforward: a virtual timer fires if the sum of elapsed CPU time over all CPUs exceeds a specified value. This is suboptimal since the number of active CPUs defines how frequently the timer fires. With many CPUs and short intervals this can be very frequent. Furthermore the required accounting in the vtime code uses a single 64-bit value to accumulate elapsed CPU time. In busy systems this can lead to cache line bouncing when the value is updated concurrently on several CPUs; which is the reason why other accounting mechanisms use per-CPU data structures for this purpose. In practice this is not a problem with the appldata default interval of 10 seconds, however the interval is configurable via sysctl with a minimum value of 1ms. Given that there is only a single user, emulate the virtual timer in appldata using delayed work: the work is scheduled for the minimum possible wall-clock time until the configured CPU-time interval elapses (remaining CPU time / number of online CPUs), with a minimum delay of 100ms. The work then reads per-CPU statistics of all online CPUs to check whether enough CPU time has elapsed, and if so runs the registered callbacks. The calculation is more expensive, but avoids potential cache line bouncing problem. In addition it allows to remove the entire vtimer infrastructure code with a subsequent patch. ==================== Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions