From: Sowjanya Komatineni <skomatineni@nvidia.com> To: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Sudeep Holla <sudeep.holla@arm.com>, Souvik Chakravarty <souvik.chakravarty@arm.com>, Thierry Reding <thierry.reding@gmail.com>, "Mark Rutland" <mark.rutland@arm.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Daniel Lezcano <daniel.lezcano@linaro.org>, "Rob Herring" <robh+dt@kernel.org>, Jon Hunter <jonathanh@nvidia.com>, <ksitaraman@nvidia.com>, <sanjayc@nvidia.com>, Linux ARM <linux-arm-kernel@lists.infradead.org>, linux-tegra <linux-tegra@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux PM <linux-pm@vger.kernel.org>, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@vger.kernel.org> Subject: Re: [RFC PATCH 0/4] Support for passing runtime state idle time to TF-A Date: Fri, 23 Apr 2021 11:32:58 -0700 [thread overview] Message-ID: <9c01bdb9-90cf-f14a-a886-c91ef01bcf25@nvidia.com> (raw) In-Reply-To: <CAJZ5v0hivxQjA2AZpPxVadzaM7gB+L3BRnoNyeD7hyvr-3Fh4g@mail.gmail.com> On 4/23/21 5:27 AM, Rafael J. Wysocki wrote: > On Thu, Apr 22, 2021 at 10:31 PM Sowjanya Komatineni > <skomatineni@nvidia.com> wrote: >> Tegra194 and Tegra186 platforms use separate MCE firmware for CPUs which is >> in charge of deciding on state transition based on target state, state idle >> time, and some other Tegra CPU core cluster states information. >> >> Current PSCI specification don't have function defined for passing runtime >> state idle time predicted by governor (based on next events and state target >> residency) to ARM trusted firmware. > Presumably that's because this is not a good idea. Tegra194 and Tegra186 platforms use separate MCE firmware for CPUs. MCE firmware handles CPU complex power management states entry/exit based on its background tasks and uses expected wake time of the core to decide on state transition. Expected wake time is based on next event and allowed min residency of the state which governor predicts in kernel which MCE is not aware of. So need a way to pass this info from kernel through PSCI to TF-A and TF-A will update this to MCE along with requested state of entry. For example, When C6 core idle state is requested, MCE notes the time at which core is likely to wake up. There could be background tasks running on core which kernel is not aware of. When those tasks are completed it will check the remaining time against states crossover thresholds (programmed by ARM trusted FW) to determine if its still have enough time to enter into C6 state. While a core is power gates, it could be woken up for background tasks and put back to power gated state again by MCE based on expected wake time of the corresponding core. So, Tegra194/Tegra186 CPU idle support, we need this runtime state expected wake time predicted by governor to be passed from kernel to TF-A. Thanks Sowjanya > > A basic design principle of cpuidle is that it should be possible to > use every governor with every driver and the changes in this series > make the platforms in question only work with menu AFAICS.
WARNING: multiple messages have this Message-ID (diff)
From: Sowjanya Komatineni <skomatineni@nvidia.com> To: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Sudeep Holla <sudeep.holla@arm.com>, Souvik Chakravarty <souvik.chakravarty@arm.com>, Thierry Reding <thierry.reding@gmail.com>, "Mark Rutland" <mark.rutland@arm.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Daniel Lezcano <daniel.lezcano@linaro.org>, "Rob Herring" <robh+dt@kernel.org>, Jon Hunter <jonathanh@nvidia.com>, <ksitaraman@nvidia.com>, <sanjayc@nvidia.com>, Linux ARM <linux-arm-kernel@lists.infradead.org>, linux-tegra <linux-tegra@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux PM <linux-pm@vger.kernel.org>, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@vger.kernel.org> Subject: Re: [RFC PATCH 0/4] Support for passing runtime state idle time to TF-A Date: Fri, 23 Apr 2021 11:32:58 -0700 [thread overview] Message-ID: <9c01bdb9-90cf-f14a-a886-c91ef01bcf25@nvidia.com> (raw) In-Reply-To: <CAJZ5v0hivxQjA2AZpPxVadzaM7gB+L3BRnoNyeD7hyvr-3Fh4g@mail.gmail.com> On 4/23/21 5:27 AM, Rafael J. Wysocki wrote: > On Thu, Apr 22, 2021 at 10:31 PM Sowjanya Komatineni > <skomatineni@nvidia.com> wrote: >> Tegra194 and Tegra186 platforms use separate MCE firmware for CPUs which is >> in charge of deciding on state transition based on target state, state idle >> time, and some other Tegra CPU core cluster states information. >> >> Current PSCI specification don't have function defined for passing runtime >> state idle time predicted by governor (based on next events and state target >> residency) to ARM trusted firmware. > Presumably that's because this is not a good idea. Tegra194 and Tegra186 platforms use separate MCE firmware for CPUs. MCE firmware handles CPU complex power management states entry/exit based on its background tasks and uses expected wake time of the core to decide on state transition. Expected wake time is based on next event and allowed min residency of the state which governor predicts in kernel which MCE is not aware of. So need a way to pass this info from kernel through PSCI to TF-A and TF-A will update this to MCE along with requested state of entry. For example, When C6 core idle state is requested, MCE notes the time at which core is likely to wake up. There could be background tasks running on core which kernel is not aware of. When those tasks are completed it will check the remaining time against states crossover thresholds (programmed by ARM trusted FW) to determine if its still have enough time to enter into C6 state. While a core is power gates, it could be woken up for background tasks and put back to power gated state again by MCE based on expected wake time of the corresponding core. So, Tegra194/Tegra186 CPU idle support, we need this runtime state expected wake time predicted by governor to be passed from kernel to TF-A. Thanks Sowjanya > > A basic design principle of cpuidle is that it should be possible to > use every governor with every driver and the changes in this series > make the platforms in question only work with menu AFAICS. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-04-23 18:33 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-22 20:30 [RFC PATCH 0/4] Support for passing runtime state idle time to TF-A Sowjanya Komatineni 2021-04-22 20:30 ` Sowjanya Komatineni 2021-04-22 20:30 ` [RFC PATCH 1/4] firmware/psci: add support for PSCI function SET_STATE_IDLE_TIME Sowjanya Komatineni 2021-04-22 20:30 ` Sowjanya Komatineni 2021-04-22 20:30 ` [RFC PATCH 2/4] cpuidle: menu: add idle_time to cpuidle_state Sowjanya Komatineni 2021-04-22 20:30 ` Sowjanya Komatineni 2021-04-23 0:46 ` kernel test robot 2021-04-23 1:28 ` kernel test robot 2021-04-23 12:22 ` Rafael J. Wysocki 2021-04-23 12:22 ` Rafael J. Wysocki 2021-04-23 18:33 ` Sowjanya Komatineni 2021-04-23 18:33 ` Sowjanya Komatineni 2021-04-22 20:30 ` [RFC PATCH 3/4] cpuidle: psci: pass state idle time before state enter callback Sowjanya Komatineni 2021-04-22 20:30 ` Sowjanya Komatineni 2021-04-22 20:30 ` [RFC PATCH 4/4] arm64: dts: tegra194: Add CPU idle states Sowjanya Komatineni 2021-04-22 20:30 ` Sowjanya Komatineni 2021-04-23 1:03 ` [RFC PATCH 0/4] Support for passing runtime state idle time to TF-A Sowjanya Komatineni 2021-04-23 1:03 ` Sowjanya Komatineni 2021-04-23 12:27 ` Rafael J. Wysocki 2021-04-23 12:27 ` Rafael J. Wysocki 2021-04-23 18:32 ` Sowjanya Komatineni [this message] 2021-04-23 18:32 ` Sowjanya Komatineni 2021-04-23 20:16 ` Lukasz Luba 2021-04-23 20:16 ` Lukasz Luba 2021-04-23 22:24 ` Sowjanya Komatineni 2021-04-23 22:24 ` Sowjanya Komatineni 2021-04-26 10:10 ` Souvik Chakravarty 2021-04-26 10:10 ` Souvik Chakravarty 2021-04-26 13:11 ` Morten Rasmussen 2021-04-26 13:11 ` Morten Rasmussen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=9c01bdb9-90cf-f14a-a886-c91ef01bcf25@nvidia.com \ --to=skomatineni@nvidia.com \ --cc=daniel.lezcano@linaro.org \ --cc=devicetree@vger.kernel.org \ --cc=jonathanh@nvidia.com \ --cc=ksitaraman@nvidia.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pm@vger.kernel.org \ --cc=linux-tegra@vger.kernel.org \ --cc=lorenzo.pieralisi@arm.com \ --cc=mark.rutland@arm.com \ --cc=rafael@kernel.org \ --cc=robh+dt@kernel.org \ --cc=sanjayc@nvidia.com \ --cc=souvik.chakravarty@arm.com \ --cc=sudeep.holla@arm.com \ --cc=thierry.reding@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.