rules: avoid traversing parent of every single device?
Hi,
I've been looking at what is responsible for all the path lookup activity in coldplug. On my debian stable system, it looks like every device gets its parent looked up in sysfs. I think this is due to SUBSYSTEMS matches.
I see the udev default rules are different, but it looks like they still test for SUBSYSTEMS on every single device:
SUBSYSTEMS="scsi", ATTRS{type}="1|8", GROUP="tape" SUBSYSTEMS="scsi", ATTRS{type}="4|5", GROUP="cdrom" SUBSYSTEMS="scsi", ATTRS{type}="0", GROUP="disk"
Should we add SUBSYSTEM="scsi_generic" to these three rules?
Thanks
Alan
Quoted 7 lines · Alan Jenkins
I've been looking at what is responsible for all the path lookup activity in coldplug. On my debian stable system, it looks like every device gets its parent looked up in sysfs. I think this is due to SUBSYSTEMS matches.
I see the udev default rules are different, but it looks like they still test for SUBSYSTEMS on every single device:
Quoted 6 lines
SUBSYSTEMS="scsi", ATTRS{type}="1|8", GROUP="tape" SUBSYSTEMS="scsi", ATTRS{type}="4|5", GROUP="cdrom" SUBSYSTEMS="scsi", ATTRS{type}="0", GROUP="disk"
Should we add SUBSYSTEM="scsi_generic" to these three rules?
Sounds good. I think the "tape" will need a match for the actual scsi-tape devices too? The real "cdrom" and "disk" devices seems covered by explicit rules.
Thanks,
Kay
Quoted 14 lines · Kay Sievers
Quoted 12 lines · Alan Jenkins
I've been looking at what is responsible for all the path lookup activity in coldplug. On my debian stable system, it looks like every device gets its parent looked up in sysfs. I think this is due to SUBSYSTEMS matches.
I see the udev default rules are different, but it looks like they still test for SUBSYSTEMS on every single device:
SUBSYSTEMS="scsi", ATTRS{type}="1|8", GROUP="tape" SUBSYSTEMS="scsi", ATTRS{type}="4|5", GROUP="cdrom" SUBSYSTEMS="scsi", ATTRS{type}="0", GROUP="disk"
Quoted 7 lines
Quoted 2 lines
Should we add SUBSYSTEM="scsi_generic" to these three rules?
Sounds good. I think the "tape" will need a match for the actual scsi-tape devices too? The real "cdrom" and "disk" devices seems covered by explicit rules.
Yes, good catch.
Quoted 7 lines · Alan Jenkins
Quoted 5 lines
Quoted 1 line
Should we add SUBSYSTEM="scsi_generic" to these three rules?
Sounds good. I think the "tape" will need a match for the actual scsi-tape devices too? The real "cdrom" and "disk" devices seems covered by explicit rules.
Yes, good catch.
SUBSYSTEM="scsi_generic|scsi_tape", SUBSYSTEMS="scsi", ... should be fine.
Should I add all that, or do you have a patch already?
Kay
Quoted 8 lines · Kay Sievers
Quoted 6 lines · Alan Jenkins
Quoted 6 lines
Quoted 2 lines
Should we add SUBSYSTEM="scsi_generic" to these three rules?
Sounds good. I think the "tape" will need a match for the actual scsi-tape devices too? The real "cdrom" and "disk" devices seems covered by explicit rules.
Quoted 7 lines
Quoted 2 lines
Yes, good catch.
SUBSYSTEM="scsi_generic|scsi_tape", SUBSYSTEMS="scsi", ... should be fine.
Should I add all that, or do you have a patch already?
You can go ahead with that.
Quoted 3 lines · Alan Jenkins
Quoted 1 line
Should I add all that, or do you have a patch already?
You can go ahead with that.
Done.
Thanks,
Kay