On Thu, Jan 24, 2002 at 07:47:29AM -0800, David S. Miller wrote:
> From: Jeff Garzik <jgarzik@xxxxxxxxxxxxxxxx>
> Date: Thu, 24 Jan 2002 10:39:05 -0500
>
> I have very little preference for the interface, besides -not-
> dumping yet another random file into procfs...
>
> Since netlink is available always now, let's use that.
Advantage of netlink is that it can block -- with /proc polling is always
needed.
e.g. one could add setting of reporting thresholds to the interface and let
netlink send a message when the counter overflows it. This way a statistic
gathering tool could sleep and only wake up when something interesting happens.
[it's a real problem - when you have a whole gnome or windowmaker panel
of statistics reporting tools around it can chew up a not insignificant amount
of CPU time because they all wake up regularly and check /proc if nothing
has changed]
Problem is only that sending rtnetlink messages from hard interrupt context
does not work very well, but it can be handled by using queue_event().
-Andi
|