Re: Fwd: ARM64: CPUIdle driver is not select any Idle state other then WFI

Vivek yadav <[email protected]> Tue, 15 Oct 2024 21:45:36 +0530
Newsgroups gmane.linux.newbie,gmane.linux.power-management.general
Message-ID <CAO6a-99bfA8+23cjg_x-9dBn_bEUsR5K9CS5D5L50YsgC3zavg@mail.gmail.com>
Hi Christian,
> My guess would be that state1 can't be entered, i.e.
> entered_state =3D target_state->enter(dev, drv, index);
> returns < 0, in that case the sysfs 'rejected' field
> will be incremented instead of usage and time.
> Is that the case for you?

Yes, I checked your guess was correct. ``enter_state`` value equals to Zero=
.

``#cat /sys/devices/system/cpu/cpu*/cpuidle/state*/rejected``
0 =3D=3D> state_0 CPU(0)
0 =3D=3D> state_1 CPU(0)
0 =3D=3D> state_0 rejected values CPU(1)
600117 =3D=3D> state_1 increasing values CPU(1)
0
854505
0
41756644

> In that case your psci description is probably wrong
> and doesn't match your system.

What do you mean by ``psci`` description ?

I have one node in the device  tree file.

psci {
     compatible =3D "arm,psci-1.0";
     method =3D "smc";
};

On Tue, Oct 15, 2024 at 3:12=E2=80=AFPM Christian Loehle
<[email protected]> wrote:
>
> On 10/14/24 16:49, Vivek yadav wrote:
> > * # Be careful, this email looks suspicious; * User Impersonation: The =
display name on this email is very similar to an internal user but was sent=
 from an email address not normally used by the person. *
> > Hi Christian,
> >
> >> What is the value of
> >> cat /sys/devices/system/cpu/cpu*/cpuidle/state*/usage?
> >
> > 0 =3D=3D=3D>CPU0 state0 (WFI)
> > 0 =3D=3D=3D>CPU0 state1 (cpu-retention)
> > 408 =3D=3D> these values are increasing
> > 0
> > 38
> > 0
> > 14
> > 0
> >
> >> What if you disable state0 on all CPUs?
> >> echo 1 > /sys/devices/system/cpu/cpu*/cpuidle/state0/disable
> >
> > After executing above command.  CPU Idle state WFI time stopped. But
> > no change in ``state1`` time.
> >
> > ``cat /sys/devices/system/cpu/cpu*/cpuidle/state*/time``
> >
> > OUTPUT:
> > 0 =3D=3D=3D>CPU0 state0 (WFI)
> > 0 =3D=3D=3D>CPU0 state1 (cpu-retention)
> >
> > increasing some time value(23968) =3D=3D=3D>CPU1 state0 (WFI)
> > 0 =3D=3D=3D>CPU1 state1 (cpu-retention)
> >
> > increasing some time value(17512) =3D=3D> now it also not increasing
> > 0
> >
> > increasing some time value(6661)
> > 0
> >
> > ``cat /sys/devices/system/cpu/cpu*/cpuidle/state*/usage``
> >
> > 0 =3D=3D=3D>CPU0 state0 (WFI)
> > 0 =3D=3D=3D>CPU0 state1 (cpu-retention)
> >
> > 408 =3D=3D> now these values also stop increasing
> > 0
> >
> > 42
> > 0
> >
> > 14
> > 0
>
> My guess would be that state1 can't be entered, i.e.
> entered_state =3D target_state->enter(dev, drv, index);
> returns < 0, in that case the sysfs 'rejected' field
> will be incremented instead of usage and time.
>
> Is that the case for you?
> In that case your psci description is probably wrong
> and doesn't match your system.
>
> Regards,
> Christian
>
>