* Re: speed up udev-acl.mk
@ 2009-12-21 15:32 Martin Pitt
2009-12-21 15:38 ` Kay Sievers
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Martin Pitt @ 2009-12-21 15:32 UTC (permalink / raw)
To: linux-hotplug
Hey Kay,
Kay Sievers [2009-12-21 16:25 +0100]:
> If it's only about the ACL stuff, we could change the udev-acl logic
> to maintain hidden symlinks in:
> /dev/.udev/acl/c116:32 -> ../../snd/controlC1
>
> then the udev-acl program would just need to apply the same ACL to all
> nodes found in this directory. :)
This would be one option.
I thought about providing a special-case implementation of
udev_enumerate_scan_devices() which fires when there is only a
property match and nothing else. In this case we could just walk
/dev/.udev/db (which we have to do anyway to match the properties) and
skip the /sys walk. This would speedup other applications as well
which search for tagged devices.
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: speed up udev-acl.mk
2009-12-21 15:32 speed up udev-acl.mk Martin Pitt
@ 2009-12-21 15:38 ` Kay Sievers
2009-12-21 15:54 ` Martin Pitt
2009-12-21 16:10 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2009-12-21 15:38 UTC (permalink / raw)
To: linux-hotplug
On Mon, Dec 21, 2009 at 16:32, Martin Pitt <martin.pitt@ubuntu.com> wrote:
> Kay Sievers [2009-12-21 16:25 +0100]:
>> If it's only about the ACL stuff, we could change the udev-acl logic
>> to maintain hidden symlinks in:
>> Â /dev/.udev/acl/c116:32 -> ../../snd/controlC1
>>
>> then the udev-acl program would just need to apply the same ACL to all
>> nodes found in this directory. :)
>
> This would be one option.
>
> I thought about providing a special-case implementation of
> udev_enumerate_scan_devices() which fires when there is only a
> property match and nothing else. In this case we could just walk
> /dev/.udev/db (which we have to do anyway to match the properties) and
> skip the /sys walk. This would speedup other applications as well
> which search for tagged devices.
We do not distinguish at the moment between kernel properties and
udev-added properties. This would work only for udev-added stuff, and
break things which match on kernel-supplied properties which are
imported from the "uevent" file.
Kay
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: speed up udev-acl.mk
2009-12-21 15:32 speed up udev-acl.mk Martin Pitt
2009-12-21 15:38 ` Kay Sievers
@ 2009-12-21 15:54 ` Martin Pitt
2009-12-21 16:10 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Martin Pitt @ 2009-12-21 15:54 UTC (permalink / raw)
To: linux-hotplug
Martin Pitt [2009-12-21 16:32 +0100]:
> I thought about providing a special-case implementation of
> udev_enumerate_scan_devices() which fires when there is only a
> property match and nothing else. In this case we could just walk
> /dev/.udev/db (which we have to do anyway to match the properties) and
> skip the /sys walk.
On second look, we can't reliably/easily map the db to sys paths,
because of the linked devices in the db.
So let's skip this for now, and I'll rather look into doing some
smaller optimizations like b73bf332.
Thanks,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: speed up udev-acl.mk
2009-12-21 15:32 speed up udev-acl.mk Martin Pitt
2009-12-21 15:38 ` Kay Sievers
2009-12-21 15:54 ` Martin Pitt
@ 2009-12-21 16:10 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2009-12-21 16:10 UTC (permalink / raw)
To: linux-hotplug
On Mon, Dec 21, 2009 at 16:54, Martin Pitt <martin.pitt@ubuntu.com> wrote:
> Martin Pitt [2009-12-21 16:32 +0100]:
>> I thought about providing a special-case implementation of
>> udev_enumerate_scan_devices() which fires when there is only a
>> property match and nothing else. In this case we could just walk
>> /dev/.udev/db (which we have to do anyway to match the properties) and
>> skip the /sys walk.
>
> On second look, we can't reliably/easily map the db to sys paths,
> because of the linked devices in the db.
The db filename can intentionally not be used to find the sysfs
device. There have been external tools who did read the db directly
and we finally needed to stop them doing this. There is still the
major/minor in the db file, which could be used to find the sysfs
device, but it would still break the very same logic if used with
kernel properties instead of udev properties ...
> So let's skip this for now, and I'll rather look into doing some
> smaller optimizations like b73bf332.
Sounds good. Otherwise just go for the /dev/.udev/acl/ subdir. That
should work fine, if the rest can't be made fast enough.
Kay
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-21 16:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-21 15:32 speed up udev-acl.mk Martin Pitt
2009-12-21 15:38 ` Kay Sievers
2009-12-21 15:54 ` Martin Pitt
2009-12-21 16:10 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).