[ovs-dev] [PATCH net-next] udp: intoduce udp_encap_needed static_key

Eric Dumazet eric.dumazet at gmail.com
Thu Apr 12 09:10:11 UTC 2012


On Thu, 2012-04-12 at 11:05 +0200, Eric Dumazet wrote:

> If static_key is not yet enabled, the fast path does a single JMP .
> 
> When static_key is enabled, JMP destination is patched to reach the real
> encap_type/encap_rcv logic, possibly adding cache misses.

Small note Simon,

The jump trick is effective on x86 (and maybe some other arches) when

CONFIG_JUMP_LABEL=y

Else, its replaced by atomic_read(...) > 0, a cnditional jump but
reading a read_mostly/shared variable, instead of a per socket field.







More information about the dev mailing list