[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170310072056.GA3762@gmail.com>
Date: Fri, 10 Mar 2017 08:20:56 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Andy Lutomirski <luto@...capital.net>
Cc: Steven Rostedt <rostedt@...dmis.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/2] x86/nmi: Optimize the check for being in the
repeat_nmi code
* Andy Lutomirski <luto@...capital.net> wrote:
> > It had nothing to do with speedup. Linus said that the current code makes the
> > assembly programmer in him die a little. I want to cure that.
>
> One might argue that the world would be a better place if the assembly
> programmer in some people died a little.
Joking aside, I'll bite: while in the kernel we try to avoid ever actually
_writing_ new assembly code, assembly programming is still an invaluable skill,
because it indirectly improves all the other 99% of non-assembly .c code:
- Looking at the C compiler's assembly output tells us how close the code is to
optimal.
- Being able to tell whether our C abstractions are too far removed from how the
compiler will map it to machine instructions is invaluable.
- Being able to shape data structures and code in a machine-friendly way.
Much would be lost if the assembly programmer went extinct and it's no
accident that annotated assembly output is just two <Enter> keys away
after launching 'perf top' or 'perf report'. The more developers know
assembly the better, IMHO.
Thanks,
Ingo
Powered by blists - more mailing lists