From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Valentin Schneider <vschneid@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, x86@kernel.org,
Ajay Kaher <akaher@vmware.com>,
Nicholas Piggin <npiggin@gmail.com>,
virtualization@lists.linux-foundation.org,
VMware PV-Drivers Reviewers <pv-drivers@vmware.com>,
Rohan McLure <rmclure@linux.ibm.com>,
Alexey Makhalov <amakhalov@vmware.com>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Josh Poimboeuf <jpoimboe@kernel.org>
Subject: Re: [PATCH v2 3/6] powerpc/smp: Move shared_processor static key to smp.h
Date: Thu, 19 Oct 2023 18:38:43 +0530 [thread overview]
Message-ID: <20231019130843.GI2194132@linux.vnet.ibm.com> (raw)
In-Reply-To: <87sf675im3.fsf@mail.lhotse>
* Michael Ellerman <mpe@ellerman.id.au> [2023-10-19 15:41:40]:
> Srikar Dronamraju <srikar@linux.vnet.ibm.com> writes:
> > The ability to detect if the system is running in a shared processor
> > mode is helpful in few more generic cases not just in
> > paravirtualization.
> > For example: At boot time, different scheduler/ topology flags may be
> > set based on the processor mode. Hence move it to a more generic file.
>
> I'd rather you just included paravirt.h in the few files where you need it.
I thought, detecting if a Processor was shared or not was more a
smp/processor related than a paravirt related.
Will drop as suggested.
>
> cheers
>
> > diff --git a/arch/powerpc/include/asm/paravirt.h b/arch/powerpc/include/asm/paravirt.h
> > index 0372b0093f72..cf83e837a571 100644
> > --- a/arch/powerpc/include/asm/paravirt.h
> > +++ b/arch/powerpc/include/asm/paravirt.h
> > @@ -15,13 +15,6 @@
> > #include <asm/kvm_guest.h>
> > #include <asm/cputhreads.h>
> >
> > -DECLARE_STATIC_KEY_FALSE(shared_processor);
> > -
> > -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;
> > @@ -77,11 +70,6 @@ static inline bool is_vcpu_idle(int vcpu)
> > return lppaca_of(vcpu).idle;
> > }
> > #else
> > -static inline bool is_shared_processor(void)
> > -{
> > - return false;
> > -}
> > -
> > static inline u32 yield_count_of(int cpu)
> > {
> > return 0;
> > diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
> > index aaaa576d0e15..08631b2a4528 100644
> > --- a/arch/powerpc/include/asm/smp.h
> > +++ b/arch/powerpc/include/asm/smp.h
> > @@ -34,6 +34,20 @@ extern bool coregroup_enabled;
> > extern int cpu_to_chip_id(int cpu);
> > extern int *chip_id_lookup_table;
> >
> > +#ifdef CONFIG_PPC_SPLPAR
> > +DECLARE_STATIC_KEY_FALSE(shared_processor);
> > +
> > +static inline bool is_shared_processor(void)
> > +{
> > + return static_branch_unlikely(&shared_processor);
> > +}
> > +#else
> > +static inline bool is_shared_processor(void)
> > +{
> > + return false;
> > +}
> > +#endif
> > +
> > DECLARE_PER_CPU(cpumask_var_t, thread_group_l1_cache_map);
> > DECLARE_PER_CPU(cpumask_var_t, thread_group_l2_cache_map);
> > DECLARE_PER_CPU(cpumask_var_t, thread_group_l3_cache_map);
> > --
> > 2.31.1
--
Thanks and Regards
Srikar Dronamraju
WARNING: multiple messages have this Message-ID (diff)
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Nicholas Piggin <npiggin@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Rohan McLure <rmclure@linux.ibm.com>,
Valentin Schneider <vschneid@redhat.com>,
Ajay Kaher <akaher@vmware.com>,
Alexey Makhalov <amakhalov@vmware.com>,
VMware PV-Drivers Reviewers <pv-drivers@vmware.com>,
Josh Poimboeuf <jpoimboe@kernel.org>,
virtualization@lists.linux-foundation.org, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/6] powerpc/smp: Move shared_processor static key to smp.h
Date: Thu, 19 Oct 2023 18:38:43 +0530 [thread overview]
Message-ID: <20231019130843.GI2194132@linux.vnet.ibm.com> (raw)
In-Reply-To: <87sf675im3.fsf@mail.lhotse>
* Michael Ellerman <mpe@ellerman.id.au> [2023-10-19 15:41:40]:
> Srikar Dronamraju <srikar@linux.vnet.ibm.com> writes:
> > The ability to detect if the system is running in a shared processor
> > mode is helpful in few more generic cases not just in
> > paravirtualization.
> > For example: At boot time, different scheduler/ topology flags may be
> > set based on the processor mode. Hence move it to a more generic file.
>
> I'd rather you just included paravirt.h in the few files where you need it.
I thought, detecting if a Processor was shared or not was more a
smp/processor related than a paravirt related.
Will drop as suggested.
>
> cheers
>
> > diff --git a/arch/powerpc/include/asm/paravirt.h b/arch/powerpc/include/asm/paravirt.h
> > index 0372b0093f72..cf83e837a571 100644
> > --- a/arch/powerpc/include/asm/paravirt.h
> > +++ b/arch/powerpc/include/asm/paravirt.h
> > @@ -15,13 +15,6 @@
> > #include <asm/kvm_guest.h>
> > #include <asm/cputhreads.h>
> >
> > -DECLARE_STATIC_KEY_FALSE(shared_processor);
> > -
> > -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;
> > @@ -77,11 +70,6 @@ static inline bool is_vcpu_idle(int vcpu)
> > return lppaca_of(vcpu).idle;
> > }
> > #else
> > -static inline bool is_shared_processor(void)
> > -{
> > - return false;
> > -}
> > -
> > static inline u32 yield_count_of(int cpu)
> > {
> > return 0;
> > diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
> > index aaaa576d0e15..08631b2a4528 100644
> > --- a/arch/powerpc/include/asm/smp.h
> > +++ b/arch/powerpc/include/asm/smp.h
> > @@ -34,6 +34,20 @@ extern bool coregroup_enabled;
> > extern int cpu_to_chip_id(int cpu);
> > extern int *chip_id_lookup_table;
> >
> > +#ifdef CONFIG_PPC_SPLPAR
> > +DECLARE_STATIC_KEY_FALSE(shared_processor);
> > +
> > +static inline bool is_shared_processor(void)
> > +{
> > + return static_branch_unlikely(&shared_processor);
> > +}
> > +#else
> > +static inline bool is_shared_processor(void)
> > +{
> > + return false;
> > +}
> > +#endif
> > +
> > DECLARE_PER_CPU(cpumask_var_t, thread_group_l1_cache_map);
> > DECLARE_PER_CPU(cpumask_var_t, thread_group_l2_cache_map);
> > DECLARE_PER_CPU(cpumask_var_t, thread_group_l3_cache_map);
> > --
> > 2.31.1
--
Thanks and Regards
Srikar Dronamraju
next prev parent reply other threads:[~2023-10-19 13:09 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 16:37 [PATCH v2 0/6] powerpc/smp: Shared processor sched optimizations Srikar Dronamraju
2023-10-18 16:37 ` [PATCH v2 1/6] powerpc/smp: Cache CPU has Asymmetric SMP Srikar Dronamraju
2023-10-18 16:37 ` Srikar Dronamraju
2023-10-19 4:33 ` Michael Ellerman
2023-10-19 4:33 ` Michael Ellerman
2023-10-20 9:09 ` Srikar Dronamraju
2023-10-20 9:09 ` Srikar Dronamraju
2023-10-18 16:37 ` [PATCH v2 2/6] powerpc/smp: Enable Asym packing for cores on shared processor Srikar Dronamraju
2023-10-18 16:37 ` Srikar Dronamraju
2023-10-19 4:38 ` Michael Ellerman
2023-10-19 4:38 ` Michael Ellerman
2023-10-19 7:48 ` Peter Zijlstra
2023-10-19 7:48 ` Peter Zijlstra
2023-10-19 11:50 ` Michael Ellerman
2023-10-19 11:50 ` Michael Ellerman
2023-10-19 12:54 ` Srikar Dronamraju
2023-10-19 12:54 ` Srikar Dronamraju
2023-10-19 15:56 ` Shrikanth Hegde
2023-10-19 15:56 ` Shrikanth Hegde
2023-10-20 5:44 ` Srikar Dronamraju
2023-10-20 5:44 ` Srikar Dronamraju
2023-10-18 16:37 ` [PATCH v2 3/6] powerpc/smp: Move shared_processor static key to smp.h Srikar Dronamraju
2023-10-18 16:37 ` Srikar Dronamraju
2023-10-19 4:41 ` Michael Ellerman
2023-10-19 4:41 ` Michael Ellerman
2023-10-19 4:41 ` Michael Ellerman
2023-10-19 13:08 ` Srikar Dronamraju [this message]
2023-10-19 13:08 ` Srikar Dronamraju
2023-10-20 10:44 ` Michael Ellerman
2023-10-20 10:44 ` Michael Ellerman
2023-10-20 10:44 ` Michael Ellerman
2023-10-19 10:30 ` Shrikanth Hegde
2023-10-19 10:30 ` Shrikanth Hegde
2023-10-18 16:37 ` [PATCH v2 4/6] powerpc/smp: Disable MC domain for shared processor Srikar Dronamraju
2023-10-18 16:37 ` Srikar Dronamraju
2023-10-19 4:48 ` Michael Ellerman
2023-10-19 4:48 ` Michael Ellerman
2023-10-19 7:50 ` Peter Zijlstra
2023-10-19 7:50 ` Peter Zijlstra
2023-10-19 13:23 ` Srikar Dronamraju
2023-10-19 13:23 ` Srikar Dronamraju
2023-10-19 13:16 ` Srikar Dronamraju
2023-10-19 13:16 ` Srikar Dronamraju
2023-10-18 16:37 ` [PATCH v2 5/6] powerpc/smp: Add read_mostly attribute Srikar Dronamraju
2023-10-18 16:37 ` Srikar Dronamraju
2023-10-19 4:49 ` Michael Ellerman
2023-10-19 4:49 ` Michael Ellerman
2023-10-19 7:51 ` Peter Zijlstra
2023-10-19 7:51 ` Peter Zijlstra
2023-10-19 12:56 ` Srikar Dronamraju
2023-10-19 12:56 ` Srikar Dronamraju
2023-10-18 16:37 ` [PATCH v2 6/6] powerpc/smp: Avoid asym packing within thread_group of a core Srikar Dronamraju
2023-10-18 16:37 ` Srikar Dronamraju
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=20231019130843.GI2194132@linux.vnet.ibm.com \
--to=srikar@linux.vnet.ibm.com \
--cc=akaher@vmware.com \
--cc=amakhalov@vmware.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=pv-drivers@vmware.com \
--cc=rmclure@linux.ibm.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=vschneid@redhat.com \
--cc=x86@kernel.org \
/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.