Re: [PATCH net-next-2.6] filter: optimize sk_run_filter

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Miller
Date: Friday, November 19, 2010 - 9:21 am

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 19 Nov 2010 12:17:52 +0100


-EFIX_THE_DAMN_COMPILER

We never make calls out of this function or touch volatile memory or
create a full memory barrier between the assignment of f_k and it's
uses.

Therefore if common sub-expression elimination is working the compiler
will be able to decide properly whether to access things via memory or
use a register for the value.

Remember this is why we have that ACCESS_ONCE() thing.

We can't have it both ways, either ACCESS_ONCE() should be removed or
we should never make changes like your's and instead should submit
compiler bug reports :-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] net: reduce the lines of code, Changli Gao, (Thu Nov 18, 7:04 pm)
Re: [PATCH] net: reduce the lines of code, Hagen Paul Pfeifer, (Thu Nov 18, 11:35 pm)
Re: [PATCH] net: reduce the lines of code, Changli Gao, (Fri Nov 19, 12:17 am)
Re: [PATCH] net: reduce the lines of code, Eric Dumazet, (Fri Nov 19, 12:51 am)
[PATCH net-next-2.6] filter: cleanup codes[] init, Eric Dumazet, (Fri Nov 19, 12:56 am)
[PATCH net-next-2.6] filter: use reciprocal divide, Eric Dumazet, (Fri Nov 19, 1:04 am)
Re: [PATCH net-next-2.6] filter: use reciprocal divide, Changli Gao, (Fri Nov 19, 1:18 am)
Re: [PATCH net-next-2.6] filter: cleanup codes[] init, Changli Gao, (Fri Nov 19, 1:38 am)
Re: [PATCH net-next-2.6] filter: cleanup codes[] init, Eric Dumazet, (Fri Nov 19, 2:54 am)
[PATCH net-next-2.6] filter: optimize sk_run_filter, Eric Dumazet, (Fri Nov 19, 4:17 am)
Re: [PATCH net-next-2.6] filter: cleanup codes[] init, Changli Gao, (Fri Nov 19, 5:21 am)
[PATCH net-next-2.6 v2] filter: optimize sk_run_filter, Eric Dumazet, (Fri Nov 19, 6:16 am)
Re: [PATCH net-next-2.6] filter: optimize sk_run_filter, David Miller, (Fri Nov 19, 9:21 am)
Re: [PATCH net-next-2.6] filter: optimize sk_run_filter, Eric Dumazet, (Fri Nov 19, 9:55 am)
Re: [PATCH net-next-2.6] filter: optimize sk_run_filter, David Miller, (Fri Nov 19, 10:05 am)
Re: [PATCH net-next-2.6] filter: optimize sk_run_filter, Stephen Hemminger, (Fri Nov 19, 10:15 am)
Re: [PATCH net-next-2.6] filter: optimize sk_run_filter, Eric Dumazet, (Fri Nov 19, 10:16 am)
Re: [PATCH net-next-2.6] filter: optimize sk_run_filter, David Miller, (Fri Nov 19, 10:21 am)
Re: [PATCH net-next-2.6] filter: optimize sk_run_filter, David Miller, (Fri Nov 19, 10:25 am)
Re: [PATCH net-next-2.6] filter: cleanup codes[] init, David Miller, (Fri Nov 19, 11:07 am)
Re: [PATCH net-next-2.6] filter: use reciprocal divide, David Miller, (Fri Nov 19, 11:07 am)