All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Palmer Dabbelt <palmer@dabbelt.com>
Cc: twd2.me@gmail.com, linux-riscv@lists.infradead.org,
	ndesaulniers@google.com, llvm@lists.linux.dev
Subject: Re: [PATCH v2] RISC-V: build: Allow LTO to be selected
Date: Fri, 28 Oct 2022 15:57:33 -0700	[thread overview]
Message-ID: <Y1xeXUhnONoB0S6P@dev-arch.thelio-3990X> (raw)
In-Reply-To: <mhng-e9b5bd39-0929-487c-a761-6a3ff508d969@palmer-ri-x1c9>

On Tue, Oct 04, 2022 at 06:57:10PM -0700, Palmer Dabbelt wrote:
> > Allow LTO to be selected for RISC-V, only when LLD >= 14, since there is an
> > issue [1] in prior LLD versions that prevents LLD to generate proper
> > machine code for RISC-V when writing `nop`s.
> > 
> > I have tested enabling LTO for `defconfig`. The LLD took ~2m21s and ~3GiB
> > on our Intel Xeon Gold 6140 server and produced an 18MiB Image. The image
> > can boot to shell using an archriscv rootfs on QEMU.
> > 
> > I have also tested it for `allyesconfig` without COMPILE_TEST, FTRACE,
> > KASAN, and GCOV. The LLD took ~7h03m and ~335GiB on the server,
> > successfully producing a 1.7GiB Image. Unfortunately, we cannot boot this
> > image because the `create_kernel_page_table()` -> `alloc_pmd_early()` ->
> > `BUG_ON()` logic limits the image to be < 1GiB. Maybe we can fix it in a
> > separate patch further.
> > 
> > [1] https://github.com/llvm/llvm-project/issues/50505, resolved by LLVM
> >     commit e63455d5e0e5 ("[MC] Use local MCSubtargetInfo in writeNops")
> > 
> > Tested-by: Wende Tan <twd2.me@gmail.com>
> > Signed-off-by: Wende Tan <twd2.me@gmail.com>
> 
> Sorry for missing this, the v2 never made it to my inbox.  Not sure exactly
> what happened, but an off-list ping made it through.  I've put this on
> for-next, I don't have any way to test it because I don't have clang setup
> yet.
> 

Did this get dropped by accident? I do not see it in your tree.

Cheers,
Nathan

WARNING: multiple messages have this Message-ID (diff)
From: Nathan Chancellor <nathan@kernel.org>
To: Palmer Dabbelt <palmer@dabbelt.com>
Cc: twd2.me@gmail.com, linux-riscv@lists.infradead.org,
	ndesaulniers@google.com, llvm@lists.linux.dev
Subject: Re: [PATCH v2] RISC-V: build: Allow LTO to be selected
Date: Fri, 28 Oct 2022 15:57:33 -0700	[thread overview]
Message-ID: <Y1xeXUhnONoB0S6P@dev-arch.thelio-3990X> (raw)
In-Reply-To: <mhng-e9b5bd39-0929-487c-a761-6a3ff508d969@palmer-ri-x1c9>

On Tue, Oct 04, 2022 at 06:57:10PM -0700, Palmer Dabbelt wrote:
> > Allow LTO to be selected for RISC-V, only when LLD >= 14, since there is an
> > issue [1] in prior LLD versions that prevents LLD to generate proper
> > machine code for RISC-V when writing `nop`s.
> > 
> > I have tested enabling LTO for `defconfig`. The LLD took ~2m21s and ~3GiB
> > on our Intel Xeon Gold 6140 server and produced an 18MiB Image. The image
> > can boot to shell using an archriscv rootfs on QEMU.
> > 
> > I have also tested it for `allyesconfig` without COMPILE_TEST, FTRACE,
> > KASAN, and GCOV. The LLD took ~7h03m and ~335GiB on the server,
> > successfully producing a 1.7GiB Image. Unfortunately, we cannot boot this
> > image because the `create_kernel_page_table()` -> `alloc_pmd_early()` ->
> > `BUG_ON()` logic limits the image to be < 1GiB. Maybe we can fix it in a
> > separate patch further.
> > 
> > [1] https://github.com/llvm/llvm-project/issues/50505, resolved by LLVM
> >     commit e63455d5e0e5 ("[MC] Use local MCSubtargetInfo in writeNops")
> > 
> > Tested-by: Wende Tan <twd2.me@gmail.com>
> > Signed-off-by: Wende Tan <twd2.me@gmail.com>
> 
> Sorry for missing this, the v2 never made it to my inbox.  Not sure exactly
> what happened, but an off-list ping made it through.  I've put this on
> for-next, I don't have any way to test it because I don't have clang setup
> yet.
> 

Did this get dropped by accident? I do not see it in your tree.

Cheers,
Nathan

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2022-10-28 22:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 20:55 [PATCH v2] RISC-V: build: Allow LTO to be selected Wende Tan
2022-05-12 20:55 ` Wende Tan
2022-05-12 21:34 ` Nick Desaulniers
2022-05-12 21:34   ` Nick Desaulniers
2022-05-13 18:28   ` twd2
2022-05-13 18:28     ` twd2
2022-05-13 18:58     ` Fāng-ruì Sòng
2022-05-13 18:58       ` Fāng-ruì Sòng
2022-05-13 19:30     ` Nick Desaulniers
2022-05-13 19:30       ` Nick Desaulniers
2022-05-13 19:31       ` Fāng-ruì Sòng
2022-05-13 19:31         ` Fāng-ruì Sòng
2022-07-01  4:42         ` twd2
2022-07-01  4:42           ` twd2
2022-10-05  1:57 ` Palmer Dabbelt
2022-10-05  1:57   ` Palmer Dabbelt
2022-10-05  2:19   ` Wende Tan
2022-10-05  2:19     ` Wende Tan
2022-10-28 22:57   ` Nathan Chancellor [this message]
2022-10-28 22:57     ` Nathan Chancellor

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=Y1xeXUhnONoB0S6P@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=ndesaulniers@google.com \
    --cc=palmer@dabbelt.com \
    --cc=twd2.me@gmail.com \
    /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.