2023-09-12 22:54:39

by Michael Ellerman

[permalink] [raw]
Subject: Re: [RFC v3 1/2] powerpc/cpuidle: cpuidle wakeup latency based on IPI and timer events

Aboorva Devarajan <[email protected]> writes:
> From: Pratik R. Sampat <[email protected]>
>
> Introduce a mechanism to fire directed IPIs from a source CPU to a
> specified target CPU and measure the time incurred on waking up the
> target CPU in response.
>
> Also, introduce a mechanism to queue a hrtimer on a specified CPU and
> subsequently measure the time taken to wakeup the CPU.
>
> Define a simple debugfs interface that allows for adjusting the
> settings to trigger IPI and timer events on a designated CPU, and to
> observe the resulting cpuidle wakeup latencies.
>
> Reviewed-by: Srikar Dronamraju <[email protected]>
> Signed-off-by: Pratik R. Sampat <[email protected]>
> Signed-off-by: Aboorva Devarajan <[email protected]>
> ---
> arch/powerpc/Kconfig.debug | 10 ++
> arch/powerpc/kernel/Makefile | 1 +
> arch/powerpc/kernel/test_cpuidle_latency.c | 154 +++++++++++++++++++++

I don't see anything here that's powerpc specific?

Which makes me wonder 1) could this be done with some existing generic
mechanism?, and 2) if not can this test code be made generic.

At the very least this should be Cc'ed to the cpuidle lists &
maintainers given it's a test for cpuidle latency :)

cheers


2023-09-22 03:52:27

by Aboorva Devarajan

[permalink] [raw]
Subject: Re: [RFC v3 1/2] powerpc/cpuidle: cpuidle wakeup latency based on IPI and timer events

On Wed, 2023-09-13 at 08:54 +1000, Michael Ellerman wrote:
> Aboorva Devarajan <[email protected]> writes:
> > From: Pratik R. Sampat <[email protected]>
> >
> > Introduce a mechanism to fire directed IPIs from a source CPU to a
> > specified target CPU and measure the time incurred on waking up the
> > target CPU in response.
> >
> > Also, introduce a mechanism to queue a hrtimer on a specified CPU
> > and
> > subsequently measure the time taken to wakeup the CPU.
> >
> > Define a simple debugfs interface that allows for adjusting the
> > settings to trigger IPI and timer events on a designated CPU, and
> > to
> > observe the resulting cpuidle wakeup latencies.
> >
> > Reviewed-by: Srikar Dronamraju <[email protected]>
> > Signed-off-by: Pratik R. Sampat <[email protected]>
> > Signed-off-by: Aboorva Devarajan <[email protected]>
> > ---
> > arch/powerpc/Kconfig.debug | 10 ++
> > arch/powerpc/kernel/Makefile | 1 +
> > arch/powerpc/kernel/test_cpuidle_latency.c | 154
> > +++++++++++++++++++++
>
> I don't see anything here that's powerpc specific?
>
> Which makes me wonder 1) could this be done with some existing
> generic
> mechanism?, and 2) if not can this test code be made generic.
>
> At the very least this should be Cc'ed to the cpuidle lists &
> maintainers given it's a test for cpuidle latency :)
>
> cheers

Hi Michael,

Thanks a lot for taking a look at this.

Yes, this test-case can be used as a generic benchmark for evaluating
CPU idle latencies across different architectures, as it has thus far
been exclusively tested and used on PowerPC, so we thought it would be
more beneficial to incorporate it into a PowerPC specific self-test
suite. But I will work on making it a generic self-test and send across
a v4.

2023-09-22 06:31:16

by Michael Ellerman

[permalink] [raw]
Subject: Re: [RFC v3 1/2] powerpc/cpuidle: cpuidle wakeup latency based on IPI and timer events

Aboorva Devarajan <[email protected]> writes:
> On Wed, 2023-09-13 at 08:54 +1000, Michael Ellerman wrote:
>> Aboorva Devarajan <[email protected]> writes:
>> > From: Pratik R. Sampat <[email protected]>
>> >
>> > Introduce a mechanism to fire directed IPIs from a source CPU to a
>> > specified target CPU and measure the time incurred on waking up the
>> > target CPU in response.
>> >
>> > Also, introduce a mechanism to queue a hrtimer on a specified CPU
>> > and
>> > subsequently measure the time taken to wakeup the CPU.
>> >
>> > Define a simple debugfs interface that allows for adjusting the
>> > settings to trigger IPI and timer events on a designated CPU, and
>> > to
>> > observe the resulting cpuidle wakeup latencies.
>> >
>> > Reviewed-by: Srikar Dronamraju <[email protected]>
>> > Signed-off-by: Pratik R. Sampat <[email protected]>
>> > Signed-off-by: Aboorva Devarajan <[email protected]>
>> > ---
>> > arch/powerpc/Kconfig.debug | 10 ++
>> > arch/powerpc/kernel/Makefile | 1 +
>> > arch/powerpc/kernel/test_cpuidle_latency.c | 154
>> > +++++++++++++++++++++
>>
>> I don't see anything here that's powerpc specific?
>>
>> Which makes me wonder 1) could this be done with some existing
>> generic
>> mechanism?, and 2) if not can this test code be made generic.
>>
>> At the very least this should be Cc'ed to the cpuidle lists &
>> maintainers given it's a test for cpuidle latency :)
>>
>> cheers
>
> Hi Michael,
>
> Thanks a lot for taking a look at this.
>
> Yes, this test-case can be used as a generic benchmark for evaluating
> CPU idle latencies across different architectures, as it has thus far
> been exclusively tested and used on PowerPC, so we thought it would be
> more beneficial to incorporate it into a PowerPC specific self-test
> suite. But I will work on making it a generic self-test and send across
> a v4.

I'd suggest just posting v3 again but Cc'ing the cpuidle lists &
maintainers, to see if there is any interest in making it generic.

cheers