diff options
author | Gautham R. Shenoy <ego@linux.vnet.ibm.com> | 2020-04-07 11:47:40 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-04-30 05:35:26 +0300 |
commit | c4019198cfa81224d32846915cd401e981f81b81 (patch) | |
tree | 994b84d8582d386910ae90f055415899b8bd367f /arch/powerpc/kvm/book3s_emulate.c | |
parent | e4a884cc28fa3f5d8b81de46998ffe29b4ad169e (diff) | |
download | linux-c4019198cfa81224d32846915cd401e981f81b81.tar.xz |
powerpc/idle: Store PURR snapshot in a per-cpu global variable
Currently when CPU goes idle, we take a snapshot of PURR via
pseries_idle_prolog() which is used at the CPU idle exit to compute
the idle PURR cycles via the function pseries_idle_epilog(). Thus,
the value of idle PURR cycle thus read before pseries_idle_prolog() and
after pseries_idle_epilog() is always correct.
However, if we were to read the idle PURR cycles from an interrupt
context between pseries_idle_prolog() and pseries_idle_epilog() (this
will be done in a future patch), then, the value of the idle PURR thus
read will not include the cycles spent in the most recent idle period.
Thus, in that interrupt context, we will need access to the snapshot
of the PURR before going idle, in order to compute the idle PURR
cycles for the latest idle duration.
In this patch, we save the snapshot of PURR in pseries_idle_prolog()
in a per-cpu variable, instead of on the stack, so that it can be
accessed from an interrupt context.
Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1586249263-14048-3-git-send-email-ego@linux.vnet.ibm.com
Diffstat (limited to 'arch/powerpc/kvm/book3s_emulate.c')
0 files changed, 0 insertions, 0 deletions