lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111123211354.74a81a88@kryten>
Date:	Wed, 23 Nov 2011 21:13:54 +1100
From:	Anton Blanchard <anton@...ba.org>
To:	cascardo@...ux.vnet.ibm.com
Cc:	netdev@...r.kernel.org
Subject: [PATCH 2/2] 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@...ba.org>
---

Index: linux-build/drivers/net/ethernet/ibm/ehea/ehea_main.c
===================================================================
--- linux-build.orig/drivers/net/ethernet/ibm/ehea/ehea_main.c	2011-11-23 16:04:23.941615040 +1100
+++ linux-build/drivers/net/ethernet/ibm/ehea/ehea_main.c	2011-11-23 16:04:55.654208250 +1100
@@ -371,7 +371,8 @@ static void ehea_update_stats(struct wor
 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)
@@ -2434,7 +2435,8 @@ static int ehea_open(struct net_device *
 	}
 
 	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;
 }
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ