diff options
author | Vennila Megavannan <vennila.megavannan@intel.com> | 2016-02-03 22:34:07 (GMT) |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-11 01:37:53 (GMT) |
commit | 89abfc8d64dd1ad32e6d96404eb0a1ea6cbb4ca4 (patch) | |
tree | 428400f9a7498421349095fa29dd81aa82a2eb9d /drivers/staging/rdma/hfi1/init.c | |
parent | 377f111ee81bcef1a788a396f6d813a6b966acbb (diff) | |
download | linux-89abfc8d64dd1ad32e6d96404eb0a1ea6cbb4ca4.tar.xz |
staging/rdma/hfi1: Change send_schedule counter to a per cpu counter
A patch to fix fairness issues in QP scheduling requires
n_send_schedule counter to be converted to a per cpu counter to reduce
cache misses.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Vennila Megavannan <vennila.megavannan@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma/hfi1/init.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/rdma/hfi1/init.c b/drivers/staging/rdma/hfi1/init.c index 629e92a..6ddf3c8 100644 --- a/drivers/staging/rdma/hfi1/init.c +++ b/drivers/staging/rdma/hfi1/init.c @@ -985,6 +985,7 @@ void hfi1_free_devdata(struct hfi1_devdata *dd) free_percpu(dd->int_counter); free_percpu(dd->rcv_limit); hfi1_dev_affinity_free(dd); + free_percpu(dd->send_schedule); ib_dealloc_device(&dd->verbs_dev.rdi.ibdev); } @@ -1063,6 +1064,14 @@ struct hfi1_devdata *hfi1_alloc_devdata(struct pci_dev *pdev, size_t extra) goto bail; } + dd->send_schedule = alloc_percpu(u64); + if (!dd->send_schedule) { + ret = -ENOMEM; + hfi1_early_err(&pdev->dev, + "Could not allocate per-cpu int_counter\n"); + goto bail; + } + if (!hfi1_cpulist_count) { u32 count = num_online_cpus(); |