Subject: Re: sk(4) interrupt moderation timing fix, and sysctl support
To: None <>
From: Jeff Rizzo <>
List: tech-net
Date: 11/27/2005 14:23:34
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

(Jonathan - I dropped you from the CC: because your address in the
headers appears to have a forwarding loop, whereas you're clearly
receiving mailing list traffic)

Jonathan Stone wrote:

>In message <>Jeff Rizzo writes
>>On Thu, Nov 24, 2005 at 09:49:39AM -0800, Jeff Rizzo wrote:
>>>Jason Thorpe wrote:
>>>>Seems like it should be per-instance rather than global, especially
>>>>if different revisions of the chip need to have different values.
>I have to disagree here. My eventual intent was to add support for
>dynamic auto-tuning of interrupt mitigation. For that, one really
>needs to apply *global* moderation, for stability reasons: either all
>devices stay at their current moderation level, or all go up a little,
>or all go down a little.
>>Here's a new patch - if this looks OK to folks, I'll commit it.
>Can you keep support for global hooks which go up or down one notch,
>even if they're not exposed to userland?

There was no dynamic tuning support at all before - one of the goals of
this patch was to have _something_ rather than nothing in that respect. 
Whereas I agree that the global state which modifies all devices is a
good target, it's beyond my current level of patience (and possibly
skill).  I will admit to not really understanding the algorithm used in
the bge(4) driver - what's in these patches for sk(4) is clearly much
simpler and more manual.  It's also (I think - please correct me if I'm
wrong) better than what's currently there - you can actually _change_ it
without recompiling your kernel.  While it doesn't give the right tools
to be used by a global framework, it gives an individual sysadmin
something to tweak for his workload.

Realistically speaking, I'm not going to work on the global framework at
this time.  However, as I become more familiar with the innards of our
network drivers, over time I may come to the point where I do want to
work on it.  (Looking at the Marvell sk98lin driver, it seems like Linux
has something similar to what you're talking about - dynamic feedback to
control the interrupt mitigation)  However, as it stands now, sk(4)
needs work, and I'd like to bring it in line (at least) with how it
performs under FreeBSD and OpenBSD - so I'd like to commit this
interrupt moderation in one form or another soonish, so I can move
forward with the rest of the "modernization".  Once the overall state of
it is better, I may have the headspace to think about global issues.

So - I can either commit this as-is, or I can roll back to an
'sk-global' interrupt moderation timer.  Anyone else have any thoughts?


Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird -