Skip to contentSkip to conversation

rules: avoid traversing parent of every single device?

DISCUSSION Alan Jenkins 2 participants 6 messages May 22, 2009

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
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

#2 lore raw
In reply to Alan Jenkins
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.

#3 lore raw
In reply to Alan Jenkins
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

#4 lore raw
In reply to Alan Jenkins
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.