[systemd-devel] [FIX] SANE udev rules processing performance

Marcin Kocur marcin2006 at gmail.com
Sun Dec 6 10:13:48 UTC 2020


Oh, I hate when Thunderbird forces e-mail formatting... here's the fixed 
content:

Hi all,
could someone with greater experience than mine address SANE's developer 
concerns about performance of changing |ACTION!="add" to 
ACTION=="remove" for processing all SANE rules? On my system they're 
located at:

/usr/lib/udev/rules.d/49-sane.rules:

*ACTION=="remove", GOTO="libsane_rules_end"*
ENV{DEVTYPE}=="usb_device", GOTO="libsane_create_usb_dev"
SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
SUBSYSTEM=="usb_device", GOTO="libsane_usb_rules_begin"
SUBSYSTEM!="usb_device", GOTO="libsane_usb_rules_end"

This is the change:


https://gitlab.com/marcin2006/backends/-/commit/1042a61c30e5ed3131f134290dea3820a70a3185


The concern is:
"Recalling #341 (closed), I do have some concerns about efficiency now 
that those 650+ USB rules get processed for every non-removal event 
rather than only for additions."

If you could answer in the MR comments, that would also be fine:

https://gitlab.com/sane-project/backends/-/merge_requests/541

Sorry for the stupid request, but I'm just a SANE user who tries to fix 
his (and everyone's else) scanners. I don't have much knowledge about 
udev rules processing performance.

-- 
Pozdrawiam / Greetings
Marcin Kocur █



More information about the systemd-devel mailing list