All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@linux.ibm.com>
To: Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [PATCH 4/4] powerpc/pseries: Implement CONFIG_PARAVIRT_TIME_ACCOUNTING
Date: Fri, 27 May 2022 17:47:14 -0300	[thread overview]
Message-ID: <87czfyln3h.fsf@linux.ibm.com> (raw)
In-Reply-To: <20220518133935.3878954-4-npiggin@gmail.com>

Nicholas Piggin <npiggin@gmail.com> writes:

> CONFIG_VIRT_CPU_ACCOUNTING_GEN under pseries does not implement
> stolen time accounting. Implement it with the paravirt time
> accounting option.
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>  .../admin-guide/kernel-parameters.txt         |  6 +++---
>  arch/powerpc/include/asm/paravirt.h           | 12 ++++++++++++
>  arch/powerpc/platforms/pseries/Kconfig        |  8 ++++++++
>  arch/powerpc/platforms/pseries/lpar.c         | 11 +++++++++++
>  arch/powerpc/platforms/pseries/setup.c        | 19 +++++++++++++++++++
>  5 files changed, 53 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 3f1cc5e317ed..855fc7b02261 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -3604,9 +3604,9 @@
>  			[X86,PV_OPS] Disable paravirtualized VMware scheduler
>  			clock and use the default one.
>
> -	no-steal-acc	[X86,PV_OPS,ARM64] Disable paravirtualized steal time
> -			accounting. steal time is computed, but won't
> -			influence scheduler behaviour
> +	no-steal-acc	[X86,PV_OPS,ARM64,PPC/PSERIES] Disable paravirtualized
> +			steal time accounting. steal time is computed, but
> +			won't influence scheduler behaviour
>
>  	nolapic		[X86-32,APIC] Do not enable or use the local APIC.
>
> diff --git a/arch/powerpc/include/asm/paravirt.h b/arch/powerpc/include/asm/paravirt.h
> index eb7df559ae74..f5ba1a3c41f8 100644
> --- a/arch/powerpc/include/asm/paravirt.h
> +++ b/arch/powerpc/include/asm/paravirt.h
> @@ -21,6 +21,18 @@ static inline bool is_shared_processor(void)
>  	return static_branch_unlikely(&shared_processor);
>  }
>
> +#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING
> +extern struct static_key paravirt_steal_enabled;
> +extern struct static_key paravirt_steal_rq_enabled;
> +
> +u64 pseries_paravirt_steal_clock(int cpu);
> +
> +static inline u64 paravirt_steal_clock(int cpu)
> +{
> +	return pseries_paravirt_steal_clock(cpu);
> +}
> +#endif
> +
>  /* If bit 0 is set, the cpu has been ceded, conferred, or preempted */
>  static inline u32 yield_count_of(int cpu)
>  {
> diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
> index f7fd91d153a4..d4306ebdca5e 100644
> --- a/arch/powerpc/platforms/pseries/Kconfig
> +++ b/arch/powerpc/platforms/pseries/Kconfig
> @@ -24,13 +24,21 @@ config PPC_PSERIES
>  	select SWIOTLB
>  	default y
>
> +config PARAVIRT
> +	bool
> +

In file included from ../kernel/sched/build_utility.c:53:
../kernel/sched/sched.h:87:11: fatal error: asm/paravirt_api_clock.h: No such file or directory
   87 | # include <asm/paravirt_api_clock.h>

$ find . -name paravirt_api_clock.h
./arch/arm64/include/asm/paravirt_api_clock.h
./arch/x86/include/asm/paravirt_api_clock.h
./arch/arm/include/asm/paravirt_api_clock.h

>  config PARAVIRT_SPINLOCKS
>  	bool
>
> +config PARAVIRT_TIME_ACCOUNTING
> +	select PARAVIRT
> +	bool
> +
>  config PPC_SPLPAR
>  	bool "Support for shared-processor logical partitions"
>  	depends on PPC_PSERIES
>  	select PARAVIRT_SPINLOCKS if PPC_QUEUED_SPINLOCKS
> +	select PARAVIRT_TIME_ACCOUNTING if VIRT_CPU_ACCOUNTING_GEN
>  	default y
>  	help
>  	  Enabling this option will make the kernel run more efficiently

  reply	other threads:[~2022-05-27 20:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18 13:39 [PATCH 1/4] KVM: PPC: Book3S HV P9: Restore stolen time logging in dtl Nicholas Piggin
2022-05-18 13:39 ` [PATCH 2/4] powerpc/pseries: Add wait interval counters to VPA Nicholas Piggin
2022-05-27 20:25   ` Fabiano Rosas
2022-05-18 13:39 ` [PATCH 3/4] KVM: PPC: Book3S HV: Implement scheduling wait interval counters in the VPA Nicholas Piggin
2022-05-27 20:25   ` Fabiano Rosas
2022-05-18 13:39 ` [PATCH 4/4] powerpc/pseries: Implement CONFIG_PARAVIRT_TIME_ACCOUNTING Nicholas Piggin
2022-05-27 20:47   ` Fabiano Rosas [this message]
2022-06-03 10:57   ` shrikanth suresh hegde
2022-05-27 18:45 ` [PATCH 1/4] KVM: PPC: Book3S HV P9: Restore stolen time logging in dtl Fabiano Rosas

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=87czfyln3h.fsf@linux.ibm.com \
    --to=farosas@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@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: link
Be 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.