Skip to content

Commit

Permalink
ehea: Use round_jiffies_relative to align workqueue
Browse files Browse the repository at this point in the history
Use round_jiffies_relative to align the ehea workqueue and avoid
extra wakeups.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Anton Blanchard authored and David S. Miller committed Nov 24, 2011
1 parent aa9084a commit 67c170a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/ibm/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,8 @@ static void ehea_update_stats(struct work_struct *work)
out_herr:
free_page((unsigned long)cb2);
resched:
schedule_delayed_work(&port->stats_work, msecs_to_jiffies(1000));
schedule_delayed_work(&port->stats_work,
round_jiffies_relative(msecs_to_jiffies(1000)));
}

static void ehea_refill_rq1(struct ehea_port_res *pr, int index, int nr_of_wqes)
Expand Down Expand Up @@ -2434,7 +2435,8 @@ static int ehea_open(struct net_device *dev)
}

mutex_unlock(&port->port_lock);
schedule_delayed_work(&port->stats_work, msecs_to_jiffies(1000));
schedule_delayed_work(&port->stats_work,
round_jiffies_relative(msecs_to_jiffies(1000)));

return ret;
}
Expand Down

0 comments on commit 67c170a

Please sign in to comment.