Re: [linus:master] [iov_iter] c9eec08bac: vm-scalability.throughput -16.9% regression

Linus Torvalds
2023-11-15T20:07:48Z

On Wed, 15 Nov 2023 at 14:15, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> So my patch really is broken. It might happen to work when everything
> else goes right, and it's small, but it is very much a "proof of
> concept" rather than something that is actually acceptable.

More breakage details

(a) need to not do this with the boot code and EFI stub code that
doesn't handle alternatives.

It's not a huge deal in that obviously both alternatives work,
but it causes build issues:

ld: error: unplaced orphan section `.altinstructions' from
`arch/x86/boot/compressed/misc.o'
ld: error: unplaced orphan section `.altinstr_replacement' from
`arch/x86/boot/compressed/misc.o'
...

etc

- our current "memcpy_orig" fallback does unrolled copy loops, and
the rep_movs_alternative fallback obviously doesn't.

It's not clear that the unrolled copy loops matter for the in-kernel
kinds of copies, but who knows. The memcpy_orig code is definitely
trying to be smarter in some other ways too. So the fallback should
try a *bit* harder than I did, and not just with the whole "don't try
to handle exceptions" issue I mentioned.

Linus