public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: enable DEBUG_FORCE_FUNCTION_ALIGN_64B
@ 2023-07-27 16:03 Jisheng Zhang
  2023-07-29 10:34 ` Conor Dooley
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jisheng Zhang @ 2023-07-27 16:03 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou; +Cc: linux-kernel, linux-riscv

Allow to force all function address 64B aligned as it is possible for
other architectures. This may be useful when verify if performance
bump is caused by function alignment changes.

Before commit 1bf18da62106 ("lib/Kconfig.debug: add ARCH dependency
for FUNCTION_ALIGN option"), riscv supports enabling the
DEBUG_FORCE_FUNCTION_ALIGN_64B option, but after that commit, each
arch needs to claim the support explicitly. I tried the config file in
[1] for both RV64 and RV32, I can't reproduce the build error as [1],
there is no reason for not allowing to enforce this function alignment.

Link: https://lore.kernel.org/lkml/202202271612.W32UJAj2-lkp@intel.com/ [1]
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index fbc89baf7de6..39ffd218e960 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -502,7 +502,7 @@ config SECTION_MISMATCH_WARN_ONLY
 
 config DEBUG_FORCE_FUNCTION_ALIGN_64B
 	bool "Force all function address 64B aligned"
-	depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC || S390)
+	depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC || RISCV || S390)
 	select FUNCTION_ALIGNMENT_64B
 	help
 	  There are cases that a commit from one domain changes the function
-- 
2.40.1


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

* Re: [PATCH] riscv: enable DEBUG_FORCE_FUNCTION_ALIGN_64B
  2023-07-27 16:03 [PATCH] riscv: enable DEBUG_FORCE_FUNCTION_ALIGN_64B Jisheng Zhang
@ 2023-07-29 10:34 ` Conor Dooley
  2023-07-30 14:25   ` Jisheng Zhang
  2023-08-30 13:20 ` patchwork-bot+linux-riscv
  2023-08-30 13:24 ` Palmer Dabbelt
  2 siblings, 1 reply; 5+ messages in thread
From: Conor Dooley @ 2023-07-29 10:34 UTC (permalink / raw)
  To: Jisheng Zhang
  Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-kernel,
	linux-riscv

[-- Attachment #1: Type: text/plain, Size: 2212 bytes --]

Hey,

On Fri, Jul 28, 2023 at 12:03:56AM +0800, Jisheng Zhang wrote:
> Allow to force all function address 64B aligned as it is possible for
> other architectures. This may be useful when verify if performance
> bump is caused by function alignment changes.
> 
> Before commit 1bf18da62106 ("lib/Kconfig.debug: add ARCH dependency
> for FUNCTION_ALIGN option"), riscv supports enabling the
> DEBUG_FORCE_FUNCTION_ALIGN_64B option, but after that commit, each
> arch needs to claim the support explicitly. I tried the config file in
> [1] for both RV64 and RV32, I can't reproduce the build error as [1],
> there is no reason for not allowing to enforce this function alignment.
> 
> Link: https://lore.kernel.org/lkml/202202271612.W32UJAj2-lkp@intel.com/ [1]

This is a CSKY randconfig, is there any particular reason that running
that randconfig (over a year later) and on a different architecture
would trigger whatever the condition was?

The original commit here seems far too penal - why was it not just
disabled on CSKY??? I tried looking a bit on lore, but didn't see
anything explaining the subset of supported archs they picked.
I did see Guo Ren wondering if rv32 would be similarly problematic - but
since this is something likely to just trip up randconfigs, I think we
should go for it and if rv32 becomes a problem, restrict this to 64-bit.

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
>  lib/Kconfig.debug | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index fbc89baf7de6..39ffd218e960 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -502,7 +502,7 @@ config SECTION_MISMATCH_WARN_ONLY
>  
>  config DEBUG_FORCE_FUNCTION_ALIGN_64B
>  	bool "Force all function address 64B aligned"
> -	depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC || S390)
> +	depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC || RISCV || S390)
>  	select FUNCTION_ALIGNMENT_64B
>  	help
>  	  There are cases that a commit from one domain changes the function
> -- 
> 2.40.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH] riscv: enable DEBUG_FORCE_FUNCTION_ALIGN_64B
  2023-07-29 10:34 ` Conor Dooley
@ 2023-07-30 14:25   ` Jisheng Zhang
  0 siblings, 0 replies; 5+ messages in thread
From: Jisheng Zhang @ 2023-07-30 14:25 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-kernel,
	linux-riscv

On Sat, Jul 29, 2023 at 11:34:38AM +0100, Conor Dooley wrote:
> Hey,
> 
> On Fri, Jul 28, 2023 at 12:03:56AM +0800, Jisheng Zhang wrote:
> > Allow to force all function address 64B aligned as it is possible for
> > other architectures. This may be useful when verify if performance
> > bump is caused by function alignment changes.
> > 
> > Before commit 1bf18da62106 ("lib/Kconfig.debug: add ARCH dependency
> > for FUNCTION_ALIGN option"), riscv supports enabling the
> > DEBUG_FORCE_FUNCTION_ALIGN_64B option, but after that commit, each
> > arch needs to claim the support explicitly. I tried the config file in
> > [1] for both RV64 and RV32, I can't reproduce the build error as [1],
> > there is no reason for not allowing to enforce this function alignment.
> > 
> > Link: https://lore.kernel.org/lkml/202202271612.W32UJAj2-lkp@intel.com/ [1]
> 
> This is a CSKY randconfig, is there any particular reason that running
> that randconfig (over a year later) and on a different architecture
> would trigger whatever the condition was?

Just use the randconfig and then s/CSKY/RISCV to check whether RV32
and RV64 can reproduce the compile error ;)

> 
> The original commit here seems far too penal - why was it not just
> disabled on CSKY??? I tried looking a bit on lore, but didn't see
> anything explaining the subset of supported archs they picked.
> I did see Guo Ren wondering if rv32 would be similarly problematic - but
> since this is something likely to just trip up randconfigs, I think we
> should go for it and if rv32 becomes a problem, restrict this to 64-bit.
> 
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> 
> Thanks,
> Conor.
> 
> > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> > ---
> >  lib/Kconfig.debug | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> > index fbc89baf7de6..39ffd218e960 100644
> > --- a/lib/Kconfig.debug
> > +++ b/lib/Kconfig.debug
> > @@ -502,7 +502,7 @@ config SECTION_MISMATCH_WARN_ONLY
> >  
> >  config DEBUG_FORCE_FUNCTION_ALIGN_64B
> >  	bool "Force all function address 64B aligned"
> > -	depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC || S390)
> > +	depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC || RISCV || S390)
> >  	select FUNCTION_ALIGNMENT_64B
> >  	help
> >  	  There are cases that a commit from one domain changes the function
> > -- 
> > 2.40.1
> > 



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

* Re: [PATCH] riscv: enable DEBUG_FORCE_FUNCTION_ALIGN_64B
  2023-07-27 16:03 [PATCH] riscv: enable DEBUG_FORCE_FUNCTION_ALIGN_64B Jisheng Zhang
  2023-07-29 10:34 ` Conor Dooley
@ 2023-08-30 13:20 ` patchwork-bot+linux-riscv
  2023-08-30 13:24 ` Palmer Dabbelt
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+linux-riscv @ 2023-08-30 13:20 UTC (permalink / raw)
  To: Jisheng Zhang; +Cc: linux-riscv, paul.walmsley, palmer, aou, linux-kernel

Hello:

This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Fri, 28 Jul 2023 00:03:56 +0800 you wrote:
> Allow to force all function address 64B aligned as it is possible for
> other architectures. This may be useful when verify if performance
> bump is caused by function alignment changes.
> 
> Before commit 1bf18da62106 ("lib/Kconfig.debug: add ARCH dependency
> for FUNCTION_ALIGN option"), riscv supports enabling the
> DEBUG_FORCE_FUNCTION_ALIGN_64B option, but after that commit, each
> arch needs to claim the support explicitly. I tried the config file in
> [1] for both RV64 and RV32, I can't reproduce the build error as [1],
> there is no reason for not allowing to enforce this function alignment.
> 
> [...]

Here is the summary with links:
  - riscv: enable DEBUG_FORCE_FUNCTION_ALIGN_64B
    https://git.kernel.org/riscv/c/74f438e75483

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [PATCH] riscv: enable DEBUG_FORCE_FUNCTION_ALIGN_64B
  2023-07-27 16:03 [PATCH] riscv: enable DEBUG_FORCE_FUNCTION_ALIGN_64B Jisheng Zhang
  2023-07-29 10:34 ` Conor Dooley
  2023-08-30 13:20 ` patchwork-bot+linux-riscv
@ 2023-08-30 13:24 ` Palmer Dabbelt
  2 siblings, 0 replies; 5+ messages in thread
From: Palmer Dabbelt @ 2023-08-30 13:24 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Jisheng Zhang
  Cc: linux-kernel, linux-riscv


On Fri, 28 Jul 2023 00:03:56 +0800, Jisheng Zhang wrote:
> Allow to force all function address 64B aligned as it is possible for
> other architectures. This may be useful when verify if performance
> bump is caused by function alignment changes.
> 
> Before commit 1bf18da62106 ("lib/Kconfig.debug: add ARCH dependency
> for FUNCTION_ALIGN option"), riscv supports enabling the
> DEBUG_FORCE_FUNCTION_ALIGN_64B option, but after that commit, each
> arch needs to claim the support explicitly. I tried the config file in
> [1] for both RV64 and RV32, I can't reproduce the build error as [1],
> there is no reason for not allowing to enforce this function alignment.
> 
> [...]

Applied, thanks!

[1/1] riscv: enable DEBUG_FORCE_FUNCTION_ALIGN_64B
      https://git.kernel.org/palmer/c/74f438e75483

Best regards,
-- 
Palmer Dabbelt <palmer@rivosinc.com>


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

end of thread, other threads:[~2023-08-30 18:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-27 16:03 [PATCH] riscv: enable DEBUG_FORCE_FUNCTION_ALIGN_64B Jisheng Zhang
2023-07-29 10:34 ` Conor Dooley
2023-07-30 14:25   ` Jisheng Zhang
2023-08-30 13:20 ` patchwork-bot+linux-riscv
2023-08-30 13:24 ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox