[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49D4C7CE.3060005@goop.org>
Date: Thu, 02 Apr 2009 07:12:30 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: dada1@...mosbay.com, mingo@...e.hu, htejun@...il.com,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
joe@...ches.com, rusty@...tcorp.com.au
Subject: Re: [PATCH] x86: percpu_to_op() misses memory and flags clobbers
Herbert Xu wrote:
> Jeremy Fitzhardinge <jeremy@...p.org> wrote:
>
>> There's probably not a lot of value in this. The Intel and AMD
>> optimisation guides tend to deprecate inc/dec in favour of using
>> add/sub, because the former can cause pipeline stalls due to its partial
>> flags update.
>>
>
> Is this still the case on the latest Intel CPUs?
>
Yes:
Assembly/Compiler Coding Rule 32. (M impact, H generality) INC and DEC
instructions should be replaced with ADD or SUB instructions,
because ADD and
SUB overwrite all flags, whereas INC and DEC do not, therefore
creating false
dependencies on earlier instructions that set the flags.
J
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists