Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753861Ab3HERPS (ORCPT ); Mon, 5 Aug 2013 13:15:18 -0400 Received: from mail-ve0-f177.google.com ([209.85.128.177]:38226 "EHLO mail-ve0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751655Ab3HERPQ (ORCPT ); Mon, 5 Aug 2013 13:15:16 -0400 MIME-Version: 1.0 In-Reply-To: References: <1375721715.22073.80.camel@gandalf.local.home> Date: Mon, 5 Aug 2013 10:15:15 -0700 X-Google-Sender-Auth: jWqoqVwEMOBkQ8B6b2sxTyN-DVQ Message-ID: Subject: Re: [RFC] gcc feature request: Moving blocks into sections From: Linus Torvalds To: Steven Rostedt Cc: LKML , gcc , Ingo Molnar , Mathieu Desnoyers , "H. Peter Anvin" , Thomas Gleixner , David Daney , Behan Webster , Peter Zijlstra 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: 1028 Lines: 25 On Mon, Aug 5, 2013 at 10:12 AM, Linus Torvalds wrote: > > Secondly, you don't want a separate section anyway for any normal > kernel code, since you want short jumps if possible Just to clarify: the short jump is important regardless of how unlikely the code you're jumping is, since even if you'd be jumping to very unlikely ("never executed") code, the branch to that code is itself in the hot path. And the difference between a two-byte short jump to the end of a short function, and a five-byte long jump (to pick the x86 case) is quite noticeable. Other cases do long jumps by jumping to a thunk, and so the "hot case" is unaffected, but at least one common architecture very much sees the difference in the likely code. Linus -- 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/