diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2012-05-02 11:21:53 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-05-14 15:36:18 -0400 |
commit | cca195a168ac062967fd1fa75c75546167b1e213 (patch) | |
tree | f0d5c473d9306e9c6d1c1761d16bb1f72dfbf0ce /drivers/infiniband/hw/qib/qib_driver.c | |
parent | 8473c60314f5a225019a25bcd13763d42d988827 (diff) |
IB/qib: Add prefetch for eager buffers
Add a prefetch call when a packet has been stored. The nature of the
prefetch is correctly determined by the alternatives mechanism.
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_driver.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_driver.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qib/qib_driver.c b/drivers/infiniband/hw/qib/qib_driver.c index 6fc9365ba8a6..8895cfec5019 100644 --- a/drivers/infiniband/hw/qib/qib_driver.c +++ b/drivers/infiniband/hw/qib/qib_driver.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/netdevice.h> | 38 | #include <linux/netdevice.h> |
39 | #include <linux/vmalloc.h> | 39 | #include <linux/vmalloc.h> |
40 | #include <linux/module.h> | 40 | #include <linux/module.h> |
41 | #include <linux/prefetch.h> | ||
41 | 42 | ||
42 | #include "qib.h" | 43 | #include "qib.h" |
43 | 44 | ||
@@ -481,8 +482,10 @@ u32 qib_kreceive(struct qib_ctxtdata *rcd, u32 *llic, u32 *npkts) | |||
481 | etail = qib_hdrget_index(rhf_addr); | 482 | etail = qib_hdrget_index(rhf_addr); |
482 | updegr = 1; | 483 | updegr = 1; |
483 | if (tlen > sizeof(*hdr) || | 484 | if (tlen > sizeof(*hdr) || |
484 | etype >= RCVHQ_RCV_TYPE_NON_KD) | 485 | etype >= RCVHQ_RCV_TYPE_NON_KD) { |
485 | ebuf = qib_get_egrbuf(rcd, etail); | 486 | ebuf = qib_get_egrbuf(rcd, etail); |
487 | prefetch_range(ebuf, tlen - sizeof(*hdr)); | ||
488 | } | ||
486 | } | 489 | } |
487 | if (!eflags) { | 490 | if (!eflags) { |
488 | u16 lrh_len = be16_to_cpu(hdr->lrh[2]) << 2; | 491 | u16 lrh_len = be16_to_cpu(hdr->lrh[2]) << 2; |