mbox series

[RFC,0/3] powerpc/32: nohz full support

Message ID 20221004063306.511154-1-npiggin@gmail.com (mailing list archive)
Headers show
Series powerpc/32: nohz full support | expand

Message

Nicholas Piggin Oct. 4, 2022, 6:33 a.m. UTC
Doesn't seem to be much more involved in adding context tracking and
generic virt cpu accounting support for 32-bit, which is all that's
left to support NO_HZ_FULL.

I tested this with e5500 SMP kernel with isolated and nohz CPU, and
it seems to be doing the right thing -- periodic tick is stopped on
the nohz CPUs when they are running in userspace.

Context tracking warnings should catch quite quickly if we got
something wrong there (with the force context tracking option). I
don't have a 32-bit KVM environment to test so that might have some
issues but it should be quite easy to fix if it can be tested.

I assume the virt cpu accounting gen option removal is okay, but not
exactly sure what to look for in terms of possible problems, so we'll
see what comments that gets back.

Thanks,
Nick

Nicholas Piggin (3):
  powerpc/32: Implement HAVE_CONTEXT_TRACKING_USER support
  powerpc: remove the last remnants of cputime_t
  Remove HAVE_VIRT_CPU_ACCOUNTING_GEN option

 arch/Kconfig                         | 11 -----------
 arch/arm/Kconfig                     |  1 -
 arch/csky/Kconfig                    |  1 -
 arch/loongarch/Kconfig               |  1 -
 arch/mips/Kconfig                    |  1 -
 arch/powerpc/Kconfig                 |  2 +-
 arch/powerpc/include/asm/cputime.h   | 17 +----------------
 arch/powerpc/include/asm/interrupt.h | 21 ++++++---------------
 arch/powerpc/kernel/time.c           | 23 ++---------------------
 arch/xtensa/Kconfig                  |  1 -
 init/Kconfig                         |  1 -
 kernel/time/Kconfig                  |  2 --
 12 files changed, 10 insertions(+), 72 deletions(-)

Comments

Christophe Leroy Oct. 4, 2022, 11:58 a.m. UTC | #1
Le 04/10/2022 à 08:33, Nicholas Piggin a écrit :
> Doesn't seem to be much more involved in adding context tracking and
> generic virt cpu accounting support for 32-bit, which is all that's
> left to support NO_HZ_FULL.
> 
> I tested this with e5500 SMP kernel with isolated and nohz CPU, and
> it seems to be doing the right thing -- periodic tick is stopped on
> the nohz CPUs when they are running in userspace.
> 
> Context tracking warnings should catch quite quickly if we got
> something wrong there (with the force context tracking option). I
> don't have a 32-bit KVM environment to test so that might have some
> issues but it should be quite easy to fix if it can be tested.
> 
> I assume the virt cpu accounting gen option removal is okay, but not
> exactly sure what to look for in terms of possible problems, so we'll
> see what comments that gets back.

I'm having hard time finding the link between patch 1 and patch 2/3.

Christophe

> 
> Thanks,
> Nick
> 
> Nicholas Piggin (3):
>    powerpc/32: Implement HAVE_CONTEXT_TRACKING_USER support
>    powerpc: remove the last remnants of cputime_t
>    Remove HAVE_VIRT_CPU_ACCOUNTING_GEN option
> 
>   arch/Kconfig                         | 11 -----------
>   arch/arm/Kconfig                     |  1 -
>   arch/csky/Kconfig                    |  1 -
>   arch/loongarch/Kconfig               |  1 -
>   arch/mips/Kconfig                    |  1 -
>   arch/powerpc/Kconfig                 |  2 +-
>   arch/powerpc/include/asm/cputime.h   | 17 +----------------
>   arch/powerpc/include/asm/interrupt.h | 21 ++++++---------------
>   arch/powerpc/kernel/time.c           | 23 ++---------------------
>   arch/xtensa/Kconfig                  |  1 -
>   init/Kconfig                         |  1 -
>   kernel/time/Kconfig                  |  2 --
>   12 files changed, 10 insertions(+), 72 deletions(-)
>
Nicholas Piggin Oct. 6, 2022, 8:18 a.m. UTC | #2
On Tue Oct 4, 2022 at 9:58 PM AEST, Christophe Leroy wrote:
>
>
> Le 04/10/2022 à 08:33, Nicholas Piggin a écrit :
> > Doesn't seem to be much more involved in adding context tracking and
> > generic virt cpu accounting support for 32-bit, which is all that's
> > left to support NO_HZ_FULL.
> > 
> > I tested this with e5500 SMP kernel with isolated and nohz CPU, and
> > it seems to be doing the right thing -- periodic tick is stopped on
> > the nohz CPUs when they are running in userspace.
> > 
> > Context tracking warnings should catch quite quickly if we got
> > something wrong there (with the force context tracking option). I
> > don't have a 32-bit KVM environment to test so that might have some
> > issues but it should be quite easy to fix if it can be tested.
> > 
> > I assume the virt cpu accounting gen option removal is okay, but not
> > exactly sure what to look for in terms of possible problems, so we'll
> > see what comments that gets back.
>
> I'm having hard time finding the link between patch 1 and patch 2/3.

Oh, it's just that NO_HZ_FULL needs both context tracking and
VIRT_CPU_ACCOUNTING_GEN. The patches aren't logically related
at all (and enabling the latter requires no more than removing
the 'if PPC64' clause in our arch support so it doesn't depend
on making these arch changes either -- I'll submit that as the
patch if 2 and 3 have not been picked up before then.

Thanks,
Nick