On Sat, May 04, 2019 at 07:42:06AM +0000, Laurent Bercot wrote:
> 
> > If mdev is used as kernel hotplug helper and the system generates many
> > hotplug events it will quickly consume considerable resources because a
> > process is forked for each event and, if the mdev.seq feature is used,
> > they must also coordinate among each other. While the uevent applet
> > mitigates some of the resource problems you still have to pay the cost
> > for a fork/exec and parsing of mdev.conf for each event.
> 
>  Doing it that way spares the fork/exec indeed, but you're still
> parsing mdev.conf for every event. The parsing is done in
> make_device(), which is called at least once per event. And there's
> no way to prevent that - that's just how mdev is structured.
> To parse mdev.conf only once and have a really fast code path on
> event reception, you'd basically need to rewrite mdev entirely.

Actually that is not the case anymore. There was already code for the
'-s' case that parsed mdev.conf only once and stored the rules in
G.rule_vec. The daemon mode just reuses this. Maybe it could be
optimized further but it was sufficient for us.

>  Are you aware of https://skarnet.org/software/mdevd/ ? :)

Oh, actually not. Looks indeed interesting. I'll have a look...

Regards,
Jan
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to