From: Gautham R Shenoy <ego.lkml@gmail.com> To: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Abhishek <huntbag@linux.vnet.ibm.com>, "Rafael J. Wysocki" <rafael@kernel.org>, "Rafael J. Wysocki" <rjw@rjwysocki.net>, linuxppc-dev <linuxppc-dev@lists.ozlabs.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux PM <linux-pm@vger.kernel.org>, ego@linux.vnet.ibm.com, Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Subject: Re: [PATCH 1/2] cpuidle : auto-promotion for cpuidle states Date: Thu, 4 Apr 2019 16:24:37 +0530 [thread overview] Message-ID: <CAHZ_5WzRn-Q-E8X-_dmyn14gp1Go2LNbceNNuYnbpEcgpM-1Hw@mail.gmail.com> (raw) In-Reply-To: <9e542011-df6d-9b84-823b-2af6a6ef9e94@linaro.org> Hello Daniel, On Thu, Apr 4, 2019 at 3:52 PM Daniel Lezcano <daniel.lezcano@linaro.org> wrote: > > > Hi Abhishek, > > thanks for taking the time to test the different scenario and give us > the numbers. > > On 01/04/2019 07:11, Abhishek wrote: > > [.. snip..] > > >>>> In case of POWER, this is problematic, when the predicted state in the > >>>> aforementioned scenario is a lite stop state, as such lite states will > >>>> inhibit SMT folding, thereby depriving the other threads in the core > >>>> from > >>>> using the core resources. > > I can understand an idle state can prevent other threads to use the core > resources. But why a deeper idle state does not prevent this also? On POWER9, we have the following classes of platform idle states (called stop states) lite : These do not lose any context including the user context. In this state GPRs are also preserved (stop0_lite) shallow : These lose user context,but not the hypervisor context. So GPRs are lost but not SPRs. (stop0, stop1, stop2) deep: These lose hypervisor context. (stop4, stop5) In the case of lite stop state, only instruction dispatch on the CPU thread is paused. The thread does not give up its registers set in this state for the use of its busy sibling threads in the core. Hence, SMT folding does not happen in this state. With respect to shallow and deep states, not only is the instruction dispatch paused, it also gives up its registers set for the other siblings to use These stop states are beneficial for SMT folding. Hence, if a CPU thread remains in a lite state for too long, its siblings in the core would not be able to utilize the full resources of the core for that duration, thereby inhibiting single thread performance. This is not the case with non-lite states. -- Thanks and Regards gautham.
WARNING: multiple messages have this Message-ID (diff)
From: Gautham R Shenoy <ego.lkml@gmail.com> To: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: ego@linux.vnet.ibm.com, Linux PM <linux-pm@vger.kernel.org>, "Rafael J. Wysocki" <rafael@kernel.org>, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Abhishek <huntbag@linux.vnet.ibm.com>, linuxppc-dev <linuxppc-dev@lists.ozlabs.org> Subject: Re: [PATCH 1/2] cpuidle : auto-promotion for cpuidle states Date: Thu, 4 Apr 2019 16:24:37 +0530 [thread overview] Message-ID: <CAHZ_5WzRn-Q-E8X-_dmyn14gp1Go2LNbceNNuYnbpEcgpM-1Hw@mail.gmail.com> (raw) In-Reply-To: <9e542011-df6d-9b84-823b-2af6a6ef9e94@linaro.org> Hello Daniel, On Thu, Apr 4, 2019 at 3:52 PM Daniel Lezcano <daniel.lezcano@linaro.org> wrote: > > > Hi Abhishek, > > thanks for taking the time to test the different scenario and give us > the numbers. > > On 01/04/2019 07:11, Abhishek wrote: > > [.. snip..] > > >>>> In case of POWER, this is problematic, when the predicted state in the > >>>> aforementioned scenario is a lite stop state, as such lite states will > >>>> inhibit SMT folding, thereby depriving the other threads in the core > >>>> from > >>>> using the core resources. > > I can understand an idle state can prevent other threads to use the core > resources. But why a deeper idle state does not prevent this also? On POWER9, we have the following classes of platform idle states (called stop states) lite : These do not lose any context including the user context. In this state GPRs are also preserved (stop0_lite) shallow : These lose user context,but not the hypervisor context. So GPRs are lost but not SPRs. (stop0, stop1, stop2) deep: These lose hypervisor context. (stop4, stop5) In the case of lite stop state, only instruction dispatch on the CPU thread is paused. The thread does not give up its registers set in this state for the use of its busy sibling threads in the core. Hence, SMT folding does not happen in this state. With respect to shallow and deep states, not only is the instruction dispatch paused, it also gives up its registers set for the other siblings to use These stop states are beneficial for SMT folding. Hence, if a CPU thread remains in a lite state for too long, its siblings in the core would not be able to utilize the full resources of the core for that duration, thereby inhibiting single thread performance. This is not the case with non-lite states. -- Thanks and Regards gautham.
next prev parent reply other threads:[~2019-04-04 10:54 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-03-22 7:29 [PATCH 0/2] Auto-promotion logic for cpuidle states Abhishek Goel 2019-03-22 7:29 ` Abhishek Goel 2019-03-22 7:29 ` [PATCH 1/2] cpuidle : auto-promotion " Abhishek Goel 2019-03-22 7:29 ` Abhishek Goel 2019-03-22 9:45 ` Rafael J. Wysocki 2019-03-22 9:45 ` Rafael J. Wysocki 2019-03-22 13:26 ` Daniel Lezcano 2019-03-22 13:26 ` Daniel Lezcano 2019-04-01 5:11 ` Abhishek 2019-04-01 5:11 ` Abhishek 2019-04-04 10:21 ` Daniel Lezcano 2019-04-04 10:21 ` Daniel Lezcano 2019-04-04 10:54 ` Gautham R Shenoy [this message] 2019-04-04 10:54 ` Gautham R Shenoy 2019-04-04 11:10 ` Abhishek 2019-04-04 11:10 ` Abhishek 2019-03-22 7:29 ` [PATCH 2/2] cpuidle : Add auto-promotion flag to cpuidle flags Abhishek Goel 2019-03-22 7:29 ` Abhishek Goel -- strict thread matches above, loose matches on Subject: below -- 2019-03-22 6:25 [PATCH 0/2] Auto-promotion logic for cpuidle states Abhishek Goel 2019-03-22 6:25 ` [PATCH 1/2] cpuidle : auto-promotion " Abhishek Goel 2019-03-22 6:25 ` Abhishek Goel
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=CAHZ_5WzRn-Q-E8X-_dmyn14gp1Go2LNbceNNuYnbpEcgpM-1Hw@mail.gmail.com \ --to=ego.lkml@gmail.com \ --cc=daniel.lezcano@linaro.org \ --cc=ego@linux.vnet.ibm.com \ --cc=huntbag@linux.vnet.ibm.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pm@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=rafael@kernel.org \ --cc=rjw@rjwysocki.net \ --cc=svaidy@linux.vnet.ibm.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.