Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933876AbdCJTAv (ORCPT ); Fri, 10 Mar 2017 14:00:51 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:34183 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932705AbdCJTAp (ORCPT ); Fri, 10 Mar 2017 14:00:45 -0500 MIME-Version: 1.0 In-Reply-To: <20170310072056.GA3762@gmail.com> References: <20170309224204.066497548@goodmis.org> <20170309224447.678652367@goodmis.org> <20170310072056.GA3762@gmail.com> From: Linus Torvalds Date: Fri, 10 Mar 2017 11:00:43 -0800 X-Google-Sender-Auth: CDuyrr4is6EG5v0oT7jnPRMvnPc Message-ID: Subject: Re: [PATCH 1/2] x86/nmi: Optimize the check for being in the repeat_nmi code To: Ingo Molnar Cc: Andy Lutomirski , 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: 693 Lines: 19 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. Linus