The following patch is a bit of a hack to illustrate how the qos
parameter infrastructure can communication information to the e1000
driver to use to set interrupt consolidation policy as a function of
acceptable network latency.
Its just an example.
Signed-off-by: Mark Gross <mgross@linux.intel.com>
diff -urN -X linux-2.6.23-rc8/Documentation/dontdiff linux-2.6.23-rc8-qos-nolatency.c/drivers/net/e1000/e1000_main.c linux-2.6.23-rc8-qos-apps/drivers/net/e1000/e1000_main.c
--- linux-2.6.23-rc8-qos-nolatency.c/drivers/net/e1000/e1000_main.c 2007-09-26 13:54:33.000000000 -0700
+++ linux-2.6.23-rc8-qos-apps/drivers/net/e1000/e1000_main.c 2007-09-26 15:00:17.000000000 -0700
@@ -27,6 +27,7 @@
*******************************************************************************/
#include "e1000.h"
+#include <linux/qos_params.h>
#include <net/ip6_checksum.h>
char e1000_driver_name[] = "e1000";
@@ -2764,6 +2765,7 @@
{
unsigned int retval = itr_setting;
struct e1000_hw *hw = &adapter->hw;
+ int requested_latency = qos_requirement(QOS_NETWORK_LATENCY);
if (unlikely(hw->mac_type < e1000_82540))
goto update_itr_done;
@@ -2803,6 +2805,13 @@
break;
}
+ if (requested_latency < 50)
+ retval = lowest_latency;
+ else if (requested_latency < 250)
+ retval = low_latency;
+ else
+ ; //don't change the current algorithm
+
update_itr_done:
return retval;
}
-
| Linus Torvalds | Linux 2.6.27-rc5 |
| Ingo Molnar | [announce] "kill the Big Kernel Lock (BKL)" tree |
| Christoph Lameter | Re: [RFC 00/15] x86_64: Optimize percpu accesses |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Jarek Poplawski | [PATCH iproute2] Re: HTB accuracy for high speed |
