Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ehea: Use round_jiffies_relative to align workqueue

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>

authored by

Anton Blanchard and committed by
David S. Miller
67c170a2 aa9084a0

+4 -2
+4 -2
drivers/net/ethernet/ibm/ehea/ehea_main.c
··· 371 371 out_herr: 372 372 free_page((unsigned long)cb2); 373 373 resched: 374 - schedule_delayed_work(&port->stats_work, msecs_to_jiffies(1000)); 374 + schedule_delayed_work(&port->stats_work, 375 + round_jiffies_relative(msecs_to_jiffies(1000))); 375 376 } 376 377 377 378 static void ehea_refill_rq1(struct ehea_port_res *pr, int index, int nr_of_wqes) ··· 2435 2434 } 2436 2435 2437 2436 mutex_unlock(&port->port_lock); 2438 - schedule_delayed_work(&port->stats_work, msecs_to_jiffies(1000)); 2437 + schedule_delayed_work(&port->stats_work, 2438 + round_jiffies_relative(msecs_to_jiffies(1000))); 2439 2439 2440 2440 return ret; 2441 2441 }