summaryrefslogtreecommitdiff
path: root/lib/stp.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2013-08-06 20:35:29 -0700
committerEthan Jackson <ethan@nicira.com>2013-08-09 13:35:34 -0700
commitee047520f66b174f6a36beb63e7aaf40526eb0af (patch)
tree051b7f6bb60eebd268ee07243648c4c5aa7afe42 /lib/stp.c
parent0b4f207828c9354761efc60bd9ab90898d9cc623 (diff)
downloadopenvswitch-ee047520f66b174f6a36beb63e7aaf40526eb0af.tar.gz
ofproto-dpif-xlate: Avoid MAC learning write lock on fast path.
Most of the trips through update_learning_table() do not actually change the MAC learning table, but because some do the code there took the MAC learning table's write lock. This commit changes the common case to take only the read lock, falling back to the write lock if a change was actually necessary. Ethan reported that this gave a 3.3x performance improvement in one test case due to reduced lock contention. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'lib/stp.c')
0 files changed, 0 insertions, 0 deletions