Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933742AbdCJTEQ (ORCPT ); Fri, 10 Mar 2017 14:04:16 -0500 Received: from mail-ua0-f169.google.com ([209.85.217.169]:35703 "EHLO mail-ua0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755402AbdCJTEI (ORCPT ); Fri, 10 Mar 2017 14:04:08 -0500 MIME-Version: 1.0 In-Reply-To: References: <20170309224204.066497548@goodmis.org> <20170309224447.678652367@goodmis.org> <20170310072056.GA3762@gmail.com> From: Andy Lutomirski Date: Fri, 10 Mar 2017 11:03:46 -0800 Message-ID: Subject: Re: [PATCH 1/2] x86/nmi: Optimize the check for being in the repeat_nmi code To: Linus Torvalds Cc: Ingo Molnar , Steven Rostedt , "linux-kernel@vger.kernel.org" , Thomas Gleixner , "H. Peter Anvin" , Andy Lutomirski , Andrew Morton Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 991 Lines: 26 On Fri, Mar 10, 2017 at 11:00 AM, Linus Torvalds wrote: > On Thu, Mar 9, 2017 at 11:20 PM, Ingo Molnar wrote: >> >> Joking aside, I'll bite: while in the kernel we try to avoid ever actually >> _writing_ new assembly code > > .. also, when we do, I think we should care about it. > > If you write asm, and the end result is noticeably worse than what > your average compiler would generate, exactly why are you writing it > in asm in the first place? > > So I think people should aim to avoid asm. Andy certainly knows that, > and I loved his "rewrite a lot of the low-level system call code" > patches. > > But the corollary to that is that if you _do_ write assembler, please > have some pride in the code, and don't half-arse it. > Geez, I didn't expect anyone to take my silly comment remotely seriously :) And I do like Steven's patches. --Andy, who just looked at binutils source to figure out WTF "nobits" meant. Take that, asm!