[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YlWNIj198mKM3hMG@zn.tnic>
Date: Tue, 12 Apr 2022 16:30:58 +0200
From: Borislav Petkov <bp@...en8.de>
To: Lai Jiangshan <jiangshanlai@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, X86 ML <x86@...nel.org>,
Lai Jiangshan <jiangshan.ljs@...group.com>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH V5 3/7] x86/entry: Move PUSH_AND_CLEAR_REGS out of
error_entry()
On Tue, Apr 12, 2022 at 09:52:44PM +0800, Lai Jiangshan wrote:
> The mapped size for the text is always 2M when the kernel is booted
> since it is 2M-aligned. So I don't think the size is a concern.
This is not how this argumentation works: you add 0.01% size increase
here, 0.01% slowdown there and it all soon adds up into a bloated
kernel. Besides, nowadays the kernel runs a lot as a guest and guest
kernel size does matter.
So no, just because you want to turn error_entry() into C code and for
that you'll add some bloat doesn't justify it in my book. All changes to
core code need to be absolutely needed and justifiable.
> For example, a heavy page fault and IPI or timer at the same time.
> I'm not sure if it is a real case.
I wouldn't be surprised if it shows in some perf profiles.
> I'm Okay with asm_error_entry(). And also we can use an ASM function
> containing PUSH_AND_CLEAR_REGS only.
Just do the necessary and minimal thing - this is core code and in asm
for that matter, so be conservative pls. This is not some random driver.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists