[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ympr3VU5Q182SVT7@zn.tnic>
Date: Thu, 28 Apr 2022 12:26:37 +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>,
Juergen Gross <jgross@...e.com>, 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 V6 3/8] x86/entry: Move PUSH_AND_CLEAR_REGS out of
error_entry()
On Thu, Apr 28, 2022 at 08:33:36AM +0800, Lai Jiangshan wrote:
> The branch in sync_regs() can be optimized out for the non-XENPV case
> since XENPV doesn't call sync_regs() after patch5 which makes XENPV
> not call error_entry().
I find it confusing why you're even mentioning optimizing a simple test.
That thing is basically a *whopping* two fastpath instructions:
# arch/x86/kernel/traps.c:853: if (regs != eregs)
cmpq %rdi, %rax # eregs, <retval>
je .L255 #,
Is this such a hot path that it shows in some profiles and removing that
test there is so important?
> The aim of this patch and most of the patchset is to make
> error_entry() be able to be converted to C. And XENPV cases can
> also be optimized in the patchset although it is not the major main.
So say just that.
> Since this patch adds extra overhead (CALL and RET), the changelog
> has to explain why it is worth it not just for converting ASM to C.
What is the practical relevance of this very minor overhead? Does it
show even in a microbenchmark?
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists