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

Linus Torvalds
2023-11-15T21:50:31Z

On Wed, 15 Nov 2023 at 16:43, David Howells <dhowells@redhat.com> wrote:
>
> LD arch/x86/purgatory/purgatory.chk
> ld: arch/x86/purgatory/purgatory.ro:(.altinstr_replacement+0x1): undefined reference to `rep_movs_alternative'
> ld: arch/x86/purgatory/purgatory.ro:(.altinstr_replacement+0x6): undefined reference to `rep_movs_alternative'
>
> The symbol is available in the arch lib directory:

That patch of mine ends up exposing the fact that we have a lot of
special boot-time code and similar that isn't real kernel code, but is
built with kernel headers.

Normally not that noticeable, but when it modified something as core
as memcpy(), it shows up in a big way.

Sadly, we don't seem to have any obvious #define for "this is not real
kernel code". We just have a lot of ad-hoc tricks, like removing
compiler flags and disabling things like KASAN etc on a file-by-file
(or directory) basis.

The purgatory code isn't exactly boot-time code, but it's very similar
- it's kind of a limited environment that runs at crash time to load a
new kernel.

Linus