From owner-freebsd-arch@FreeBSD.ORG Thu Apr 15 05:43:39 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7956D106566B for ; Thu, 15 Apr 2010 05:43:39 +0000 (UTC) (envelope-from paul-zimmerman@sbcglobal.net) Received: from web80804.mail.mud.yahoo.com (web80804.mail.mud.yahoo.com [209.191.72.108]) by mx1.freebsd.org (Postfix) with SMTP id EA9FE8FC15 for ; Thu, 15 Apr 2010 05:43:38 +0000 (UTC) Received: (qmail 21632 invoked by uid 60001); 15 Apr 2010 05:16:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sbcglobal.net; s=s1024; t=1271308617; bh=PCEKahc6hSmdZD44IFGzbQ8sy+Z59MVOsHvLZ83tG5U=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type; b=vG8c7OZmH18r0lkRHMBLCwbCK6Qe+k3LN14bFih05969Szr5cRurCP0SuI7bC/79x/MhnpdJHcjaVnfp602V637oTSNF2jQTMjfdFPWW2EUUYz39gZ1VdMcb7NLbnwSMUPHcy/OIl7RhUrPxcvtyse/JcEUQKvoxJBWW52abzZU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type; b=bOnORIeKQXBggHz0Dhe6QCPDQ7+5P6RKU9eOea1VV7cHloRljDlHb1qR34e5vp5MaixEhkhq6jsZGwT760efO3IfdeldFCwv7LTAj8TiCxS30CAgk4SJZ+jTVivtjtSLNvfIfa0gm4MB0d01QAP6rgaFqMG/G7KnRKT4R3N8U9M=; Message-ID: <493092.21442.qm@web80804.mail.mud.yahoo.com> X-YMail-OSG: f2v4k68VM1kgqyRe_6Bwoi9uwrTy2klK6I5eZxNaHjZ_hpn ojcz.hgHTQnlPFsR6JYVtDyGIaPNqd.iSoPQZGIPPNqzhR3zl8KL_o.eU_kj zK2_2zz7KJuru5stHu9PRSYui0jpVwAoDefu9xYUy3oITB71rq58wrroFjBF L7fT4ra976aHBgmidIgFSTvSFTX6JRLFOAIUrMOWmKB_tgId.9wB0J6VVc1V 2hUyrbIwOtkCog1qZFENhamuO451ZO32CjQm4xqdTixOGAHilArpktzkh70f NyvgqnCYUcEEnNGZrVK3PyYUz4hZEgEqRkPTMq2cwEKfjyBblCeqgbUDF18Q 0rlIsefVCKc9a6oMWB2be7_6Iyg-- Received: from [75.52.253.215] by web80804.mail.mud.yahoo.com via HTTP; Wed, 14 Apr 2010 22:16:57 PDT X-Mailer: YahooMailClassic/10.0.8 YahooMailWebService/0.8.100.260964 Date: Wed, 14 Apr 2010 22:16:57 -0700 (PDT) From: Paul Zimmerman To: peterjeremy@acm.org, freebsd-arch@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailman-Approved-At: Thu, 15 Apr 2010 11:06:35 +0000 Cc: bruce@cran.org.uk, ed@80386.nl, scottl@samsco.org, matthew.fleming@isilon.com, avg@icyb.net.ua, rwatson@freebsd.org, ivoras@freebsd.org, stefan@fafoe.narf.at, max@love2party.net Subject: Re: likely and unlikely X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 05:43:39 -0000 On 2010-Mar-21 19:52:40 -0600, Peter Jeremy wrote: >I suspect predict_true/predict_false is unlikely to help in most cases. > >What would probably be more useful for Atom would be gcc scheduling >support. This is available in gcc 4.3 (ie GPL3) but not in gcc 4.2. >I've had a look at dumping the gcc 4.3 Atom scheduler into my gcc 4.2 >but the infrastructure has changed sufficiently that this would be a >non-trivial task. (And since it would not be committable, I don't >think it's worth my time). Likewise, implementing scheduling from >scratch in gcc 4.2 would be a non-trivial task. Just FYI, the use of likely/unlikely in the Linux kernel is not for branch prediction. It is a hint to gcc which branch of the if() should be moved out-of-line. The idea is to reduce the cache footprint of the most frequently executed code paths. -- Paul