* [patch 03/19] user of the jiffies rounding code: e1000
@ 2007-03-06 10:41 akpm
2007-03-06 11:20 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2007-03-06 10:41 UTC (permalink / raw)
To: jeff; +Cc: netdev, akpm, arjan, auke-jan.h.kok
From: Arjan van de Ven <arjan@linux.intel.com>
Use the round_jiffies() function in e1000.
These timers all were of the "about once a second" or "about once every X
seconds" variety and several showed up in the "what wakes the cpu up" profiles
that the tickless patches provide. Some timers are highly dynamic based on
network load; but even on low activity systems they still show up so the
rounding is done only in cases of low activity, allowing higher frequency
timers in the high activity case.
The various hardware watchdogs are an obvious case; they run every 2 seconds
but aren't otherwise specific of exactly when they need to run.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/e1000/e1000_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff -puN drivers/net/e1000/e1000_main.c~user-of-the-jiffies-rounding-code-e1000 drivers/net/e1000/e1000_main.c
--- a/drivers/net/e1000/e1000_main.c~user-of-the-jiffies-rounding-code-e1000
+++ a/drivers/net/e1000/e1000_main.c
@@ -2652,7 +2652,7 @@ e1000_watchdog(unsigned long data)
netif_carrier_on(netdev);
netif_wake_queue(netdev);
- mod_timer(&adapter->phy_info_timer, jiffies + 2 * HZ);
+ mod_timer(&adapter->phy_info_timer, round_jiffies(jiffies + 2 * HZ));
adapter->smartspeed = 0;
} else {
/* make sure the receive unit is started */
@@ -2669,7 +2669,7 @@ e1000_watchdog(unsigned long data)
DPRINTK(LINK, INFO, "NIC Link is Down\n");
netif_carrier_off(netdev);
netif_stop_queue(netdev);
- mod_timer(&adapter->phy_info_timer, jiffies + 2 * HZ);
+ mod_timer(&adapter->phy_info_timer, round_jiffies(jiffies + 2 * HZ));
/* 80003ES2LAN workaround--
* For packet buffer work-around on link down event;
@@ -2721,7 +2721,7 @@ e1000_watchdog(unsigned long data)
e1000_rar_set(&adapter->hw, adapter->hw.mac_addr, 0);
/* Reset the timer */
- mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ);
+ mod_timer(&adapter->watchdog_timer, round_jiffies(jiffies + 2 * HZ));
}
enum latency_range {
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 03/19] user of the jiffies rounding code: e1000
2007-03-06 10:41 [patch 03/19] user of the jiffies rounding code: e1000 akpm
@ 2007-03-06 11:20 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-03-06 11:20 UTC (permalink / raw)
To: akpm; +Cc: netdev, arjan, auke-jan.h.kok
akpm@linux-foundation.org wrote:
> From: Arjan van de Ven <arjan@linux.intel.com>
>
> Use the round_jiffies() function in e1000.
>
> These timers all were of the "about once a second" or "about once every X
> seconds" variety and several showed up in the "what wakes the cpu up" profiles
> that the tickless patches provide. Some timers are highly dynamic based on
> network load; but even on low activity systems they still show up so the
> rounding is done only in cases of low activity, allowing higher frequency
> timers in the high activity case.
>
> The various hardware watchdogs are an obvious case; they run every 2 seconds
> but aren't otherwise specific of exactly when they need to run.
>
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
> Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
> Cc: Jeff Garzik <jeff@garzik.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/net/e1000/e1000_main.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
applied 3-4 to #upstream (2.6.22)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-06 11:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06 10:41 [patch 03/19] user of the jiffies rounding code: e1000 akpm
2007-03-06 11:20 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).