Re: [PATCH] x86: percpu_to_op() misses memory and flags clobbers

From: Jeremy Fitzhardinge
Date: Wed Apr 01 2009 - 14:08:10 EST


Eric Dumazet wrote:
+#define percpu_inc(var) percpu_to_op0("inc", per_cpu__##var)
+#define percpu_dec(var) percpu_to_op0("dec", per_cpu__##var)

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.

J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/