From: Srikar Dronamraju <srikar@linux.vnet.ibm.com> To: Ingo Molnar <mingo@kernel.org>, Peter Zijlstra <peterz@infradead.org> Cc: LKML <linux-kernel@vger.kernel.org>, Mel Gorman <mgorman@techsingularity.net>, Rik van Riel <riel@surriel.com>, Srikar Dronamraju <srikar@linux.vnet.ibm.com>, Thomas Gleixner <tglx@linutronix.de>, Valentin Schneider <valentin.schneider@arm.com>, Vincent Guittot <vincent.guittot@linaro.org>, Dietmar Eggemann <dietmar.eggemann@arm.com>, linuxppc-dev <linuxppc-dev@lists.ozlabs.org>, Michael Ellerman <mpe@ellerman.id.au>, Michael Neuling <mikey@neuling.org>, Gautham R Shenoy <ego@linux.vnet.ibm.com>, Vaidyanathan Srinivasan <svaidy@linux.ibm.com> Subject: [PATCH 1/2] sched/topology: Allow archs to override cpu_smt_mask Date: Tue, 4 Aug 2020 09:03:06 +0530 [thread overview] Message-ID: <20200804033307.76111-1-srikar@linux.vnet.ibm.com> (raw) cpu_smt_mask tracks topology_sibling_cpumask. This would be good for most architectures. One of the users of cpu_smt_mask(), would be to identify idle-cores. On Power9, a pair of cores can be presented by the firmware as a big-core for backward compatibility reasons. In order to maintain userspace backward compatibility with previous versions of processor, (since Power8 had SMT8 cores), Power9 onwards there is option to the firmware to advertise a pair of SMT4 cores as a fused cores (referred to as the big_core mode in the Linux Kernel). On Power9 this pair shares the L2 cache as well. However, from the scheduler's point of view, a core should be determined by SMT4. The load-balancer already does this. Hence allow PowerPc architecture to override the default cpu_smt_mask() to point to the SMT4 cores in a big_core mode. Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org> Cc: LKML <linux-kernel@vger.kernel.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michael Neuling <mikey@neuling.org> Cc: Gautham R Shenoy <ego@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Valentin Schneider <valentin.schneider@arm.com> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Vincent Guittot <vincent.guittot@linaro.org> Cc: Vaidyanathan Srinivasan <svaidy@linux.ibm.com> Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> --- include/linux/topology.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/topology.h b/include/linux/topology.h index 608fa4aadf0e..ad03df1cc266 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h @@ -198,7 +198,7 @@ static inline int cpu_to_mem(int cpu) #define topology_die_cpumask(cpu) cpumask_of(cpu) #endif -#ifdef CONFIG_SCHED_SMT +#if defined(CONFIG_SCHED_SMT) && !defined(cpu_smt_mask) static inline const struct cpumask *cpu_smt_mask(int cpu) { return topology_sibling_cpumask(cpu); -- 2.18.2
WARNING: multiple messages have this Message-ID (diff)
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com> To: Ingo Molnar <mingo@kernel.org>, Peter Zijlstra <peterz@infradead.org> Cc: Gautham R Shenoy <ego@linux.vnet.ibm.com>, Michael Neuling <mikey@neuling.org>, Vincent Guittot <vincent.guittot@linaro.org>, Srikar Dronamraju <srikar@linux.vnet.ibm.com>, Rik van Riel <riel@surriel.com>, linuxppc-dev <linuxppc-dev@lists.ozlabs.org>, LKML <linux-kernel@vger.kernel.org>, Dietmar Eggemann <dietmar.eggemann@arm.com>, Thomas Gleixner <tglx@linutronix.de>, Mel Gorman <mgorman@techsingularity.net>, Valentin Schneider <valentin.schneider@arm.com> Subject: [PATCH 1/2] sched/topology: Allow archs to override cpu_smt_mask Date: Tue, 4 Aug 2020 09:03:06 +0530 [thread overview] Message-ID: <20200804033307.76111-1-srikar@linux.vnet.ibm.com> (raw) cpu_smt_mask tracks topology_sibling_cpumask. This would be good for most architectures. One of the users of cpu_smt_mask(), would be to identify idle-cores. On Power9, a pair of cores can be presented by the firmware as a big-core for backward compatibility reasons. In order to maintain userspace backward compatibility with previous versions of processor, (since Power8 had SMT8 cores), Power9 onwards there is option to the firmware to advertise a pair of SMT4 cores as a fused cores (referred to as the big_core mode in the Linux Kernel). On Power9 this pair shares the L2 cache as well. However, from the scheduler's point of view, a core should be determined by SMT4. The load-balancer already does this. Hence allow PowerPc architecture to override the default cpu_smt_mask() to point to the SMT4 cores in a big_core mode. Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org> Cc: LKML <linux-kernel@vger.kernel.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michael Neuling <mikey@neuling.org> Cc: Gautham R Shenoy <ego@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Valentin Schneider <valentin.schneider@arm.com> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Vincent Guittot <vincent.guittot@linaro.org> Cc: Vaidyanathan Srinivasan <svaidy@linux.ibm.com> Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> --- include/linux/topology.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/topology.h b/include/linux/topology.h index 608fa4aadf0e..ad03df1cc266 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h @@ -198,7 +198,7 @@ static inline int cpu_to_mem(int cpu) #define topology_die_cpumask(cpu) cpumask_of(cpu) #endif -#ifdef CONFIG_SCHED_SMT +#if defined(CONFIG_SCHED_SMT) && !defined(cpu_smt_mask) static inline const struct cpumask *cpu_smt_mask(int cpu) { return topology_sibling_cpumask(cpu); -- 2.18.2
next reply other threads:[~2020-08-04 3:33 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-04 3:33 Srikar Dronamraju [this message] 2020-08-04 3:33 ` [PATCH 1/2] sched/topology: Allow archs to override cpu_smt_mask Srikar Dronamraju 2020-08-04 3:33 ` [PATCH 2/2] powerpc/topology: Override cpu_smt_mask Srikar Dronamraju 2020-08-04 3:33 ` Srikar Dronamraju 2020-08-04 10:46 ` peterz 2020-08-04 10:46 ` peterz 2020-08-04 11:02 ` Valentin Schneider 2020-08-04 11:02 ` Valentin Schneider 2020-08-04 10:45 ` [PATCH 1/2] sched/topology: Allow archs to override cpu_smt_mask peterz 2020-08-04 10:45 ` peterz 2020-08-04 12:10 ` Srikar Dronamraju 2020-08-04 12:10 ` Srikar Dronamraju 2020-08-04 12:47 ` peterz 2020-08-04 12:47 ` peterz 2020-08-06 5:32 ` Michael Ellerman 2020-08-06 5:32 ` Michael Ellerman 2020-08-06 8:54 ` peterz 2020-08-06 8:54 ` peterz 2020-08-06 12:25 ` Michael Ellerman 2020-08-06 12:25 ` Michael Ellerman 2020-08-06 13:15 ` peterz 2020-08-06 13:15 ` peterz 2020-08-06 14:09 ` Srikar Dronamraju 2020-08-06 14:09 ` Srikar Dronamraju 2020-08-06 12:53 ` Srikar Dronamraju 2020-08-06 12:53 ` 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=20200804033307.76111-1-srikar@linux.vnet.ibm.com \ --to=srikar@linux.vnet.ibm.com \ --cc=dietmar.eggemann@arm.com \ --cc=ego@linux.vnet.ibm.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=mgorman@techsingularity.net \ --cc=mikey@neuling.org \ --cc=mingo@kernel.org \ --cc=mpe@ellerman.id.au \ --cc=peterz@infradead.org \ --cc=riel@surriel.com \ --cc=svaidy@linux.ibm.com \ --cc=tglx@linutronix.de \ --cc=valentin.schneider@arm.com \ --cc=vincent.guittot@linaro.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: linkBe 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.