linux-toolchains.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] x86: Remove ideal_nops[]
@ 2021-03-12 11:32 Peter Zijlstra
  2021-03-12 11:32 ` [PATCH 1/2] x86: Remove dynamic NOP selection Peter Zijlstra
                   ` (3 more replies)
  0 siblings, 4 replies; 51+ messages in thread
From: Peter Zijlstra @ 2021-03-12 11:32 UTC (permalink / raw)
  To: x86, rostedt, hpa, torvalds
  Cc: linux-kernel, linux-toolchains, peterz, jpoimboe,
	alexei.starovoitov, mhiramat

Hi!

A while ago Steve complained about x86 being weird for having different NOPs [1]

Having cursed the same thing before, I figured it was time to look at the NOP
situation.

32bit simply isn't a performance target anymore, so all we need is a set of
NOPs that works on all.

x86_64 has two main NOP variants, NOPL and prefix NOP. NOPL was introduced by
P6 and is architecturally mandated for x86_64. However, some uarchs made the
choice to limit NOPL decoding to a single port, which obviously limits NOPL
throughput. Other uarchs have (severe) decoding penalties for excessive (>~3)
prefixes, hobbling prefix NOP throughput.

But the thing is, all the modern uarchs can handle both without issue; that is
AMD K10 (2007) and later and Intel Ivy Bridge (2012) and later. The only
exception is Atom, which has the prefix penalty.

Since ultimate performance of a 10 year old chip (Intel Sandy Bridge, 2011) is
simply irrelevant today, remove variable NOPs and use NOPL.

This gives us deterministic NOPs and restores sanity.



[1] https://lkml.kernel.org/r/20210302105827.3403656c@gandalf.local.home


^ permalink raw reply	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2024-01-22  2:32 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 11:32 [PATCH 0/2] x86: Remove ideal_nops[] Peter Zijlstra
2021-03-12 11:32 ` [PATCH 1/2] x86: Remove dynamic NOP selection Peter Zijlstra
2021-03-12 12:09   ` Peter Zijlstra
2021-03-12 20:36     ` Linus Torvalds
2024-01-20  6:58   ` Thorsten Glaser
2024-01-20  8:22     ` H. Peter Anvin
2024-01-20 16:53       ` Thorsten Glaser
2024-01-21 23:21         ` H. Peter Anvin
2024-01-21 23:58           ` Thorsten Glaser
2024-01-22  0:15             ` H. Peter Anvin
2024-01-22  0:56               ` Steven Rostedt
2024-01-22  1:17                 ` Thorsten Glaser
2024-01-22  2:04                   ` H. Peter Anvin
2024-01-22  2:15                 ` H. Peter Anvin
2024-01-22  2:22                   ` Steven Rostedt
2024-01-22  2:31                     ` H. Peter Anvin
2024-01-20 17:00       ` Linus Torvalds
2024-01-20 17:19         ` Thorsten Glaser
2024-01-20 18:21           ` disassemblers (was Re: [PATCH 1/2] x86: Remove dynamic NOP selection) Thorsten Glaser
2024-01-21 22:36         ` [PATCH 1/2] x86: Remove dynamic NOP selection David Laight
2024-01-21 23:10           ` H. Peter Anvin
2021-03-12 11:32 ` [PATCH 2/2] objtool,x86: Use asm/nops.h Peter Zijlstra
2021-03-12 14:29 ` [PATCH 0/2] x86: Remove ideal_nops[] Sedat Dilek
2021-03-12 14:47   ` Borislav Petkov
2021-03-12 17:26     ` Steven Rostedt
2021-03-12 17:35       ` Sedat Dilek
2021-03-12 17:46         ` Borislav Petkov
2021-03-12 17:47         ` Steven Rostedt
2021-03-12 18:13           ` Sedat Dilek
2021-03-12 19:03             ` Sedat Dilek
2021-03-12 20:59 ` Borislav Petkov
     [not found]   ` <CA+icZUWSCS6vAQOXoG6nsW+Dbnogivzf+rmegCTMjz5hjE5cKQ@mail.gmail.com>
2021-03-13  8:49     ` Borislav Petkov
2021-03-13 11:23       ` Borislav Petkov
2021-03-13 12:10       ` Sedat Dilek
2021-03-13 12:15         ` Borislav Petkov
2021-03-13 12:38           ` Sedat Dilek
2021-03-13 12:49             ` Borislav Petkov
2021-03-13 12:58               ` Sedat Dilek
2021-03-13 13:29                 ` Borislav Petkov
2021-03-13 13:47                   ` Sedat Dilek
2021-03-15 17:04                     ` Sedat Dilek
2021-03-15 17:15                       ` Borislav Petkov
2021-03-15 17:19                         ` Sedat Dilek
2021-03-15 17:23                           ` Borislav Petkov
2021-03-15 18:10                       ` Peter Zijlstra
2021-03-15 18:23                         ` Sedat Dilek
2021-03-15 22:14                           ` Peter Zijlstra
2021-03-16  5:56                             ` Sedat Dilek
2021-03-27 12:08                               ` Sedat Dilek
2021-03-27 20:02                                 ` Linus Torvalds
2021-03-30 12:31                                   ` Sedat Dilek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).