[PATCH] riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y

Conor Dooley conor at kernel.org
Tue Oct 4 10:15:11 PDT 2022


On Tue, Oct 04, 2022 at 09:52:41AM -0700, Atish Patra wrote:
> On Sat, Oct 1, 2022 at 1:13 PM Conor Dooley <conor at kernel.org> wrote:

> > > Thanks. It would be good to understand what happens when "pause" is
> > > executed on these boards ?
> >
> > The actual pause instruction? uhh, so with the usual "I don't know what
> > I am doing" disclaimer, I ran each of the .insn and pause instruction 48
> > times in a row and checked the time elapsed via rdcycle & then ran that
> > c program 1000 times in a bash loop. Got the below, the insns were run
> > first and then the pauses.
> >         insn    pause
> > min     2.3     3.2
> > max     9.5     10.6
> > avg     27.0    29.1
> > 5%      2.9     4.2
> > 95%     18.1    19.1
> >
> > Swapping the pause & insn order around made a minor difference, but not
> > enough to report on. I'd be very wary of drawing any real conclusions
> > from this data, but at least both are roughly similar (and certainly not
> > even close to doing the div w/ zero args.
> >
> 
> Yeah. That's what I was expecting. So we can't drop the div for now. Otherwise,
> the existing hardware(don't support Zhintpause) suffers by spinning faster.
> 
> Thanks for running the experiments.

I've lost track, does that mean the patch is okay as, is or needs to be
changed? The former, right?

Thanks,
Conor.



More information about the linux-riscv mailing list