diff options
author | Gautham R. Shenoy <ego@linux.vnet.ibm.com> | 2020-04-07 14:17:40 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2020-04-30 12:35:26 +1000 |
commit | c4019198cfa81224d32846915cd401e981f81b81 (patch) | |
tree | 994b84d8582d386910ae90f055415899b8bd367f /net/l3mdev | |
parent | e4a884cc28fa3f5d8b81de46998ffe29b4ad169e (diff) |
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 'net/l3mdev')
0 files changed, 0 insertions, 0 deletions