On Mon, 16 Mar 2015 18:13:17 +0100 Harald Becker <[email protected]> wrote:
> On 16.03.2015 08:16, Natanael Copa wrote: > > This give me exactly what I am interested in: a hotplug handler that is > > fast while keep memory consumption at a minimal during long periods > > with no events. > > This is the essential of your message, I would give *you* the expected > result, but not to everybody else. That is correct. A netlink socket activator is completely useless for those who don't want read events from netlink. I am perfectly happy that not *everybody* else wants to read from netlink and I am happy that most of those people simply ignore my code in silence. > What about the ability of logging and debugging purposes? And I don't > talk about debugging netlink / mdev / xdev code, I mean debugging kernel > device event messages. Your approach would need a separate new piece of > code (socket / netlink aware), to handle those, Correct. It does absolutely no reading. To actually read from a netlink socket you need more code that is netlink aware. I just want avoid having that code in memory when there are no events to read. That is the only value this code brings to the table. > whereas a slightly > different approach gives more modularity and compatibility with other > Unix tools, e.g. > > netlink reader | tee /dev/ttyX | device operation handler This looks good to me. If you want avoid that this netlink reader in your example is in memory at all times, then feel free to use my netlink socket activator to activate it. Otherwise, please ignore it. > (Yes this is a normal pipe, used in shell scripts, to display all > incoming event messages on a specific console). -nc _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
