From: Conor Dooley <conor.dooley@microchip.com>
To: Xu Lu <luxu.kernel@bytedance.com>
Cc: Conor Dooley <conor@kernel.org>, <paul.walmsley@sifive.com>,
<palmer@dabbelt.com>, <aou@eecs.berkeley.edu>,
<andy.chiu@sifive.com>, <guoren@kernel.org>,
<linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
<lihangjing@bytedance.com>, <dengliang.1214@bytedance.com>,
<xieyongji@bytedance.com>, <chaiwen.cc@bytedance.com>,
Andrew Jones <ajones@ventanamicro.com>
Subject: Re: [External] Re: [RFC 1/2] riscv: process: Introduce idle thread using Zawrs extension
Date: Mon, 22 Apr 2024 09:21:58 +0100 [thread overview]
Message-ID: <20240422-dropper-subplot-efaa833f3cf2@wendy> (raw)
In-Reply-To: <CAPYmKFsddST1n2ZU+5=c_yPqAKTjQ4X1mKVFMZbhfo8xiB+OTA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2041 bytes --]
On Fri, Apr 19, 2024 at 12:14:47AM +0800, Xu Lu wrote:
> On Thu, Apr 18, 2024 at 11:06 PM Conor Dooley <conor@kernel.org> wrote:
> > On Thu, Apr 18, 2024 at 07:49:41PM +0800, Xu Lu wrote:
> > > + The Zawrs extension defines a pair of instructions to be used
> > > + in polling loops that allows a core to enter a low-power state
> > > + and wait on a store to a memory location.
> > > +
> > > + If you don't know what to do here, say Y.
> > > +
> > > config TOOLCHAIN_HAS_V
> > > bool
> > > default y
> > > @@ -1075,6 +1090,15 @@ endmenu # "Power management options"
> > >
> > > menu "CPU Power Management"
> > >
> > > +config RISCV_ZAWRS_IDLE
> > > + bool "Idle thread using ZAWRS extensions"
> > > + depends on RISCV_ISA_ZAWRS
> > > + default y
> > > + help
> > > + Adds support to implement idle thread using ZAWRS extension.
> > > +
> > > + If you don't know what to do here, say Y.
> >
> > I don't think this second option is needed, why would we not always want
> > to use the Zawrs version of this when it is available? Can we do it
> > unconditionally when RISCV_ISA_ZAWRS is set and the extension is
> > detected at runtime?
> >
> > Cheers,
> > Conor.
>
> Indeed, we can always choose WRS.NTO when entering idle.
>
> This config is introduced for the second commit in this patch series.
> In the second commit, we detect whether the target cpu is idle when
> sending IPI and write IPI info to the reserve set of idle cpu so as to
> avoid sending a physical IPI. Besides, the target idle cpu need not to
> go through traditional interrupt handling routine. However, if all
> cpus are busy and hardly enter idle, this commit may introduce
> performance overhead of extra instructions when sending IPI. Thus we
> introduce this config just in case.
Could you add the downsides into the help text of the config option so
that people can understand why to enable/disable the option?
Thanks,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-04-22 8:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 11:49 [RFC 0/2] riscv: Idle thread using Zawrs extension Xu Lu
2024-04-18 11:49 ` [RFC 1/2] riscv: process: Introduce idle " Xu Lu
2024-04-18 15:05 ` Conor Dooley
2024-04-18 16:14 ` [External] " Xu Lu
2024-04-22 8:21 ` Conor Dooley [this message]
2024-04-18 19:10 ` Andrew Jones
2024-04-18 22:00 ` Samuel Holland
2024-04-18 22:09 ` Conor Dooley
2024-04-18 11:49 ` [RFC 2/2] riscv: Use Zawrs to accelerate IPI to idle cpu Xu Lu
2024-04-18 12:26 ` [RFC 0/2] riscv: Idle thread using Zawrs extension Christoph Müllner
2024-04-18 12:44 ` [External] " Xu Lu
2024-04-18 12:56 ` Christoph Müllner
2024-04-18 13:09 ` Xu Lu
2024-04-18 14:08 ` Conor Dooley
2024-04-18 14:10 ` Andrew Jones
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=20240422-dropper-subplot-efaa833f3cf2@wendy \
--to=conor.dooley@microchip.com \
--cc=ajones@ventanamicro.com \
--cc=andy.chiu@sifive.com \
--cc=aou@eecs.berkeley.edu \
--cc=chaiwen.cc@bytedance.com \
--cc=conor@kernel.org \
--cc=dengliang.1214@bytedance.com \
--cc=guoren@kernel.org \
--cc=lihangjing@bytedance.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=luxu.kernel@bytedance.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=xieyongji@bytedance.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox