Re: [PATCH v7 7/7] Add Propeller configuration for kernel build

2024-12-12 Thread Rong Xu
We will take a look at this issue and get back to you. Thanks for reporting this. Best Regards, -Rong On Thu, Dec 12, 2024 at 1:34 PM Nathan Chancellor wrote: > > On Thu, Dec 12, 2024 at 01:20:46PM -0800, Yonghong Song wrote: > ... > > > +5) Use the create_llvm_prof tool (https://github.com/goo

Re: [PATCH v2] arm64: Allow CONFIG_AUTOFDO_CLANG to be selected

2024-12-09 Thread Rong Xu
Enabling an AutoFDO build requires users to explicitly set CONFIG_AUTOFDO_CLANG. The support code is in Commit 315ad8780a129e82 (kbuild: Add AutoFDO support for Clang build). The CONFIG_AUTOFDO_CLANG config, even if selected by the user, will not be enabled unless ARCH_SUPPORTS_AUTOFDO_CLANG is pr

Re: [PATCH v2] arm64: Allow CONFIG_AUTOFDO_CLANG to be selected

2024-11-18 Thread Rong Xu
This patch looks good to me. I assume the profile format change in the Android doc will be submitted soon. Since "extbinary" is a superset of "binary", using the "extbinary" format profile in Android shouldn't cause any compatibility issues. Reviewed-by: Rong

Re: [PATCH] arm64: Allow CONFIG_AUTOFDO_CLANG to be selected

2024-11-14 Thread Rong Xu
Hi Yabin, Thanks for working to enable this on ARM64 and test the performance on Android! Please see my comments below. Thanks, -Rong On Thu, Nov 14, 2024 at 9:11 PM Yabin Cui wrote: > > Select ARCH_SUPPORTS_AUTOFDO_CLANG to allow AUTOFDO_CLANG to be > selected. > > On ARM64, ETM traces can be

Re: [PATCH v6 3/7] Adjust symbol ordering in text output section

2024-11-12 Thread Rong Xu
I sent the following patch for review: https://lkml.org/lkml/2024/11/12/1565 Thanks! -Rong On Mon, Nov 11, 2024 at 11:45 PM Klara Modin wrote: > > On 2024-11-12 06:38, Rong Xu wrote: > > I compared the System.map files from Klara Modin. The linker script is > > doi

Re: [PATCH v6 3/7] Adjust symbol ordering in text output section

2024-11-11 Thread Rong Xu
e fix, I will send the patch for review. Thanks, -Rong On Mon, Nov 11, 2024 at 2:39 PM Rong Xu wrote: > > In the new System.map, we have: > 81112400 T _stext > > This looks wrong. It should point to the beginning of the text, like > 81100400 T _stext > > I

Re: [PATCH v6 3/7] Adjust symbol ordering in text output section

2024-11-11 Thread Rong Xu
In the new System.map, we have: 81112400 T _stext This looks wrong. It should point to the beginning of the text, like 81100400 T _stext I'll do some debugging on this. -Rong On Mon, Nov 11, 2024 at 1:32 PM Klara Modin wrote: > > On 2024-11-11 21:43, Rong Xu wrote:

Re: [PATCH v6 3/7] Adjust symbol ordering in text output section

2024-11-11 Thread Rong Xu
the patch Best regards, -Rong On Sat, Nov 9, 2024 at 7:39 AM Klara Modin wrote: > > Hi, > > On 2024-10-26 07:14, Rong Xu wrote: > > When the -ffunction-sections compiler option is enabled, each function > > is placed in a separate section named .text.function_name rather tha

Re: [PATCH v7 7/7] Add Propeller configuration for kernel build

2024-11-07 Thread Rong Xu
Rong, > > On Sat, Nov 02, 2024 at 10:51:14AM -0700, Rong Xu wrote: > > diff --git a/scripts/Makefile.propeller b/scripts/Makefile.propeller > > new file mode 100644 > > index 0..344190717e471 > > --- /dev/null > > +++ b/scripts/Makefile.

Re: [PATCH v7 0/7] Add AutoFDO and Propeller support for Clang build

2024-11-07 Thread Rong Xu
Thanks for the explanation. On Thu, Nov 7, 2024 at 6:58 AM Masahiro Yamada wrote: > > On Thu, Nov 7, 2024 at 4:00 AM Rong Xu wrote: > > > > On Wed, Nov 6, 2024 at 8:09 AM Masahiro Yamada wrote: > > > > > > On Sun, Nov 3, 2024 at 2:51 AM Rong Xu wrote: >

Re: [PATCH v7 0/7] Add AutoFDO and Propeller support for Clang build

2024-11-06 Thread Rong Xu
On Wed, Nov 6, 2024 at 8:09 AM Masahiro Yamada wrote: > > On Sun, Nov 3, 2024 at 2:51 AM Rong Xu wrote: > > > > Hi, > > > > This patch series is to integrate AutoFDO and Propeller support into > > the Linux kernel. AutoFDO is a profile-guided optimization t

Re: [PATCH v7 1/7] Add AutoFDO support for Clang build

2024-11-05 Thread Rong Xu
> >> reproducible there. > >> > >> Thanks for your time! I dont see this as blocker. 🙂 > >> It gets time to get this series merged :P > >> > >> Best regards, > >> > >> Peter > >> > >> > >> > >> On 0

Re: [PATCH v7 1/7] Add AutoFDO support for Clang build

2024-11-04 Thread Rong Xu
es series > > >3. changed the "config" to turn on clang autofdo > > >4. collected afdo profiles > > >5. MAKEFLAGS="-j48 V=1 LLVM=1 CLANG_AUTOFDO_PROFILE=$(pwd)/perf.afdo" \ > > > makepkg -s --skipinteg --skippgp > > &g

[PATCH v7 7/7] Add Propeller configuration for kernel build

2024-11-02 Thread Rong Xu
FIG_PROPELLER_CLANG=y and $ make LLVM=1 CLANG_AUTOFDO_PROFILE= \ CLANG_PROPELLER_PROFILE_PREFIX= Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Suggested-by: Nick Desaulniers Suggested-by: Stephane Eranian Tested-b

[PATCH v7 5/7] AutoFDO: Enable -ffunction-sections for the AutoFDO build

2024-11-02 Thread Rong Xu
to reorganize functions for improved utilization of iCache and iTLB. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Tested-by: Yonghong Song Tested-by: Yabin Cui Tested-by: Nathan Chancellor Reviewed-by: Kees Cook --- include/asm

[PATCH v7 6/7] AutoFDO: Enable machine function split optimization for AutoFDO

2024-11-02 Thread Rong Xu
and iTLB utilization. MFS requires a profile so this is enabled only for the AutoFDO builds. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Tested-by: Yonghong Song Tested-by: Yabin Cui Tested-by

[PATCH v7 4/7] Add markers for text_unlikely and text_hot sections

2024-11-02 Thread Rong Xu
-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Tested-by: Yonghong Song Tested-by: Yabin Cui Tested-by: Nathan Chancellor Reviewed-by: Kees Cook --- include/asm-generic/vmlinux.lds.h | 14 -- 1 file changed, 12 insertions(+), 2

[PATCH v7 3/7] Adjust symbol ordering in text output section

2024-11-02 Thread Rong Xu
ing complex patterns, this significantly complicates the pattern and increases the likelihood of errors. This patch also changes vmlinux.lds.S for the sparc64 architecture to accommodate specific symbol placement requirements. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: R

[PATCH v7 2/7] objtool: Fix unreachable instruction warnings for weak functions

2024-11-02 Thread Rong Xu
to compute the hole if hole.sym is empty. If there is no symbol in the section, the first node will be NULL, in which case, -1 is returned to skip the whole section. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof P

[PATCH v7 1/7] Add AutoFDO support for Clang build

2024-11-02 Thread Rong Xu
CONFIG_AUTOFDO_CLANG needs to be enabled): $ make LLVM=1 CLANG_AUTOFDO_PROFILE= Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Suggested-by: Nick Desaulniers Suggested-by: Stephane Eranian Tested-by: Yongho

[PATCH v7 0/7] Add AutoFDO and Propeller support for Clang build

2024-11-02 Thread Rong Xu
n services, please refer to the LLVM discourse post: https://discourse.llvm.org/t/optimizing-the-linux-kernel-with-autofdo-including-thinlto-and-propeller/79108 Thanks, Rong Xu and Han Shen --- Change-Logs in V2: Rebased to commit e32cde8d2bd7 ("Merge tag 'sched_ext-for-6.12

Re: [PATCH v5 1/7] Add AutoFDO support for Clang build

2024-11-01 Thread Rong Xu
On Fri, Nov 1, 2024 at 11:02 AM Masahiro Yamada wrote: > > On Thu, Oct 24, 2024 at 7:44 AM Rong Xu wrote: > > > > Add the build support for using Clang's AutoFDO. Building the kernel > > with AutoFDO does not reduce the optimization level from the > > compiler

Re: [PATCH v6 3/7] Adjust symbol ordering in text output section

2024-11-01 Thread Rong Xu
Sat, Oct 26, 2024 at 7:14 AM Rong Xu wrote: > > > > When the -ffunction-sections compiler option is enabled, each function > > is placed in a separate section named .text.function_name rather than > > putting all functions in a single .text section. > > > > Howev

Re: [PATCH v6 2/7] objtool: Fix unreachable instruction warnings for weak functions

2024-10-28 Thread Rong Xu
nings from objtool. -Rong On Mon, Oct 28, 2024 at 5:19 PM H. Peter Anvin wrote: > > On 10/28/24 17:16, Kees Cook wrote: > > On Fri, Oct 25, 2024 at 10:14:04PM -0700, Rong Xu wrote: > >> In the presence of both weak and strong function definitions, the > >> linker dr

[PATCH v6 7/7] Add Propeller configuration for kernel build

2024-10-25 Thread Rong Xu
FIG_PROPELLER_CLANG=y and $ make LLVM=1 CLANG_AUTOFDO_PROFILE= \ CLANG_PROPELLER_PROFILE_PREFIX= Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Suggested-by: Nick Desaulniers Suggested-by: Stephane Eranian Test

[PATCH v6 6/7] AutoFDO: Enable machine function split optimization for AutoFDO

2024-10-25 Thread Rong Xu
and iTLB utilization. MFS requires a profile so this is enabled only for the AutoFDO builds. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Tested-by: Yonghong Song Tested-by: Yabin Cui Change-Id

[PATCH v6 5/7] AutoFDO: Enable -ffunction-sections for the AutoFDO build

2024-10-25 Thread Rong Xu
to reorganize functions for improved utilization of iCache and iTLB. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Tested-by: Yonghong Song Tested-by: Yabin Cui Change-Id: I6dc9150c46983a576f4d4f1415dbdcab78a48021 --- include/asm

[PATCH v6 4/7] Add markers for text_unlikely and text_hot sections

2024-10-25 Thread Rong Xu
-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Tested-by: Yonghong Song Tested-by: Yabin Cui Change-Id: Ie7688587adf89a14661ceca108680903b546d5d9 --- include/asm-generic/vmlinux.lds.h | 14 -- 1 file changed, 12 insertions(+), 2

[PATCH v6 2/7] objtool: Fix unreachable instruction warnings for weak functions

2024-10-25 Thread Rong Xu
to compute the hole if hole.sym is empty. If there is no symbol in the section, the first node will be NULL, in which case, -1 is returned to skip the whole section. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof P

[PATCH v6 3/7] Adjust symbol ordering in text output section

2024-10-25 Thread Rong Xu
attern and increases the likelihood of errors. This patch also changes vmlinux.lds.S for the sparc64 architecture to accommodate specific symbol placement requirements. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzyszto

[PATCH v6 0/7] Add AutoFDO and Propeller support for Clang build

2024-10-25 Thread Rong Xu
n services, please refer to the LLVM discourse post: https://discourse.llvm.org/t/optimizing-the-linux-kernel-with-autofdo-including-thinlto-and-propeller/79108 Thanks, Rong Xu and Han Shen Change-Logs in V2: Rebased to commit e32cde8d2bd7 ("Merge tag 'sched_ext-for-6.12-rc1-fixes-1'

[PATCH v6 1/7] Add AutoFDO support for Clang build

2024-10-25 Thread Rong Xu
CONFIG_AUTOFDO_CLANG needs to be enabled): $ make LLVM=1 CLANG_AUTOFDO_PROFILE= Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Suggested-by: Nick Desaulniers Suggested-by: Stephane Eranian Tested-by: Yongho

[PATCH v5 1/7] Add AutoFDO support for Clang build

2024-10-23 Thread Rong Xu
CONFIG_AUTOFDO_CLANG needs to be enabled): $ make LLVM=1 CLANG_AUTOFDO_PROFILE= Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Suggested-by: Nick Desaulniers Suggested-by: Stephane Eranian Tested-by: Yon

[PATCH v5 7/7] Add Propeller configuration for kernel build

2024-10-23 Thread Rong Xu
FIG_PROPELLER_CLANG=y and $ make LLVM=1 CLANG_AUTOFDO_PROFILE= \ CLANG_PROPELLER_PROFILE_PREFIX= Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Suggested-by: Nick Desaulniers Suggested-by: Stephane Eranian Test

[PATCH v5 6/7] AutoFDO: Enable machine function split optimization for AutoFDO

2024-10-23 Thread Rong Xu
and iTLB utilization. MFS requires a profile so this is enabled only for the AutoFDO builds. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Tested-by: Yonghong Song --- include/asm-generic

[PATCH v5 5/7] AutoFDO: Enable -ffunction-sections for the AutoFDO build

2024-10-23 Thread Rong Xu
to reorganize functions for improved utilization of iCache and iTLB. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Tested-by: Yonghong Song --- include/asm-generic/vmlinux.lds.h | 11 +-- scripts/Makefile.autofdo | 2

[PATCH v5 4/7] Add markers for text_unlikely and text_hot sections

2024-10-23 Thread Rong Xu
-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Tested-by: Yonghong Song --- include/asm-generic/vmlinux.lds.h | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm

[PATCH v5 3/7] Change the symbols order when --ffunction-sections is enabled

2024-10-23 Thread Rong Xu
attern and increases the likelihood of errors. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Tested-by: Yonghong Song --- include/asm-generic/vmlinux.lds.h | 19 --- 1 file changed,

[PATCH v5 2/7] objtool: Fix unreachable instruction warnings for weak functions

2024-10-23 Thread Rong Xu
to compute the hole if hole.sym is empty. If there is no symbol in the section, the first node will be NULL, in which case, -1 is returned to skip the whole section. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof P

[PATCH v5 0/7] Add AutoFDO and Propeller support for Clang build

2024-10-23 Thread Rong Xu
eta's production services, please refer to the LLVM discourse post: https://discourse.llvm.org/t/optimizing-the-linux-kernel-with-autofdo-including-thinlto-and-propeller/79108 Thanks, Rong Xu and Han Shen Change-Logs in V2: Rebased to commit e32cde8d2bd7 ("Merge tag 'sched_ext-for-

Re: [PATCH v4 5/6] AutoFDO: Enable machine function split optimization for AutoFDO

2024-10-23 Thread Rong Xu
On Tue, Oct 22, 2024 at 11:50 PM Masahiro Yamada wrote: > > On Tue, Oct 22, 2024 at 8:28 AM Rong Xu wrote: > > > > On Sun, Oct 20, 2024 at 8:18 PM Masahiro Yamada > > wrote: > > > > > > On Tue, Oct 15, 2024 at 6:33 AM Rong Xu wrote: > &g

Re: [PATCH v4 6/6] Add Propeller configuration for kernel build.

2024-10-23 Thread Rong Xu
s better here. -Rong On Wed, Oct 23, 2024 at 12:29 AM Masahiro Yamada wrote: > > On Wed, Oct 23, 2024 at 4:25 PM Arnd Bergmann wrote: > > > > On Wed, Oct 23, 2024, at 07:06, Masahiro Yamada wrote: > > > On Tue, Oct 22, 2024 at 9:00 AM Rong Xu wrote: > > > &

Re: [PATCH v4 6/6] Add Propeller configuration for kernel build.

2024-10-21 Thread Rong Xu
On Sun, Oct 20, 2024 at 10:49 AM Masahiro Yamada wrote: > > Please remove the period at the end of the commit subject. Will fix this. > > > > On Tue, Oct 15, 2024 at 6:34 AM Rong Xu wrote: > > > > Add the build support for using Clang's Propeller optimize

Re: [PATCH v4 3/6] Change the symbols order when --ffuntion-sections is enabled

2024-10-21 Thread Rong Xu
On Sun, Oct 20, 2024 at 7:15 PM Masahiro Yamada wrote: > > On Tue, Oct 15, 2024 at 6:33 AM Rong Xu wrote: > > > > When the -ffunction-sections compiler option is enabled, each function > > is placed in a separate section named .text.function_name rather than > > put

Re: [PATCH v4 4/6] AutoFDO: Enable -ffunction-sections for the AutoFDO build

2024-10-21 Thread Rong Xu
The answers are the same as the reply in [PATCH v4 5/6] On Sun, Oct 20, 2024 at 7:26 PM Masahiro Yamada wrote: > > On Tue, Oct 15, 2024 at 6:33 AM Rong Xu wrote: > > > > Enable -ffunction-sections by default for the AutoFDO build. > > > > With -ffunction-sect

Re: [PATCH v4 5/6] AutoFDO: Enable machine function split optimization for AutoFDO

2024-10-21 Thread Rong Xu
On Sun, Oct 20, 2024 at 8:18 PM Masahiro Yamada wrote: > > On Tue, Oct 15, 2024 at 6:33 AM Rong Xu wrote: > > > > Enable the machine function split optimization for AutoFDO in Clang. > > > > Machine function split (MFS) is a pass in the Clang compiler that > >

Re: [PATCH v4 1/6] Add AutoFDO support for Clang build

2024-10-21 Thread Rong Xu
Thanks for the detailed suggestions! My comments are inlined below. Best regards, -Rong On Sun, Oct 20, 2024 at 9:33 AM Masahiro Yamada wrote: > > On Tue, Oct 15, 2024 at 6:33 AM Rong Xu wrote: > > > > +Customization > > += > > + > > +You can

Re: [PATCH v4 0/6] Add AutoFDO and Propeller support for Clang build

2024-10-21 Thread Rong Xu
On Sat, Oct 19, 2024 at 8:25 PM Nathan Chancellor wrote: > > Hi Rong, > > On Fri, Oct 18, 2024 at 11:20:02PM -0700, Rong Xu wrote: > > Thanks to all for the feedback and suggestions! We are ready to make any > > further > > changes needed. Is there anything else

Re: [PATCH v4 0/6] Add AutoFDO and Propeller support for Clang build

2024-10-18 Thread Rong Xu
7;d really appreciate your input here. Any confirmation that it works as expected would be very helpful. -Rong On Mon, Oct 14, 2024 at 2:33 PM Rong Xu wrote: > > Hi, > > This patch series is to integrate AutoFDO and Propeller support into > the Linux kernel. AutoFDO is a profile-guid

[PATCH v4 6/6] Add Propeller configuration for kernel build.

2024-10-14 Thread Rong Xu
the AutoFDO and Propeller profile files. CONFIG_AUTOFDO_CLANG=y CONFIG_PROPELLER_CLANG=y and $ make LLVM=1 CLANG_AUTOFDO_PROFILE= \ CLANG_PROPELLER_PROFILE_PREFIX= Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysz

[PATCH v4 5/6] AutoFDO: Enable machine function split optimization for AutoFDO

2024-10-14 Thread Rong Xu
and iTLB utilization. MFS requires a profile so this is enabled only for the AutoFDO builds. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny --- include/asm-generic/vmlinux.lds.h | 6 ++ scripts

[PATCH v4 4/6] AutoFDO: Enable -ffunction-sections for the AutoFDO build

2024-10-14 Thread Rong Xu
to reorganize functions for improved utilization of iCache and iTLB. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam --- include/asm-generic/vmlinux.lds.h | 37 --- scripts/Makefile.autofdo | 2 +- 2

[PATCH v4 3/6] Change the symbols order when --ffuntion-sections is enabled

2024-10-14 Thread Rong Xu
rs. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny --- include/asm-generic/vmlinux.lds.h | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/vmlinux.

[PATCH v4 1/6] Add AutoFDO support for Clang build

2024-10-14 Thread Rong Xu
CLANG needs to be enabled): $ make LLVM=1 CLANG_AUTOFDO_PROFILE= Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Suggested-by: Nick Desaulniers Suggested-by: Stephane Eranian --- D

[PATCH v4 2/6] objtool: Fix unreachable instruction warnings for weak funcitons

2024-10-14 Thread Rong Xu
to compute the hole if hole.sym is empty. If there is no symbol in the section, the first node will be NULL, in which case, -1 is returned to skip the whole section. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by:

[PATCH v4 0/6] Add AutoFDO and Propeller support for Clang build

2024-10-14 Thread Rong Xu
-including-thinlto-and-propeller/79108 Thanks, Rong Xu and Han Shen Change-Logs in V2: Rebased the source to e32cde8d2bd7 (Merge tag 'sched_ext-for-6.12-rc1-fixes-1') 1. Cover-letter: moved the Propeller description to the top (Peter Zijlstra) 2. [P 1]: (1) Makefile: fixed file or

[PATCH v3 5/6] AutoFDO: Enable machine function split optimization for AutoFDO

2024-10-10 Thread Rong Xu
and iTLB utilization. MFS requires a profile so this is enabled only for the AutoFDO builds. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny --- include/asm-generic/vmlinux.lds.h | 6 ++ scripts

[PATCH v3 6/6] Add Propeller configuration for kernel build.

2024-10-10 Thread Rong Xu
the AutoFDO and Propeller profile files. CONFIG_AUTOFDO_CLANG=y CONFIG_PROPELLER_CLANG=y and $ make LLVM=1 CLANG_AUTOFDO_PROFILE= \ CLANG_PROPELLER_PROFILE_PREFIX= Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysz

[PATCH v3 4/6] AutoFDO: Enable -ffunction-sections for the AutoFDO build

2024-10-10 Thread Rong Xu
to reorganize functions for improved utilization of iCache and iTLB. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam --- include/asm-generic/vmlinux.lds.h | 37 --- scripts/Makefile.autofdo | 2 +- 2

[PATCH v3 3/6] Change the symbols order when --ffuntion-sections is enabled

2024-10-10 Thread Rong Xu
rs. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny --- include/asm-generic/vmlinux.lds.h | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/vmlinux.

[PATCH v3 2/6] objtool: Fix unreachable instruction warnings for weak funcitons

2024-10-10 Thread Rong Xu
to compute the hole if hole.sym is empty. If there is no symbol in the section, the first node will be NULL, in which case, -1 is returned to skip the whole section. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by:

[PATCH v3 1/6] Add AutoFDO support for Clang build

2024-10-10 Thread Rong Xu
CLANG needs to be enabled): $ make LLVM=1 CLANG_AUTOFDO_PROFILE= Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Suggested-by: Nick Desaulniers Suggested-by: Stephane Eranian --- D

[PATCH v3 0/6] Add AutoFDO and Propeller support for Clang build

2024-10-10 Thread Rong Xu
-including-thinlto-and-propeller/79108 Thanks, Rong Xu and Han Shen Change-Logs in V2: Rebased the source to e32cde8d2bd7 (Merge tag 'sched_ext-for-6.12-rc1-fixes-1') 1. Cover-letter: moved the Propeller description to the top (Peter Zijlstra) 2. [P 1]: (1) Makefile: fixed file or

Re: [PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-07 Thread Rong Xu
On Mon, Oct 7, 2024 at 11:33 AM Miguel Ojeda wrote: > > On Mon, Oct 7, 2024 at 8:04 PM Rong Xu wrote: > > > > I removed the "code-block" directives from the rst files, > > and used "::" suggested by Jonathan. The rst files themselves are now >

Re: [PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-07 Thread Rong Xu
I removed the "code-block" directives from the rst files, and used "::" suggested by Jonathan. The rst files themselves are now easier to read in vi. However, the rendered HTML output has some differences: (1) The text that was previously in code-block no longer indents. It aligns with the p

Re: [PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-04 Thread Rong Xu
On Fri, Oct 4, 2024 at 9:38 AM Mike Rapoport wrote: > > On Fri, Oct 04, 2024 at 09:28:36AM -0700, Rong Xu wrote: > > On Thu, Oct 3, 2024 at 11:09 PM Mike Rapoport wrote: > > > > > > On Thu, Oct 03, 2024 at 11:20:17AM -0700, Rong Xu wrote: > > > > Writ

Re: [PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-04 Thread Rong Xu
On Thu, Oct 3, 2024 at 11:09 PM Mike Rapoport wrote: > > On Thu, Oct 03, 2024 at 11:20:17AM -0700, Rong Xu wrote: > > Writing the doc with all these code-blocks was not fun either. > > We are happy to change if there is a better way for this. > > > > -Rong > >

Re: [PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-03 Thread Rong Xu
Writing the doc with all these code-blocks was not fun either. We are happy to change if there is a better way for this. -Rong On Thu, Oct 3, 2024 at 9:13 AM Peter Zijlstra wrote: > > On Thu, Oct 03, 2024 at 09:11:34AM -0700, Nick Desaulniers wrote: > > > > It makes it absolute crap for all of u

Re: [PATCH v2 3/6] Change the symbols order when --ffuntion-sections is enabled

2024-10-03 Thread Rong Xu
a wrote: > > On Wed, Oct 02, 2024 at 04:34:02PM -0700, Rong Xu wrote: > > When the -ffunction-sections compiler option is enabled, each function > > is placed in a separate section named .text.function_name rather than > > putting all functions in a single .text section. &

[PATCH v2 6/6] Add Propeller configuration for kernel build.

2024-10-02 Thread Rong Xu
the AutoFDO and Propeller profile files. CONFIG_AUTOFDO_CLANG=y CONFIG_PROPELLER_CLANG=y and $ make LLVM=1 CLANG_AUTOFDO_PROFILE= \ CLANG_PROPELLER_PROFILE_PREFIX= Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysz

[PATCH v2 5/6] AutoFDO: Enable machine function split optimization for AutoFDO

2024-10-02 Thread Rong Xu
and iTLB utilization. MFS requires a profile so this is enabled only for the AutoFDO builds. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny --- include/asm-generic/vmlinux.lds.h | 6 ++ scripts

[PATCH v2 4/6] AutoFDO: Enable -ffunction-sections for the AutoFDO build

2024-10-02 Thread Rong Xu
to reorganize functions for improved utilization of iCache and iTLB. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam --- include/asm-generic/vmlinux.lds.h | 37 --- scripts/Makefile.autofdo | 2 +- 2

[PATCH v2 3/6] Change the symbols order when --ffuntion-sections is enabled

2024-10-02 Thread Rong Xu
rs. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny --- include/asm-generic/vmlinux.lds.h | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/include/asm-generic/vmlinux.

[PATCH v2 2/6] objtool: Fix unreachable instruction warnings for weak funcitons

2024-10-02 Thread Rong Xu
to compute the hole if hole.sym is empty. If there is no symbol in the section, the first node will be NULL, in which case, -1 is returned to skip the whole section. Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by:

[PATCH v2 1/6] Add AutoFDO support for Clang build

2024-10-02 Thread Rong Xu
CLANG needs to be enabled): $ make LLVM=1 CLANG_AUTOFDO_PROFILE= Co-developed-by: Han Shen Signed-off-by: Han Shen Signed-off-by: Rong Xu Suggested-by: Sriraman Tallam Suggested-by: Krzysztof Pszeniczny Suggested-by: Nick Desaulniers Suggested-by: Stephane Eranian --- D

[PATCH v2 0/6] Add AutoFDO and Propeller support for Clang build

2024-10-02 Thread Rong Xu
-including-thinlto-and-propeller/79108 Thanks, Rong Xu and Han Shen Change-Logs in V2: Rebased the source to e32cde8d2bd7 (Merge tag 'sched_ext-for-6.12-rc1-fixes-1') 1. Cover-letter: moved the Propeller description to the top (Peter Zijlstra) 2. [P 1]: (1) Makefile: fixed file or