* sysfs deferred_probe attribute
@ 2017-01-12 17:27 Rob Herring
2017-01-12 17:41 ` Greg Kroah-Hartman
2017-01-12 19:46 ` Geert Uytterhoeven
0 siblings, 2 replies; 6+ messages in thread
From: Rob Herring @ 2017-01-12 17:27 UTC (permalink / raw)
To: Greg Kroah-Hartman, Ben Hutchings
Cc: Rafael J. Wysocki, Mark Brown, Tomeu Vizoso, Geert Uytterhoeven,
linux-kernel@vger.kernel.org, Thierry Reding
I just noticed that we have a new device attribute 'deferred_probe'
added in 4.10 with this commit:
commit 6751667a29d6fd64afb9ce30567ad616b68ed789
Author: Ben Hutchings <ben.hutchings@codethink.co.uk>
Date: Tue Aug 16 14:34:18 2016 +0100
driver core: Add deferred_probe attribute to devices in sysfs
It is sometimes useful to know that a device is on the deferred probe
list rather than, say, not having a driver available. Expose this
information to user-space.
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
It seems like a bad idea to add an ABI for an internal kernel feature.
When/if we replace deferred probe with something better based on
functional dependencies are we going to keep this attr around? Or
remove it and assume no userspace uses it? Perhaps it should be hidden
behind CONFIG_DEBUG or just make a debugfs file that lists the
deferred list. Then you wouldn't have to hunt for what got deferred.
Rob
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: sysfs deferred_probe attribute 2017-01-12 17:27 sysfs deferred_probe attribute Rob Herring @ 2017-01-12 17:41 ` Greg Kroah-Hartman 2017-01-12 18:26 ` Ben Hutchings 2017-01-12 19:46 ` Geert Uytterhoeven 1 sibling, 1 reply; 6+ messages in thread From: Greg Kroah-Hartman @ 2017-01-12 17:41 UTC (permalink / raw) To: Rob Herring Cc: Ben Hutchings, Rafael J. Wysocki, Mark Brown, Tomeu Vizoso, Geert Uytterhoeven, linux-kernel@vger.kernel.org, Thierry Reding On Thu, Jan 12, 2017 at 11:27:01AM -0600, Rob Herring wrote: > I just noticed that we have a new device attribute 'deferred_probe' > added in 4.10 with this commit: > > commit 6751667a29d6fd64afb9ce30567ad616b68ed789 > Author: Ben Hutchings <ben.hutchings@codethink.co.uk> > Date: Tue Aug 16 14:34:18 2016 +0100 > > driver core: Add deferred_probe attribute to devices in sysfs > > It is sometimes useful to know that a device is on the deferred probe > list rather than, say, not having a driver available. Expose this > information to user-space. > > Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > It seems like a bad idea to add an ABI for an internal kernel feature. > When/if we replace deferred probe with something better based on > functional dependencies are we going to keep this attr around? Or > remove it and assume no userspace uses it? Perhaps it should be hidden > behind CONFIG_DEBUG or just make a debugfs file that lists the > deferred list. Then you wouldn't have to hunt for what got deferred. Ah, debugfs would be nice, I'd much prefer that. I don't know how Ben is using this, but I think that would make more sense to me. thanks, greg k-h ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sysfs deferred_probe attribute 2017-01-12 17:41 ` Greg Kroah-Hartman @ 2017-01-12 18:26 ` Ben Hutchings 2017-01-13 7:42 ` Tomeu Vizoso 2017-01-14 13:15 ` Greg Kroah-Hartman 0 siblings, 2 replies; 6+ messages in thread From: Ben Hutchings @ 2017-01-12 18:26 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Rob Herring, Rafael J. Wysocki, Mark Brown, Tomeu Vizoso, Geert Uytterhoeven, linux-kernel@vger.kernel.org, Thierry Reding On Thu, 2017-01-12 at 18:41 +0100, Greg Kroah-Hartman wrote: > On Thu, Jan 12, 2017 at 11:27:01AM -0600, Rob Herring wrote: > > I just noticed that we have a new device attribute 'deferred_probe' > > added in 4.10 with this commit: > > > > commit 6751667a29d6fd64afb9ce30567ad616b68ed789 > > Author: Ben Hutchings <ben.hutchings@codethink.co.uk> > > Date: Tue Aug 16 14:34:18 2016 +0100 > > > > driver core: Add deferred_probe attribute to devices in sysfs > > > > It is sometimes useful to know that a device is on the deferred probe > > list rather than, say, not having a driver available. Expose this > > information to user-space. > > > > Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > > > > It seems like a bad idea to add an ABI for an internal kernel feature. > > When/if we replace deferred probe with something better based on > > functional dependencies are we going to keep this attr around? Or > > remove it and assume no userspace uses it? It should be removed then (and replaced with some kind of representation of dependencies). > > Perhaps it should be hidden > > behind CONFIG_DEBUG or just make a debugfs file that lists the > > deferred list. Then you wouldn't have to hunt for what got deferred. > > Ah, debugfs would be nice, I'd much prefer that. I don't know how Ben > is using this, but I think that would make more sense to me. I'm not using it any programmatic way, and don't intend to. debugfs would be OK, but attaching it to devices was easy to do and seemed to make sense. Ben. -- Ben Hutchings Software Developer, Codethink Ltd. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sysfs deferred_probe attribute 2017-01-12 18:26 ` Ben Hutchings @ 2017-01-13 7:42 ` Tomeu Vizoso 2017-01-14 13:15 ` Greg Kroah-Hartman 1 sibling, 0 replies; 6+ messages in thread From: Tomeu Vizoso @ 2017-01-13 7:42 UTC (permalink / raw) To: Ben Hutchings, Greg Kroah-Hartman Cc: Rob Herring, Rafael J. Wysocki, Mark Brown, Geert Uytterhoeven, linux-kernel@vger.kernel.org, Thierry Reding, Russell King On 01/12/2017 07:26 PM, Ben Hutchings wrote: > On Thu, 2017-01-12 at 18:41 +0100, Greg Kroah-Hartman wrote: >> On Thu, Jan 12, 2017 at 11:27:01AM -0600, Rob Herring wrote: >>> I just noticed that we have a new device attribute 'deferred_probe' >>> added in 4.10 with this commit: >>> >>> commit 6751667a29d6fd64afb9ce30567ad616b68ed789 >>> Author: Ben Hutchings <ben.hutchings@codethink.co.uk> >>> Date: Tue Aug 16 14:34:18 2016 +0100 >>> >>> driver core: Add deferred_probe attribute to devices in sysfs >>> >>> It is sometimes useful to know that a device is on the deferred probe >>> list rather than, say, not having a driver available. Expose this >>> information to user-space. >>> >>> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> >>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> >>> >>> >>> It seems like a bad idea to add an ABI for an internal kernel feature. >>> When/if we replace deferred probe with something better based on >>> functional dependencies are we going to keep this attr around? Or >>> remove it and assume no userspace uses it? > > It should be removed then (and replaced with some kind of representation > of dependencies). > >>> Perhaps it should be hidden >>> behind CONFIG_DEBUG or just make a debugfs file that lists the >>> deferred list. Then you wouldn't have to hunt for what got deferred. >> >> Ah, debugfs would be nice, I'd much prefer that. I don't know how Ben >> is using this, but I think that would make more sense to me. > > I'm not using it any programmatic way, and don't intend to. debugfs > would be OK, but attaching it to devices was easy to do and seemed to > make sense. Russell King started work on printing those devices in the deferred queue at late_initcall, not sure why it didn't land. But note that without proper dependency information, you cannot know for sure if a device deferred its probe just because a dependency doesn't have a matching driver. Regards, Tomeu ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sysfs deferred_probe attribute 2017-01-12 18:26 ` Ben Hutchings 2017-01-13 7:42 ` Tomeu Vizoso @ 2017-01-14 13:15 ` Greg Kroah-Hartman 1 sibling, 0 replies; 6+ messages in thread From: Greg Kroah-Hartman @ 2017-01-14 13:15 UTC (permalink / raw) To: Ben Hutchings Cc: Rob Herring, Rafael J. Wysocki, Mark Brown, Tomeu Vizoso, Geert Uytterhoeven, linux-kernel@vger.kernel.org, Thierry Reding On Thu, Jan 12, 2017 at 06:26:11PM +0000, Ben Hutchings wrote: > On Thu, 2017-01-12 at 18:41 +0100, Greg Kroah-Hartman wrote: > > On Thu, Jan 12, 2017 at 11:27:01AM -0600, Rob Herring wrote: > > > I just noticed that we have a new device attribute 'deferred_probe' > > > added in 4.10 with this commit: > > > > > > commit 6751667a29d6fd64afb9ce30567ad616b68ed789 > > > Author: Ben Hutchings <ben.hutchings@codethink.co.uk> > > > Date: Tue Aug 16 14:34:18 2016 +0100 > > > > > > driver core: Add deferred_probe attribute to devices in sysfs > > > > > > It is sometimes useful to know that a device is on the deferred probe > > > list rather than, say, not having a driver available. Expose this > > > information to user-space. > > > > > > Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> > > > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > > > > > > > It seems like a bad idea to add an ABI for an internal kernel feature. > > > When/if we replace deferred probe with something better based on > > > functional dependencies are we going to keep this attr around? Or > > > remove it and assume no userspace uses it? > > It should be removed then (and replaced with some kind of representation > of dependencies). Ok, now reverted. thanks, greg k-h ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sysfs deferred_probe attribute 2017-01-12 17:27 sysfs deferred_probe attribute Rob Herring 2017-01-12 17:41 ` Greg Kroah-Hartman @ 2017-01-12 19:46 ` Geert Uytterhoeven 1 sibling, 0 replies; 6+ messages in thread From: Geert Uytterhoeven @ 2017-01-12 19:46 UTC (permalink / raw) To: Rob Herring Cc: Greg Kroah-Hartman, Ben Hutchings, Rafael J. Wysocki, Mark Brown, Tomeu Vizoso, linux-kernel@vger.kernel.org, Thierry Reding Hi Rob, On Thu, Jan 12, 2017 at 6:27 PM, Rob Herring <robh@kernel.org> wrote: > I just noticed that we have a new device attribute 'deferred_probe' > added in 4.10 with this commit: > > commit 6751667a29d6fd64afb9ce30567ad616b68ed789 > Author: Ben Hutchings <ben.hutchings@codethink.co.uk> > Date: Tue Aug 16 14:34:18 2016 +0100 > > driver core: Add deferred_probe attribute to devices in sysfs > > It is sometimes useful to know that a device is on the deferred probe > list rather than, say, not having a driver available. Expose this > information to user-space. > > Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > > It seems like a bad idea to add an ABI for an internal kernel feature. > When/if we replace deferred probe with something better based on > functional dependencies are we going to keep this attr around? Or > remove it and assume no userspace uses it? Perhaps it should be hidden > behind CONFIG_DEBUG or just make a debugfs file that lists the > deferred list. Then you wouldn't have to hunt for what got deferred. FWIW, I had just created a "check-deferred-probe" script that does find /sys -name deferred_probe -print0 | xargs -0 grep -v '^0$' A list would be even better, from the point of view of the user. As I haven't looked at the implementation, I don't know what impact that would have on the system due to e.g. locking. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-14 13:14 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-01-12 17:27 sysfs deferred_probe attribute Rob Herring 2017-01-12 17:41 ` Greg Kroah-Hartman 2017-01-12 18:26 ` Ben Hutchings 2017-01-13 7:42 ` Tomeu Vizoso 2017-01-14 13:15 ` Greg Kroah-Hartman 2017-01-12 19:46 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox