summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/nxge/nxge_main.c10
-rw-r--r--usr/src/uts/common/io/nxge/nxge_serialize.c8
2 files changed, 16 insertions, 2 deletions
diff --git a/usr/src/uts/common/io/nxge/nxge_main.c b/usr/src/uts/common/io/nxge/nxge_main.c
index dd66c01fad..1471bc7fe3 100644
--- a/usr/src/uts/common/io/nxge/nxge_main.c
+++ b/usr/src/uts/common/io/nxge/nxge_main.c
@@ -173,6 +173,16 @@ rtrace_t npi_rtracebuf;
uint32_t nxge_set_replay_timer = 1;
uint32_t nxge_replay_timeout = 0xc;
+/*
+ * The transmit serialization sometimes causes
+ * longer sleep before calling the driver transmit
+ * function as it sleeps longer than it should.
+ * The performace group suggests that a time wait tunable
+ * can be used to set the maximum wait time when needed
+ * and the default is set to 1 tick.
+ */
+uint32_t nxge_tx_serial_maxsleep = 1;
+
#if defined(sun4v)
/*
* Hypervisor N2/NIU services information.
diff --git a/usr/src/uts/common/io/nxge/nxge_serialize.c b/usr/src/uts/common/io/nxge/nxge_serialize.c
index 796f0cf70e..c6963f3764 100644
--- a/usr/src/uts/common/io/nxge/nxge_serialize.c
+++ b/usr/src/uts/common/io/nxge/nxge_serialize.c
@@ -35,6 +35,8 @@ extern proc_t p0;
extern int servicing_interrupt(void);
extern void bzero(void *, size_t);
+extern uint32_t nxge_tx_serial_maxsleep;
+
#ifdef _KERNEL
static void nxge_onetrack(void *p);
#else
@@ -297,8 +299,10 @@ nxge_onetrack(void *s)
*/
while (p->serialop(mp, p->cookie)) {
hrtime_t tns = p->avg * p->length;
- long wait = lbolt +
- drv_usectohz(tns / NXGE_TX_AVG_RES);
+ long wait = lbolt + min(
+ drv_usectohz(tns / NXGE_TX_AVG_RES),
+ nxge_tx_serial_maxsleep);
+
(void) cv_timedwait(&p->timecv,
&p->serial, wait);
if (p->s_state &