Re: [PATCH v2 1/2] s390/appldata: Emulate virtual timer with delayed work

From: Gerald Schaefer

Date: Thu Oct 08 2026 - 13:08:43 EST


On Tue, 6 Oct 2026 16:01:12 +0200
Heiko Carstens <hca@xxxxxxxxxxxxx> wrote:

> 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.
>
> This is slightly more expensive, but allows to subsequently remove the
> entire vtimer infrastructure.
>
> Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
> ---
> arch/s390/appldata/appldata_base.c | 171 ++++++++++++++++++-----------
> 1 file changed, 107 insertions(+), 64 deletions(-)

Nice improvement, with minimum wall-clock interval 100ms. Specifying a 1ms
CPU-time interval was possible, but did not make much sense in practice.
On very idle systems, the resulting wall-clock interval would also have
been around 100ms, but as soon as they do some work, it would have become
far too frequent.

Also tested it, and on a busy system there is now no noticeable difference
for interval values 1-100, while idle systems still behave like before.

Reviewed-by: Gerald Schaefer <gerald.schaefer@xxxxxxxxxxxxx>
Tested-by: Gerald Schaefer <gerald.schaefer@xxxxxxxxxxxxx>