aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/hfi1/pio.h
diff options
context:
space:
mode:
authorMike Marciniszyn <mike.marciniszyn@intel.com>2015-12-07 15:39:22 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-21 14:00:17 -0800
commita054374f15428cbc1d9cb9cba17ce870eaa7d60f (patch)
tree07dd3a9d52cb4c409fd799c65ab93e699a6e4c2f /drivers/staging/rdma/hfi1/pio.h
parentstaging/rdma/hfi1: fix sdma build failures to always clean up (diff)
downloadlinux-dev-a054374f15428cbc1d9cb9cba17ce870eaa7d60f.tar.xz
linux-dev-a054374f15428cbc1d9cb9cba17ce870eaa7d60f.zip
staging/rdma/hfi1: convert buffers allocated atomic to per cpu
Profiling has shown the the atomic is a performance issue for the pio hot path. If multiple cpus allocated an sc's buffer, the cacheline containing the atomic will bounce from L0 to L0. Convert the atomic to a percpu variable. Reviewed-by: Jubin John <jubin.john@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/hfi1/pio.h')
-rw-r--r--drivers/staging/rdma/hfi1/pio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/pio.h b/drivers/staging/rdma/hfi1/pio.h
index 0bb885ca3cfb..53d3e0a79375 100644
--- a/drivers/staging/rdma/hfi1/pio.h
+++ b/drivers/staging/rdma/hfi1/pio.h
@@ -130,7 +130,7 @@ struct send_context {
spinlock_t credit_ctrl_lock ____cacheline_aligned_in_smp;
u64 credit_ctrl; /* cache for credit control */
u32 credit_intr_count; /* count of credit intr users */
- atomic_t buffers_allocated; /* count of buffers allocated */
+ u32 __percpu *buffers_allocated;/* count of buffers allocated */
wait_queue_head_t halt_wait; /* wait until kernel sees interrupt */
};