[External] Re: [RFC 1/2] riscv: process: Introduce idle thread using Zawrs extension
Conor Dooley
conor.dooley at microchip.com
Mon Apr 22 01:21:58 PDT 2024
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 at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20240422/cdb13071/attachment.sig>
More information about the linux-riscv
mailing list