Thread (76 messages) 76 messages, 10 authors, 2024-06-21

Re: [PATCHv11 18/19] x86/acpi: Add support for CPU offlining for ACPI MADT wakeup method

From: Kirill A. Shutemov <hidden>
Date: 2024-06-18 12:20:28
Also in: kexec, linux-acpi, linux-coco, lkml

On Fri, Jun 14, 2024 at 09:06:30AM -0500, Tom Lendacky wrote:
On 6/13/24 09:56, Borislav Petkov wrote:
quoted
On Thu, Jun 13, 2024 at 04:41:00PM +0300, Kirill A. Shutemov wrote:
quoted
It is easy enough to do. See the patch below.
Thanks, will have a look.
quoted
But I am not sure if I can justify it properly. If someone doesn't really
need 5-level paging, disabling it at compile-time would save ~34K of
kernel code with the configuration.

Is it worth saving ~100 lines of code?
Well, it goes both ways: is it worth saving ~34K kernel text and for that make
the code a lot less conditional, more readable, contain less ugly ifdeffery,
Won't getting rid of the config option cause 5-level to be used by default
on all platforms that support it? The no5lvl command line option would have
to be used to get 4-level paging at that point.
Yes, there won't be compile-time option to disable 5-level paging.

Is it a problem?

We benchmarked it back when 5-level paging got introduced and were not able
to see a measurable difference between 4- and 5-level paging on the same
machine. There's some memory overhead on more page table, but it shouldn't
be a show stopper.

I would prefer to get 5-level paging enabled if the machine supports it.
"no5lvl" cmdline option can be useful for debug or if your workload is
somehow special.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help