[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFyxgnVP1C3bgNDgX01NZi2x=FYjAw=YHAdn17ENS9P7bg@mail.gmail.com>
Date: Mon, 5 Feb 2018 14:22:13 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andy Lutomirski <luto@...nel.org>
Cc: Dan Williams <dan.j.williams@...el.com>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andi Kleen <ak@...ux.intel.com>, X86 ML <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2 1/3] x86/entry: Clear extra registers beyond syscall
arguments for 64bit kernels
On Mon, Feb 5, 2018 at 2:10 PM, Andy Lutomirski <luto@...nel.org> wrote:
> At the risk of over-optimizing a dead horse, what about:
>
> xorl %ebx, %ebx
> movq %ebx, %r10
> xorl %r11, %r11
> movq %ebx, %r12
>
> etc.
>
> We'll have a cycle of latency from xor to mov, but I'd be rather
> surprised if the CPU can't hide that.
Ugh. xor really is nice because it breaks all dependencies.
Really, it's much more likely that we can just hide the xors in the
pushes. Small, simple, easy.
But I'm not timing it.
Linus
Powered by blists - more mailing lists