aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorKrishna Kumar <krkumar2@in.ibm.com>2006-10-17 00:39:09 -0400
committerRoland Dreier <rolandd@cisco.com>2006-11-29 18:33:05 -0500
commitf115db4803effd8207c3169590fb3f13336a4093 (patch)
treee485659a0593e06583a661ec83e20647d90a964e /drivers/infiniband
parente4022274cf8df1f78f9e20ba7e199a9edf655422 (diff)
RDMA/addr: Use time_after_eq() instead of time_after() in queue_req()
In queue_req(), use time_after_eq() instead of time_after() for following reasons : - Improves insert time if multiple entries with same time are present. - set_timeout need not be called if entry with same time is added to the list (and that happens to be the entry with the smallest time), saving atomic/locking operations. - Earlier entries with same time are deleted first (fifo). Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Acked-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/addr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index e11187ecc931..a68d7c7df4ca 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -139,7 +139,7 @@ static void queue_req(struct addr_req *req)
139 139
140 mutex_lock(&lock); 140 mutex_lock(&lock);
141 list_for_each_entry_reverse(temp_req, &req_list, list) { 141 list_for_each_entry_reverse(temp_req, &req_list, list) {
142 if (time_after(req->timeout, temp_req->timeout)) 142 if (time_after_eq(req->timeout, temp_req->timeout))
143 break; 143 break;
144 } 144 }
145 145