From: Benjamin LaHaise <[EMAIL PROTECTED]> Date: Fri, 9 Dec 2005 17:53:02 -0500
> Similar to the previous patch, the atomic xchg in sock_error() results in > extra pipeline flushes due to the need to perform full synchronization as > a memory barrier. Avoid calling sock_error() in a couple of places where > it is safe to do a racy version of the test. Combined with the refcounting > patch, this improves LMbench's bw_unix results from ~346K/s to ~570K/s on > my test system. > > Signed-off-by: Benjamin LaHaise <[EMAIL PROTECTED]> If it's legal in these few cases, it's basically legal everywhere and we can thus do this optimization in the sock_error() macro itself. In fact you can add an "unlikely" tag to the sk_err test as well :-) Several places do this optimized check already, and thus this would be a nice sweep across the 36 sock_error() users in the tree. Can you toss together such a patch or would you like me to do it? :-) - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html