Message ID | 1491038979-10492-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com |
---|---|
State | Accepted |
Headers | show |
Hi Shilpa On 2017-04-01 14:59, Shilpasri G Bhat wrote: > In P9, once OCC is up, it is supposed to setup the cores to nominal > frequency. So skip this step in OPAL. > > Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> > --- > hw/occ.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/hw/occ.c b/hw/occ.c > index 2ffb677..b222521 100644 > --- a/hw/occ.c > +++ b/hw/occ.c > @@ -897,11 +897,14 @@ void occ_pstates_init(void) > return; > } > > - /* Setup host based pstates and set nominal frequency */ > - for_each_chip(chip) { > - for_each_available_core_in_chip(c, chip->id) { > - cpu_pstates_prepare_core(chip, c, pstate_nom); > - } > + /* > + * Setup host based pstates and set nominal frequency only in > + * P8. > + */ Instead of skipping, is it good to add validating whether core comes with nominal frequency or psafe frequency? So that we can catch in OPAL log about any failure if OCC doesn't set up the core nominal frequency properly during boot time. What will be the impact, if core comes with psafe frequency? > + if (proc_gen == proc_gen_p8) { > + for_each_chip(chip) > + for_each_available_core_in_chip(c, chip->id) > + cpu_pstates_prepare_core(chip, c, pstate_nom); > } > > /* Add opal_poller to poll OCC throttle status of each chip */
* Shilpa Bhat <shilpa.bhat@linux.vnet.ibm.com> [2017-04-01 14:59:39]: > In P9, once OCC is up, it is supposed to setup the cores to nominal > frequency. So skip this step in OPAL. > > Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Acked-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Tested-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> > --- > hw/occ.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) Tested on Zaius platform. OCC is enabled and we need the following patch to skip setting nominal frequency in skiboot. This will be done by OCC on P9 and future platforms. We save few 10s of milli-seconds in bootup where we have to do xscoms and wait for transitions and switch control back to host. This task is best done by OCC when it boots up. --Vaidy > diff --git a/hw/occ.c b/hw/occ.c > index 2ffb677..b222521 100644 > --- a/hw/occ.c > +++ b/hw/occ.c > @@ -897,11 +897,14 @@ void occ_pstates_init(void) > return; > } > > - /* Setup host based pstates and set nominal frequency */ > - for_each_chip(chip) { > - for_each_available_core_in_chip(c, chip->id) { > - cpu_pstates_prepare_core(chip, c, pstate_nom); > - } > + /* > + * Setup host based pstates and set nominal frequency only in > + * P8. > + */ > + if (proc_gen == proc_gen_p8) { > + for_each_chip(chip) > + for_each_available_core_in_chip(c, chip->id) > + cpu_pstates_prepare_core(chip, c, pstate_nom); > } > > /* Add opal_poller to poll OCC throttle status of each chip */ > -- > 1.8.3.1 >
* ppaidipe <ppaidipe@linux.vnet.ibm.com> [2017-04-03 11:32:55]: > Hi Shilpa > > On 2017-04-01 14:59, Shilpasri G Bhat wrote: > > In P9, once OCC is up, it is supposed to setup the cores to nominal > > frequency. So skip this step in OPAL. > > > > Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> > > --- > > hw/occ.c | 13 ++++++++----- > > 1 file changed, 8 insertions(+), 5 deletions(-) > > > > diff --git a/hw/occ.c b/hw/occ.c > > index 2ffb677..b222521 100644 > > --- a/hw/occ.c > > +++ b/hw/occ.c > > @@ -897,11 +897,14 @@ void occ_pstates_init(void) > > return; > > } > > > > - /* Setup host based pstates and set nominal frequency */ > > - for_each_chip(chip) { > > - for_each_available_core_in_chip(c, chip->id) { > > - cpu_pstates_prepare_core(chip, c, pstate_nom); > > - } > > + /* > > + * Setup host based pstates and set nominal frequency only in > > + * P8. > > + */ > > Instead of skipping, is it good to add validating whether core comes with > nominal frequency > or psafe frequency? So that we can catch in OPAL log about any failure if > OCC doesn't set > up the core nominal frequency properly during boot time. > What will be the impact, if core comes with psafe frequency? Good idea to validate, but we should not hold bootup to do this verification. On P8 we had to wait for OCC boot and manually transition to nominal, but on P9 and newer platforms we can proceed the moment we get the PState table in HOMER and no further xscoms and waits needed. This will save us a bit of bootup time on OCC preloaded systems and a ton of bootup time where skiboot has to initiate OCC load. These transitions can be verified even at petit boot time and since OCC issues are not fatal to bootup, we should not delay bootup but rather move the checks to later stages in boot process. Actually if we are in psafe, the Linux kernel cpufreq driver will log a message. Also we will never load the driver if OCC never started and provided us a PState table. We log that in skiboot as well. Verification of whether we entered Linux at nominal frequency is not checked, but that is something we could do at later stage in bootup. We would like to verify whether PState transition really work or not and log a message from cpufreq platform driver. --Vaidy
diff --git a/hw/occ.c b/hw/occ.c index 2ffb677..b222521 100644 --- a/hw/occ.c +++ b/hw/occ.c @@ -897,11 +897,14 @@ void occ_pstates_init(void) return; } - /* Setup host based pstates and set nominal frequency */ - for_each_chip(chip) { - for_each_available_core_in_chip(c, chip->id) { - cpu_pstates_prepare_core(chip, c, pstate_nom); - } + /* + * Setup host based pstates and set nominal frequency only in + * P8. + */ + if (proc_gen == proc_gen_p8) { + for_each_chip(chip) + for_each_available_core_in_chip(c, chip->id) + cpu_pstates_prepare_core(chip, c, pstate_nom); } /* Add opal_poller to poll OCC throttle status of each chip */
In P9, once OCC is up, it is supposed to setup the cores to nominal frequency. So skip this step in OPAL. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> --- hw/occ.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)