[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240422-dropper-subplot-efaa833f3cf2@wendy>
Date: Mon, 22 Apr 2024 09:21:58 +0100
From: Conor Dooley <conor.dooley@...rochip.com>
To: Xu Lu <luxu.kernel@...edance.com>
CC: Conor Dooley <conor@...nel.org>, <paul.walmsley@...ive.com>,
<palmer@...belt.com>, <aou@...s.berkeley.edu>, <andy.chiu@...ive.com>,
<guoren@...nel.org>, <linux-riscv@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <lihangjing@...edance.com>,
<dengliang.1214@...edance.com>, <xieyongji@...edance.com>,
<chaiwen.cc@...edance.com>, Andrew Jones <ajones@...tanamicro.com>
Subject: Re: [External] Re: [RFC 1/2] riscv: process: Introduce idle thread
using Zawrs extension
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@...nel.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.
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists