From: Javier Martinez Canillas <javierm@redhat.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
Mark Brown <broonie@kernel.org>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>,
Rob Herring <robh@kernel.org>
Subject: Re: [PATCH] driver core: add a debugfs entry to show deferred devices
Date: Wed, 20 Jun 2018 11:04:38 +0200 [thread overview]
Message-ID: <c5ff2e6a-6bbf-deea-5250-7588b8046750@redhat.com> (raw)
In-Reply-To: <CAHp75VcOd5K+T6bkxyz3qgqNr4-=K9GGRh+DQ_qgW7dGKdzO5A@mail.gmail.com>
Hi Andy,
On 06/20/2018 01:43 AM, Andy Shevchenko wrote:
> On Wed, Jun 20, 2018 at 1:51 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
>> On Tue, Jun 19, 2018 at 10:59:14PM +0200, Javier Martinez Canillas wrote:
>>> For debugging purposes it may be useful to know what are the devices whose
>>> probe function was deferred. Add a debugfs entry showing that information.
>>>
>>> $ cat /sys/kernel/debug/deferred_devices
>>> 48070000.i2c:twl@48:bci
>>> musb-hdrc.0.auto
>>> omapdrm.0
>
>
>> And what is the use of this file? What can you do with this
>> information? Who is going to use it? Don't we have other deferred
>> probe debugging somewhere else?
>
> Indeed.
>
> Javier, have you tried to add 'initcall_debug' to a kernel command
> line followed by 'dyndbg="file drivers/base/dd.c +p"'?
>
I already mentioned this to Greg, but I'll elaborate a little bit. Using these
kernel cmdline options will only tell us when a driver for a device was probed
or deferred but it doesn't tell us what's left in the queue after all drivers
have been registered.
Yes, we could parse the kernel log and do some computation to figure out if a
deferred driver finally got probed, but I don't understand why we can't just
expose the deferred queue if the kernel already has that info and is useful?
But even if we do that, the current debug printouts are only enabled until
late_initcall time. So it won't print deferred probes for drivers registered
by modules:
static void deferred_probe_work_func(struct work_struct *work)
{
...
if (initcall_debug && !initcalls_done)
deferred_probe_debug(dev);
else
bus_probe_device(dev);
...
}
static int deferred_probe_initcall(void)
{
...
initcalls_done = true;
...
}
late_initcall(deferred_probe_initcall);
Again, we could change that but in my opinion we should try to make debug more
easier and this patch is quite trivial. The kernelci folks said that this will
be useful for them and allows to detect regressions on drivers' probe as early
as possible, which I think is very important.
Best regards,
--
Javier Martinez Canillas
Software Engineer - Desktop Hardware Enablement
Red Hat
next prev parent reply other threads:[~2018-06-20 9:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 20:59 Javier Martinez Canillas
2018-06-19 21:06 ` Andy Shevchenko
2018-06-19 22:51 ` Greg Kroah-Hartman
2018-06-19 23:43 ` Andy Shevchenko
2018-06-20 9:04 ` Javier Martinez Canillas [this message]
2018-06-20 8:46 ` Javier Martinez Canillas
2018-06-20 9:48 ` Javier Martinez Canillas
2018-06-20 10:54 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c5ff2e6a-6bbf-deea-5250-7588b8046750@redhat.com \
--to=javierm@redhat.com \
--cc=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tomeu.vizoso@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®