linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: Kconfig: make SCHED_MC and SCHED_SMT depend on SMP
@ 2016-04-14  0:54 Yang Shi
  2016-04-14  8:47 ` Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Yang Shi @ 2016-04-14  0:54 UTC (permalink / raw)
  To: will.deacon, catalin.marinas
  Cc: linux-kernel, linux-arm-kernel, linaro-kernel, yang.shi

SCHED_MC and SCHED_SMT are pointless when SMP is disabled.
Although SMP is rarely disabled for ARM64, it looks more consistent to have
such depend in Kconfig.

Signed-off-by: Yang Shi <yang.shi@linaro.org>
---
 arch/arm64/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 4f43622..e5de825 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -521,6 +521,7 @@ config CPU_BIG_ENDIAN
 
 config SCHED_MC
 	bool "Multi-core scheduler support"
+	depends on SMP
 	help
 	  Multi-core scheduler support improves the CPU scheduler's decision
 	  making when dealing with multi-core CPU chips at a cost of slightly
@@ -528,6 +529,7 @@ config SCHED_MC
 
 config SCHED_SMT
 	bool "SMT scheduler support"
+	depends on SMP
 	help
 	  Improves the CPU scheduler's decision making when dealing with
 	  MultiThreading at a cost of slightly increased overhead in some
-- 
2.0.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: Kconfig: make SCHED_MC and SCHED_SMT depend on SMP
  2016-04-14  0:54 [PATCH] arm64: Kconfig: make SCHED_MC and SCHED_SMT depend on SMP Yang Shi
@ 2016-04-14  8:47 ` Will Deacon
  2016-04-14 16:33   ` Shi, Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2016-04-14  8:47 UTC (permalink / raw)
  To: Yang Shi; +Cc: catalin.marinas, linux-kernel, linux-arm-kernel, linaro-kernel

On Wed, Apr 13, 2016 at 05:54:12PM -0700, Yang Shi wrote:
> SCHED_MC and SCHED_SMT are pointless when SMP is disabled.
> Although SMP is rarely disabled for ARM64, it looks more consistent to have
> such depend in Kconfig.

You can't disable CONFIG_SMP for arm64 -- we select it unconditionally
in the kconfig.

Will

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: Kconfig: make SCHED_MC and SCHED_SMT depend on SMP
  2016-04-14  8:47 ` Will Deacon
@ 2016-04-14 16:33   ` Shi, Yang
  2016-04-14 16:35     ` Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Shi, Yang @ 2016-04-14 16:33 UTC (permalink / raw)
  To: Will Deacon
  Cc: catalin.marinas, linux-kernel, linux-arm-kernel, linaro-kernel

On 4/14/2016 1:47 AM, Will Deacon wrote:
> On Wed, Apr 13, 2016 at 05:54:12PM -0700, Yang Shi wrote:
>> SCHED_MC and SCHED_SMT are pointless when SMP is disabled.
>> Although SMP is rarely disabled for ARM64, it looks more consistent to have
>> such depend in Kconfig.
>
> You can't disable CONFIG_SMP for arm64 -- we select it unconditionally
> in the kconfig.

Thanks Will. I didn't realize ARM64 has SMP selected unconditionally, it 
looks the patch is pointless.

A follow-up question, I know ARM64 has no UP implementation now, it 
sounds make sense to have SMP select unconditionally, however, it might 
be more flexible to have SMP like x86 and other architectures. And, it 
may also help to find more bugs when !SMP.

Thanks,
Yang

>
> Will
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: Kconfig: make SCHED_MC and SCHED_SMT depend on SMP
  2016-04-14 16:33   ` Shi, Yang
@ 2016-04-14 16:35     ` Will Deacon
  0 siblings, 0 replies; 4+ messages in thread
From: Will Deacon @ 2016-04-14 16:35 UTC (permalink / raw)
  To: Shi, Yang; +Cc: catalin.marinas, linux-kernel, linux-arm-kernel, linaro-kernel

On Thu, Apr 14, 2016 at 09:33:07AM -0700, Shi, Yang wrote:
> On 4/14/2016 1:47 AM, Will Deacon wrote:
> >On Wed, Apr 13, 2016 at 05:54:12PM -0700, Yang Shi wrote:
> >>SCHED_MC and SCHED_SMT are pointless when SMP is disabled.
> >>Although SMP is rarely disabled for ARM64, it looks more consistent to have
> >>such depend in Kconfig.
> >
> >You can't disable CONFIG_SMP for arm64 -- we select it unconditionally
> >in the kconfig.
> 
> Thanks Will. I didn't realize ARM64 has SMP selected unconditionally, it
> looks the patch is pointless.
> 
> A follow-up question, I know ARM64 has no UP implementation now, it sounds
> make sense to have SMP select unconditionally, however, it might be more
> flexible to have SMP like x86 and other architectures. And, it may also help
> to find more bugs when !SMP.

Well, an SMP kernel would still work on a UP implementation, so I don't
really see the point in carrying a whole load of barely tested #ifdef
code. Top that off with the fact that we still need shareable memory for
coherent DMA and we still need barrier instructions for the page table
walker, and it's really diminishing returns.

Will

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-14 16:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14  0:54 [PATCH] arm64: Kconfig: make SCHED_MC and SCHED_SMT depend on SMP Yang Shi
2016-04-14  8:47 ` Will Deacon
2016-04-14 16:33   ` Shi, Yang
2016-04-14 16:35     ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).