From a231b6f1eae30429f6987f61213c60529b7fc72b Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Mon, 7 May 2012 17:16:47 -0700 Subject: [PATCH] new --- meta | 5 +++-- patches/rs-locking | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 patches/rs-locking diff --git a/meta b/meta index 95e36dd8..d64e9e96 100644 --- a/meta +++ b/meta @@ -1,7 +1,8 @@ Version: 1 -Previous: d694872ccf13424dbdbafdb6089b0cc1109595fd -Head: 5658ff385e0449a78a325d430163e524b7a97ec4 +Previous: 4e7c4df1d759a22b94dceda9738bf1713ad74b21 +Head: d463576a25bf301625544eba23337232e36d3115 Applied: + rs-locking: d463576a25bf301625544eba23337232e36d3115 Unapplied: preload: 5dfe7abc07064485c5100e04e5412279244c2bc3 Hidden: diff --git a/patches/rs-locking b/patches/rs-locking new file mode 100644 index 00000000..4cf82e15 --- /dev/null +++ b/patches/rs-locking @@ -0,0 +1,22 @@ +Bottom: de666c51520c9988ea3a07e332fa0402fdef6010 +Top: de666c51520c9988ea3a07e332fa0402fdef6010 +Author: Sean Hefty +Date: 2012-05-07 17:16:47 -0700 + +rsockets: Optimize synchronization to improve performance + +Performance analysis using VTune showed that pthread_mutex_unlock() +is the single biggest contributor to increasing latency for 64-byte +transfers. Unlocked was followed by get_sw_cqe(), then +__pthread_mutex_lock(). Replace the use of mutexes with an atomic +and a semaphore. When there's no contention for the lock (which +would usually be the case when using nonblocking sockets), the +code simply increments and decrements an atomic varible. Semaphores +are only used when contention occurs. + +Signed-off-by: Sean Hefty + + +--- + + -- 2.41.0