mbox

[utopic,sru,pull-request] powernv: cpuidle: enable fastsleep and winkle LP: #1400411

Message ID 54B023D6.7030701@canonical.com
State New
Headers show

Pull-request

git://kernel.ubuntu.com/arges/ubuntu-utopic.git lp1400411

Message

Chris J Arges Jan. 9, 2015, 6:54 p.m. UTC
BugLink: http://bugs.launchpad.net/bugs/1400411

--

The following changes since commit 33f25ec7e9c08ac03c87bb08c83c2c3acc79f83c:

  Linux 3.16.7-ckt3 (2015-01-08 16:29:10 +0000)

are available in the git repository at:

  git://kernel.ubuntu.com/arges/ubuntu-utopic.git lp1400411

for you to fetch changes up to 7f0f6e7dca5746c70683eb3ac391a1b5886e13fb:

  powernv/powerpc: Add winkle support for offline cpus (2015-01-09
12:33:18 -0600)

----------------------------------------------------------------
Paul Mackerras (3):
      powerpc/powernv: Don't call generic code on offline cpus
      powerpc/powernv: Return to cpu offline loop when finished in KVM guest
      powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle
mode

Shreyas B. Prabhu (3):
      powerpc/powernv: Enable Offline CPUs to enter deep idle states
      powernv/cpuidle: Redesign idle states management
      powernv/powerpc: Add winkle support for offline cpus

 arch/powerpc/include/asm/cpuidle.h             |  20 ++++
 arch/powerpc/include/asm/opal.h                |  13 +++
 arch/powerpc/include/asm/paca.h                |   8 ++
 arch/powerpc/include/asm/ppc-opcode.h          |   2 +
 arch/powerpc/include/asm/processor.h           |   5 +-
 arch/powerpc/include/asm/reg.h                 |   4 +
 arch/powerpc/include/asm/xics.h                |   1 +
 arch/powerpc/kernel/asm-offsets.c              |  11 ++
 arch/powerpc/kernel/exceptions-64s.S           |  37 ++++--
 arch/powerpc/kernel/idle_power7.S              | 358
+++++++++++++++++++++++++++++++++++++++++++++++++++--------
 arch/powerpc/kvm/book3s_hv_rmhandlers.S        |  54 ++++++---
 arch/powerpc/platforms/powernv/opal-wrappers.S |  38 +++++++
 arch/powerpc/platforms/powernv/powernv.h       |   2 +
 arch/powerpc/platforms/powernv/setup.c         | 166
+++++++++++++++++++++++++++
 arch/powerpc/platforms/powernv/smp.c           |  34 +++++-
 arch/powerpc/platforms/powernv/subcore.c       |  35 ++++++
 arch/powerpc/platforms/powernv/subcore.h       |   9 +-
 arch/powerpc/sysdev/xics/icp-native.c          |  25 +++++
 drivers/cpuidle/cpuidle-powernv.c              |  10 +-
 19 files changed, 743 insertions(+), 89 deletions(-)
 create mode 100644 arch/powerpc/include/asm/cpuidle.h

Comments

Andy Whitcroft Jan. 12, 2015, 12:09 p.m. UTC | #1
On Fri, Jan 09, 2015 at 12:54:14PM -0600, Chris J Arges wrote:
> BugLink: http://bugs.launchpad.net/bugs/1400411
> 
> --
> 
> The following changes since commit 33f25ec7e9c08ac03c87bb08c83c2c3acc79f83c:
> 
>   Linux 3.16.7-ckt3 (2015-01-08 16:29:10 +0000)
> 
> are available in the git repository at:
> 
>   git://kernel.ubuntu.com/arges/ubuntu-utopic.git lp1400411
> 
> for you to fetch changes up to 7f0f6e7dca5746c70683eb3ac391a1b5886e13fb:
> 
>   powernv/powerpc: Add winkle support for offline cpus (2015-01-09
> 12:33:18 -0600)
> 
> ----------------------------------------------------------------
> Paul Mackerras (3):
>       powerpc/powernv: Don't call generic code on offline cpus
>       powerpc/powernv: Return to cpu offline loop when finished in KVM guest
>       powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle
> mode
> 
> Shreyas B. Prabhu (3):
>       powerpc/powernv: Enable Offline CPUs to enter deep idle states
>       powernv/cpuidle: Redesign idle states management
>       powernv/powerpc: Add winkle support for offline cpus
> 
>  arch/powerpc/include/asm/cpuidle.h             |  20 ++++
>  arch/powerpc/include/asm/opal.h                |  13 +++
>  arch/powerpc/include/asm/paca.h                |   8 ++
>  arch/powerpc/include/asm/ppc-opcode.h          |   2 +
>  arch/powerpc/include/asm/processor.h           |   5 +-
>  arch/powerpc/include/asm/reg.h                 |   4 +
>  arch/powerpc/include/asm/xics.h                |   1 +
>  arch/powerpc/kernel/asm-offsets.c              |  11 ++
>  arch/powerpc/kernel/exceptions-64s.S           |  37 ++++--
>  arch/powerpc/kernel/idle_power7.S              | 358
> +++++++++++++++++++++++++++++++++++++++++++++++++++--------
>  arch/powerpc/kvm/book3s_hv_rmhandlers.S        |  54 ++++++---
>  arch/powerpc/platforms/powernv/opal-wrappers.S |  38 +++++++
>  arch/powerpc/platforms/powernv/powernv.h       |   2 +
>  arch/powerpc/platforms/powernv/setup.c         | 166
> +++++++++++++++++++++++++++
>  arch/powerpc/platforms/powernv/smp.c           |  34 +++++-
>  arch/powerpc/platforms/powernv/subcore.c       |  35 ++++++
>  arch/powerpc/platforms/powernv/subcore.h       |   9 +-
>  arch/powerpc/sysdev/xics/icp-native.c          |  25 +++++
>  drivers/cpuidle/cpuidle-powernv.c              |  10 +-
>  19 files changed, 743 insertions(+), 89 deletions(-)
>  create mode 100644 arch/powerpc/include/asm/cpuidle.h

This pile of change is a huge heap of completely unreviewable assembly
changes.  It seems to be very power7 specific and so the risk of it
affecting other platforms seems low.  Could you confirm that IBM have
signed off on the backports if they are yours?  Otherwise, gah, this
will need to be well tested before release.

If they have been reviewed by IBM:

Acked-by: Andy Whitcroft <apw@canonical.com>

-apw
Stefan Bader Jan. 12, 2015, 12:36 p.m. UTC | #2
This is not really reviewable. So acking based on its isolation to power arch
and assuming testing not only for the new features but also some kind of
regression testing (run some changing workload over a longer period of time).

-Stefan
Chris J Arges Jan. 12, 2015, 1:41 p.m. UTC | #3
On 01/12/2015 06:09 AM, Andy Whitcroft wrote:
> On Fri, Jan 09, 2015 at 12:54:14PM -0600, Chris J Arges wrote:
>> BugLink: http://bugs.launchpad.net/bugs/1400411
>>
>> --
>>
>> The following changes since commit 33f25ec7e9c08ac03c87bb08c83c2c3acc79f83c:
>>
>>   Linux 3.16.7-ckt3 (2015-01-08 16:29:10 +0000)
>>
>> are available in the git repository at:
>>
>>   git://kernel.ubuntu.com/arges/ubuntu-utopic.git lp1400411
>>
>> for you to fetch changes up to 7f0f6e7dca5746c70683eb3ac391a1b5886e13fb:
>>
>>   powernv/powerpc: Add winkle support for offline cpus (2015-01-09
>> 12:33:18 -0600)
>>
>> ----------------------------------------------------------------
>> Paul Mackerras (3):
>>       powerpc/powernv: Don't call generic code on offline cpus
>>       powerpc/powernv: Return to cpu offline loop when finished in KVM guest
>>       powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle
>> mode
>>
>> Shreyas B. Prabhu (3):
>>       powerpc/powernv: Enable Offline CPUs to enter deep idle states
>>       powernv/cpuidle: Redesign idle states management
>>       powernv/powerpc: Add winkle support for offline cpus
>>
>>  arch/powerpc/include/asm/cpuidle.h             |  20 ++++
>>  arch/powerpc/include/asm/opal.h                |  13 +++
>>  arch/powerpc/include/asm/paca.h                |   8 ++
>>  arch/powerpc/include/asm/ppc-opcode.h          |   2 +
>>  arch/powerpc/include/asm/processor.h           |   5 +-
>>  arch/powerpc/include/asm/reg.h                 |   4 +
>>  arch/powerpc/include/asm/xics.h                |   1 +
>>  arch/powerpc/kernel/asm-offsets.c              |  11 ++
>>  arch/powerpc/kernel/exceptions-64s.S           |  37 ++++--
>>  arch/powerpc/kernel/idle_power7.S              | 358
>> +++++++++++++++++++++++++++++++++++++++++++++++++++--------
>>  arch/powerpc/kvm/book3s_hv_rmhandlers.S        |  54 ++++++---
>>  arch/powerpc/platforms/powernv/opal-wrappers.S |  38 +++++++
>>  arch/powerpc/platforms/powernv/powernv.h       |   2 +
>>  arch/powerpc/platforms/powernv/setup.c         | 166
>> +++++++++++++++++++++++++++
>>  arch/powerpc/platforms/powernv/smp.c           |  34 +++++-
>>  arch/powerpc/platforms/powernv/subcore.c       |  35 ++++++
>>  arch/powerpc/platforms/powernv/subcore.h       |   9 +-
>>  arch/powerpc/sysdev/xics/icp-native.c          |  25 +++++
>>  drivers/cpuidle/cpuidle-powernv.c              |  10 +-
>>  19 files changed, 743 insertions(+), 89 deletions(-)
>>  create mode 100644 arch/powerpc/include/asm/cpuidle.h
> 
> This pile of change is a huge heap of completely unreviewable assembly
> changes.  It seems to be very power7 specific and so the risk of it
> affecting other platforms seems low.  Could you confirm that IBM have
> signed off on the backports if they are yours?  Otherwise, gah, this
> will need to be well tested before release.
> 
> If they have been reviewed by IBM:
> 
> Acked-by: Andy Whitcroft <apw@canonical.com>
> 
> -apw
> 
Andy,

I requested that IBM provide the backport and you can see a tarball of
patches was provided in the buglink (patch 0001 is a clean cherry-pick
btw). From there I took the SHAs and did the backport myself. Then I
compared my changes with what shreyasb@in.ibm.com provided and ensured
that the backported patches were identical.

Next I booted this kernel in a POWER8 machine and asked for proper test
cases for SRU verification. So far it did boot fine and I expect we can
ask for additional testing after this is applied.

Thanks for reviewing,
--chris
Andy Whitcroft Jan. 12, 2015, 2:09 p.m. UTC | #4
On Mon, Jan 12, 2015 at 07:41:44AM -0600, Chris J Arges wrote:
> 
> 
> On 01/12/2015 06:09 AM, Andy Whitcroft wrote:
> > On Fri, Jan 09, 2015 at 12:54:14PM -0600, Chris J Arges wrote:
> >> BugLink: http://bugs.launchpad.net/bugs/1400411
> >>
> >> --
> >>
> >> The following changes since commit 33f25ec7e9c08ac03c87bb08c83c2c3acc79f83c:
> >>
> >>   Linux 3.16.7-ckt3 (2015-01-08 16:29:10 +0000)
> >>
> >> are available in the git repository at:
> >>
> >>   git://kernel.ubuntu.com/arges/ubuntu-utopic.git lp1400411
> >>
> >> for you to fetch changes up to 7f0f6e7dca5746c70683eb3ac391a1b5886e13fb:
> >>
> >>   powernv/powerpc: Add winkle support for offline cpus (2015-01-09
> >> 12:33:18 -0600)
> >>
> >> ----------------------------------------------------------------
> >> Paul Mackerras (3):
> >>       powerpc/powernv: Don't call generic code on offline cpus
> >>       powerpc/powernv: Return to cpu offline loop when finished in KVM guest
> >>       powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle
> >> mode
> >>
> >> Shreyas B. Prabhu (3):
> >>       powerpc/powernv: Enable Offline CPUs to enter deep idle states
> >>       powernv/cpuidle: Redesign idle states management
> >>       powernv/powerpc: Add winkle support for offline cpus
> >>
> >>  arch/powerpc/include/asm/cpuidle.h             |  20 ++++
> >>  arch/powerpc/include/asm/opal.h                |  13 +++
> >>  arch/powerpc/include/asm/paca.h                |   8 ++
> >>  arch/powerpc/include/asm/ppc-opcode.h          |   2 +
> >>  arch/powerpc/include/asm/processor.h           |   5 +-
> >>  arch/powerpc/include/asm/reg.h                 |   4 +
> >>  arch/powerpc/include/asm/xics.h                |   1 +
> >>  arch/powerpc/kernel/asm-offsets.c              |  11 ++
> >>  arch/powerpc/kernel/exceptions-64s.S           |  37 ++++--
> >>  arch/powerpc/kernel/idle_power7.S              | 358
> >> +++++++++++++++++++++++++++++++++++++++++++++++++++--------
> >>  arch/powerpc/kvm/book3s_hv_rmhandlers.S        |  54 ++++++---
> >>  arch/powerpc/platforms/powernv/opal-wrappers.S |  38 +++++++
> >>  arch/powerpc/platforms/powernv/powernv.h       |   2 +
> >>  arch/powerpc/platforms/powernv/setup.c         | 166
> >> +++++++++++++++++++++++++++
> >>  arch/powerpc/platforms/powernv/smp.c           |  34 +++++-
> >>  arch/powerpc/platforms/powernv/subcore.c       |  35 ++++++
> >>  arch/powerpc/platforms/powernv/subcore.h       |   9 +-
> >>  arch/powerpc/sysdev/xics/icp-native.c          |  25 +++++
> >>  drivers/cpuidle/cpuidle-powernv.c              |  10 +-
> >>  19 files changed, 743 insertions(+), 89 deletions(-)
> >>  create mode 100644 arch/powerpc/include/asm/cpuidle.h
> > 
> > This pile of change is a huge heap of completely unreviewable assembly
> > changes.  It seems to be very power7 specific and so the risk of it
> > affecting other platforms seems low.  Could you confirm that IBM have
> > signed off on the backports if they are yours?  Otherwise, gah, this
> > will need to be well tested before release.
> > 
> > If they have been reviewed by IBM:
> > 
> > Acked-by: Andy Whitcroft <apw@canonical.com>
> > 
> > -apw
> > 
> Andy,
> 
> I requested that IBM provide the backport and you can see a tarball of
> patches was provided in the buglink (patch 0001 is a clean cherry-pick
> btw). From there I took the SHAs and did the backport myself. Then I
> compared my changes with what shreyasb@in.ibm.com provided and ensured
> that the backported patches were identical.
> 
> Next I booted this kernel in a POWER8 machine and asked for proper test
> cases for SRU verification. So far it did boot fine and I expect we can
> ask for additional testing after this is applied.
> 
> Thanks for reviewing,
> --chris

As they originate from IBM they meet my criteria above:

Acked-by: Andy Whitcroft <apw@canonical.com>

-apw
Brad Figg Jan. 15, 2015, 6:48 p.m. UTC | #5
On Fri, Jan 09, 2015 at 12:54:14PM -0600, Chris J Arges wrote:
> BugLink: http://bugs.launchpad.net/bugs/1400411
> 
> --
> 
> The following changes since commit 33f25ec7e9c08ac03c87bb08c83c2c3acc79f83c:
> 
>   Linux 3.16.7-ckt3 (2015-01-08 16:29:10 +0000)
> 
> are available in the git repository at:
> 
>   git://kernel.ubuntu.com/arges/ubuntu-utopic.git lp1400411
> 
> for you to fetch changes up to 7f0f6e7dca5746c70683eb3ac391a1b5886e13fb:
> 
>   powernv/powerpc: Add winkle support for offline cpus (2015-01-09
> 12:33:18 -0600)
> 
> ----------------------------------------------------------------
> Paul Mackerras (3):
>       powerpc/powernv: Don't call generic code on offline cpus
>       powerpc/powernv: Return to cpu offline loop when finished in KVM guest
>       powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle
> mode
> 
> Shreyas B. Prabhu (3):
>       powerpc/powernv: Enable Offline CPUs to enter deep idle states
>       powernv/cpuidle: Redesign idle states management
>       powernv/powerpc: Add winkle support for offline cpus
> 
>  arch/powerpc/include/asm/cpuidle.h             |  20 ++++
>  arch/powerpc/include/asm/opal.h                |  13 +++
>  arch/powerpc/include/asm/paca.h                |   8 ++
>  arch/powerpc/include/asm/ppc-opcode.h          |   2 +
>  arch/powerpc/include/asm/processor.h           |   5 +-
>  arch/powerpc/include/asm/reg.h                 |   4 +
>  arch/powerpc/include/asm/xics.h                |   1 +
>  arch/powerpc/kernel/asm-offsets.c              |  11 ++
>  arch/powerpc/kernel/exceptions-64s.S           |  37 ++++--
>  arch/powerpc/kernel/idle_power7.S              | 358
> +++++++++++++++++++++++++++++++++++++++++++++++++++--------
>  arch/powerpc/kvm/book3s_hv_rmhandlers.S        |  54 ++++++---
>  arch/powerpc/platforms/powernv/opal-wrappers.S |  38 +++++++
>  arch/powerpc/platforms/powernv/powernv.h       |   2 +
>  arch/powerpc/platforms/powernv/setup.c         | 166
> +++++++++++++++++++++++++++
>  arch/powerpc/platforms/powernv/smp.c           |  34 +++++-
>  arch/powerpc/platforms/powernv/subcore.c       |  35 ++++++
>  arch/powerpc/platforms/powernv/subcore.h       |   9 +-
>  arch/powerpc/sysdev/xics/icp-native.c          |  25 +++++
>  drivers/cpuidle/cpuidle-powernv.c              |  10 +-
>  19 files changed, 743 insertions(+), 89 deletions(-)
>  create mode 100644 arch/powerpc/include/asm/cpuidle.h
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Applied to Utopic master-next
Michael Ellerman Jan. 22, 2015, 6:29 a.m. UTC | #6
On Fri, 2015-01-09 at 12:54 -0600, Chris J Arges wrote:
> BugLink: http://bugs.launchpad.net/bugs/1400411
> 
> --
> 
> The following changes since commit 33f25ec7e9c08ac03c87bb08c83c2c3acc79f83c:
> 
>   Linux 3.16.7-ckt3 (2015-01-08 16:29:10 +0000)
> 
> are available in the git repository at:
> 
>   git://kernel.ubuntu.com/arges/ubuntu-utopic.git lp1400411
> 
> for you to fetch changes up to 7f0f6e7dca5746c70683eb3ac391a1b5886e13fb:
> 
>   powernv/powerpc: Add winkle support for offline cpus (2015-01-09
> 12:33:18 -0600)
> 
> ----------------------------------------------------------------
> Paul Mackerras (3):
>       powerpc/powernv: Don't call generic code on offline cpus
>       powerpc/powernv: Return to cpu offline loop when finished in KVM guest
>       powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle
> mode
> 
> Shreyas B. Prabhu (3):
>       powerpc/powernv: Enable Offline CPUs to enter deep idle states
>       powernv/cpuidle: Redesign idle states management
>       powernv/powerpc: Add winkle support for offline cpus

There's been two fixes posted related to this:

  http://patchwork.ozlabs.org/patch/431443/
  http://patchwork.ozlabs.org/patch/428943/

cheers
Andy Whitcroft Jan. 22, 2015, 10:30 a.m. UTC | #7
On Thu, Jan 22, 2015 at 05:29:07PM +1100, Michael Ellerman wrote:
> On Fri, 2015-01-09 at 12:54 -0600, Chris J Arges wrote:
> > BugLink: http://bugs.launchpad.net/bugs/1400411
> > 
> > --
> > 
> > The following changes since commit 33f25ec7e9c08ac03c87bb08c83c2c3acc79f83c:
> > 
> >   Linux 3.16.7-ckt3 (2015-01-08 16:29:10 +0000)
> > 
> > are available in the git repository at:
> > 
> >   git://kernel.ubuntu.com/arges/ubuntu-utopic.git lp1400411
> > 
> > for you to fetch changes up to 7f0f6e7dca5746c70683eb3ac391a1b5886e13fb:
> > 
> >   powernv/powerpc: Add winkle support for offline cpus (2015-01-09
> > 12:33:18 -0600)
> > 
> > ----------------------------------------------------------------
> > Paul Mackerras (3):
> >       powerpc/powernv: Don't call generic code on offline cpus
> >       powerpc/powernv: Return to cpu offline loop when finished in KVM guest
> >       powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle
> > mode
> > 
> > Shreyas B. Prabhu (3):
> >       powerpc/powernv: Enable Offline CPUs to enter deep idle states
> >       powernv/cpuidle: Redesign idle states management
> >       powernv/powerpc: Add winkle support for offline cpus
> 
> There's been two fixes posted related to this:
> 
>   http://patchwork.ozlabs.org/patch/431443/
>   http://patchwork.ozlabs.org/patch/428943/

It does seem that both are under heavy discussion, we will want to wait
till that settles down before considering these.

-apw