Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Apr 2010 22:16:57 -0700 (PDT)
From:      Paul Zimmerman <paul-zimmerman@sbcglobal.net>
To:        peterjeremy@acm.org, freebsd-arch@freebsd.org
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
Message-ID:  <493092.21442.qm@web80804.mail.mud.yahoo.com>

next in thread | raw e-mail | index | archive | help
On 2010-Mar-21 19:52:40 -0600, Peter Jeremy <peterjeremy () acm ! org> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?493092.21442.qm>