All of lore.kernel.org
 help / color / mirror / Atom feed
From: yunhui cui <cuiyunhui@bytedance.com>
To: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: Qingfang Deng <dqfext@gmail.com>,
	aou@eecs.berkeley.edu, linux-kernel@vger.kernel.org,
	 linux-riscv@lists.infradead.org, palmer@dabbelt.com,
	paul.walmsley@sifive.com,  samuel.holland@sifive.com
Subject: Re: [External] Re: [PATCH] riscv: Improve sbi_ecall() code generation by reordering arguments
Date: Mon, 25 Mar 2024 11:59:43 +0800	[thread overview]
Message-ID: <CAEEQ3w=mXXTwxph+_ttBLQhvNb66bq9b6Wo-Ka35qpp+3iq2JQ@mail.gmail.com> (raw)
In-Reply-To: <CAHVXubisa6HQJDbj_GfjwhP1Y4as0DzrxsU0B7N6DSU6HZNaaw@mail.gmail.com>

Hi Alex,

On Mon, Mar 25, 2024 at 2:20 AM Alexandre Ghiti <alexghiti@rivosinc.com> wrote:
>
> Hi Qingfang,
>
> On Sat, Mar 23, 2024 at 7:26 AM Qingfang Deng <dqfext@gmail.com> wrote:
> >
> > Hi Alexandre,
> >
> > You can simply make sbi_ecall `__always_inline`, so the C function call
> > overhead can be fully avoided.
>
> I understand your point, though I don't think we need to mark
> sbi_ecall() as inline, it's not in any hot path so it's not worth it.
> This patch simply gets rid of a really useless overhead, but it does
> not visibly accelerate anything.
>
> I hope it makes sense,
>
> Thanks,
>
> Alex
>

The compiler will have inline size restrictions, so I agree with the
modification of this patch instead of inline.
Please refer to:
https://github.com/gcc-mirror/gcc/blob/master/gcc/common.opt,
"finline-limit-"

So:
Reviewed-by: Yunhui Cui <cuiyunhui@bytedance.com>

Thanks,
Yunhui

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

WARNING: multiple messages have this Message-ID (diff)
From: yunhui cui <cuiyunhui@bytedance.com>
To: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: Qingfang Deng <dqfext@gmail.com>,
	aou@eecs.berkeley.edu, linux-kernel@vger.kernel.org,
	 linux-riscv@lists.infradead.org, palmer@dabbelt.com,
	paul.walmsley@sifive.com,  samuel.holland@sifive.com
Subject: Re: [External] Re: [PATCH] riscv: Improve sbi_ecall() code generation by reordering arguments
Date: Mon, 25 Mar 2024 11:59:43 +0800	[thread overview]
Message-ID: <CAEEQ3w=mXXTwxph+_ttBLQhvNb66bq9b6Wo-Ka35qpp+3iq2JQ@mail.gmail.com> (raw)
In-Reply-To: <CAHVXubisa6HQJDbj_GfjwhP1Y4as0DzrxsU0B7N6DSU6HZNaaw@mail.gmail.com>

Hi Alex,

On Mon, Mar 25, 2024 at 2:20 AM Alexandre Ghiti <alexghiti@rivosinc.com> wrote:
>
> Hi Qingfang,
>
> On Sat, Mar 23, 2024 at 7:26 AM Qingfang Deng <dqfext@gmail.com> wrote:
> >
> > Hi Alexandre,
> >
> > You can simply make sbi_ecall `__always_inline`, so the C function call
> > overhead can be fully avoided.
>
> I understand your point, though I don't think we need to mark
> sbi_ecall() as inline, it's not in any hot path so it's not worth it.
> This patch simply gets rid of a really useless overhead, but it does
> not visibly accelerate anything.
>
> I hope it makes sense,
>
> Thanks,
>
> Alex
>

The compiler will have inline size restrictions, so I agree with the
modification of this patch instead of inline.
Please refer to:
https://github.com/gcc-mirror/gcc/blob/master/gcc/common.opt,
"finline-limit-"

So:
Reviewed-by: Yunhui Cui <cuiyunhui@bytedance.com>

Thanks,
Yunhui

  reply	other threads:[~2024-03-25  4:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 11:26 [PATCH] riscv: Improve sbi_ecall() code generation by reordering arguments Alexandre Ghiti
2024-03-22 11:26 ` Alexandre Ghiti
2024-03-22 18:57 ` Atish Patra
2024-03-22 18:57   ` Atish Patra
2024-03-23  6:26 ` Qingfang Deng
2024-03-23  6:26   ` Qingfang Deng
2024-03-24 18:19   ` Alexandre Ghiti
2024-03-24 18:19     ` Alexandre Ghiti
2024-03-25  3:59     ` yunhui cui [this message]
2024-03-25  3:59       ` [External] " yunhui cui

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='CAEEQ3w=mXXTwxph+_ttBLQhvNb66bq9b6Wo-Ka35qpp+3iq2JQ@mail.gmail.com' \
    --to=cuiyunhui@bytedance.com \
    --cc=alexghiti@rivosinc.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=dqfext@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=samuel.holland@sifive.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.