From: Michael S. Tsirkin Date: Mon, 4 Nov 2013 20:36:25 +0000 (+0200) Subject: kvm: optimize out smp_mb after srcu_read_unlock X-Git-Tag: v3.13-rc1~80^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01b71917b55d28c09ade9fb8c683cf0d2aad1858;p=pandora-kernel.git kvm: optimize out smp_mb after srcu_read_unlock I noticed that srcu_read_lock/unlock both have a memory barrier, so just by moving srcu_read_unlock earlier we can get rid of one call to smp_mb() using smp_mb__after_srcu_read_unlock instead. Unsurprisingly, the gain is small but measureable using the unit test microbenchmark: before vmcall in the ballpark of 1410 cycles after vmcall in the ballpark of 1360 cycles Signed-off-by: Michael S. Tsirkin Signed-off-by: Gleb Natapov --- Reading git-diff-tree failed