Re: [PATCH 1/2] x86: Remove dynamic NOP selection

From: Steven Rostedt
Date: Sun Jan 21 2024 - 21:22:50 EST


On Sun, 21 Jan 2024 18:15:39 -0800
"H. Peter Anvin" <hpa@xxxxxxxxx> wrote:

> On 1/21/24 16:56, Steven Rostedt wrote:
> >>
> >> Yes, but it is a matter of where we optimize for performance as opposed to correctness.
> >
> > There is no such thing as "optimize for correctness", it is either
> > correct or it is not. Correctness should always come before performance
> > (at least that is what Thomas has pounded into me ;-)
> >
> > If a kernel use to work on a machine but a newer version no longer
> > works, I call that a regression.
> >
>
> There absolutely is such a thing as "optimize for correctness." It means
> to keep the code clean, easily testable, and with a minimal number of
> distinct code paths so that regressions and *especially* uncaught
> regressions get caught quickly.

I call that maintainability, not correctness. It is either correct and
works, or is incorrect and does not work.

You can change code to be more maintainable and still make it incorrect.

-- Steve