Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752675AbdCJHVC (ORCPT ); Fri, 10 Mar 2017 02:21:02 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33503 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750836AbdCJHVB (ORCPT ); Fri, 10 Mar 2017 02:21:01 -0500 Date: Fri, 10 Mar 2017 08:20:56 +0100 From: Ingo Molnar To: Andy Lutomirski Cc: Steven Rostedt , "linux-kernel@vger.kernel.org" , Linus Torvalds , Thomas Gleixner , "H. Peter Anvin" , Andy Lutomirski , Andrew Morton Subject: Re: [PATCH 1/2] x86/nmi: Optimize the check for being in the repeat_nmi code Message-ID: <20170310072056.GA3762@gmail.com> References: <20170309224204.066497548@goodmis.org> <20170309224447.678652367@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1122 Lines: 29 * Andy Lutomirski 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 keys away after launching 'perf top' or 'perf report'. The more developers know assembly the better, IMHO. Thanks, Ingo