Commit 69fc507a authored by Anton Blanchard's avatar Anton Blanchard Committed by Roland Dreier

IPoIB: Use round_jiffies() for ah_reap_task

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: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent d02d1f53
...@@ -436,7 +436,8 @@ void ipoib_reap_ah(struct work_struct *work) ...@@ -436,7 +436,8 @@ void ipoib_reap_ah(struct work_struct *work)
__ipoib_reap_ah(dev); __ipoib_reap_ah(dev);
if (!test_bit(IPOIB_STOP_REAPER, &priv->flags)) 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) int ipoib_ib_dev_open(struct net_device *dev)
...@@ -472,7 +473,8 @@ int ipoib_ib_dev_open(struct net_device *dev) ...@@ -472,7 +473,8 @@ int ipoib_ib_dev_open(struct net_device *dev)
} }
clear_bit(IPOIB_STOP_REAPER, &priv->flags); 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); set_bit(IPOIB_FLAG_INITIALIZED, &priv->flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment