Skip to content

Commit

Permalink
IPoIB: Use round_jiffies() for ah_reap_task
Browse files Browse the repository at this point in the history
Use round_jiffies() to align the 1 second ah_reap_task with other work
and potentially save power by sleeping cores for longer.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Anton Blanchard authored and Roland Dreier committed Oct 16, 2007
1 parent d02d1f5 commit 69fc507
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/infiniband/ulp/ipoib/ipoib_ib.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ void ipoib_reap_ah(struct work_struct *work)
__ipoib_reap_ah(dev);

if (!test_bit(IPOIB_STOP_REAPER, &priv->flags))
queue_delayed_work(ipoib_workqueue, &priv->ah_reap_task, HZ);
queue_delayed_work(ipoib_workqueue, &priv->ah_reap_task,
round_jiffies_relative(HZ));
}

int ipoib_ib_dev_open(struct net_device *dev)
Expand Down Expand Up @@ -472,7 +473,8 @@ int ipoib_ib_dev_open(struct net_device *dev)
}

clear_bit(IPOIB_STOP_REAPER, &priv->flags);
queue_delayed_work(ipoib_workqueue, &priv->ah_reap_task, HZ);
queue_delayed_work(ipoib_workqueue, &priv->ah_reap_task,
round_jiffies_relative(HZ));

set_bit(IPOIB_FLAG_INITIALIZED, &priv->flags);

Expand Down

0 comments on commit 69fc507

Please sign in to comment.