diff options
author | Michael J. Ruhl <michael.j.ruhl@intel.com> | 2017-08-21 18:26:45 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-08-28 19:12:18 -0400 |
commit | 7956371ea48bd00956219a82fd3af655dd216073 (patch) | |
tree | 7279bc238b80cb372f3d6adf3b1d2cc09247d5b4 /drivers/infiniband/hw/hfi1/user_sdma.c | |
parent | de42de80d7bb4f82e30d16f5c64da90e64b6c644 (diff) | |
download | linux-stable-7956371ea48bd00956219a82fd3af655dd216073.tar.gz linux-stable-7956371ea48bd00956219a82fd3af655dd216073.tar.bz2 linux-stable-7956371ea48bd00956219a82fd3af655dd216073.zip |
IB/hfi1: Improve local kmem_cache_alloc performance
Performance analysis shows that the cache callback function
sdma_kmem_cache_ctor contributes to 1/2 of the kmem_cache_allocs
time.
Since all of the fields in the allocated data structure are initialized
in the code path, remove the _ctor function.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/user_sdma.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/user_sdma.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/hfi1/user_sdma.c b/drivers/infiniband/hw/hfi1/user_sdma.c index aae1f40016e4..9b89df584943 100644 --- a/drivers/infiniband/hw/hfi1/user_sdma.c +++ b/drivers/infiniband/hw/hfi1/user_sdma.c @@ -331,13 +331,6 @@ static void activate_packet_queue(struct iowait *wait, int reason) wake_up(&wait->wait_dma); }; -static void sdma_kmem_cache_ctor(void *obj) -{ - struct user_sdma_txreq *tx = obj; - - memset(tx, 0, sizeof(*tx)); -} - int hfi1_user_sdma_alloc_queues(struct hfi1_ctxtdata *uctxt, struct hfi1_filedata *fd) { @@ -391,7 +384,7 @@ int hfi1_user_sdma_alloc_queues(struct hfi1_ctxtdata *uctxt, sizeof(struct user_sdma_txreq), L1_CACHE_BYTES, SLAB_HWCACHE_ALIGN, - sdma_kmem_cache_ctor); + NULL); if (!pq->txreq_cache) { dd_dev_err(dd, "[%u] Failed to allocate TxReq cache\n", uctxt->ctxt); |