Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751571AbbEFTAa (ORCPT ); Wed, 6 May 2015 15:00:30 -0400 Received: from terminus.zytor.com ([198.137.202.10]:47077 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750808AbbEFTA3 (ORCPT ); Wed, 6 May 2015 15:00:29 -0400 Message-ID: <554A649C.8070605@zytor.com> Date: Wed, 06 May 2015 11:59:40 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Denys Vlasenko , Ingo Molnar CC: Steven Rostedt , Borislav Petkov , Andy Lutomirski , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86: Deinline cpuid_eax and friends References: <1430932057-26574-1-git-send-email-dvlasenk@redhat.com> In-Reply-To: <1430932057-26574-1-git-send-email-dvlasenk@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 840 Lines: 22 On 05/06/2015 10:07 AM, Denys Vlasenko wrote: > cpuid_e{a,b,c,d}x() functions compile to 44 bytes of machine code each. > On x86 allyesconfig build they have 48 callsites. > Deinlining all four of them shrinks kernel by about 1k: > > text data bss dec hex filename > 82434909 22255384 20627456 125317749 7783275 vmlinux.before > 82433898 22255384 20627456 125316738 7782e82 vmlinux > > Speed impact: CPUID instruction takes from 50 to 350+ cycles, > call overhead is negligible in comparison. How on Earth does it make 44 bytes? Is this due to paravirt_fail? -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/