lkml.org 
[lkml]   [2017]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] x86/nmi: Optimize the check for being in the repeat_nmi code

* Andy Lutomirski <luto@amacapital.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

\
 
 \ /
  Last update: 2017-03-10 08:21    [W:0.095 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site