Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1253610

Re: [GIT PULL] On-demand device probing

From Tomeu Vizoso <tomeu.vizoso@collabora.com>
Newsgroups linux.kernel
Subject Re: [GIT PULL] On-demand device probing
Date 2015-10-22 11:10 +0200
Message-ID <qmk2K-69B-29@gated-at.bofh.it> (permalink)
References (6 earlier) <qm47E-82T-3@gated-at.bofh.it> <qm4r3-8qy-73@gated-at.bofh.it> <qm6j8-2HH-23@gated-at.bofh.it> <qm8XF-6Ci-35@gated-at.bofh.it> <qm9Ao-7mh-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 21 October 2015 at 23:50, Frank Rowand <frowand.list@gmail.com> wrote:
> On 10/21/2015 2:12 PM, Rob Herring wrote:
>> On Wed, Oct 21, 2015 at 1:18 PM, Frank Rowand <frowand.list@gmail.com> wrote:
>>> On 10/21/2015 9:27 AM, Mark Brown wrote:
>>>> On Wed, Oct 21, 2015 at 08:59:51AM -0700, Frank Rowand wrote:
>>>>> On 10/19/2015 5:34 AM, Tomeu Vizoso wrote:
>>>>
>>>>>> To be clear, I was saying that this series should NOT affect total
>>>>>> boot times much.
>>>>
>>>>> I'm confused.  If I understood correctly, improving boot time was
>>>>> the key justification for accepting this patch set.  For example,
>>>>> from "[PATCH v7 0/20] On-demand device probing":
>>>>>
>>>>>    I have a problem with the panel on my Tegra Chromebook taking longer
>>>>>    than expected to be ready during boot (Stéphane Marchesin reported what
>>>>>    is basically the same issue in [0]), and have looked into ordered
>>>>>    probing as a better way of solving this than moving nodes around in the
>>>>>    DT or playing with initcall levels and linking order.
>>>>>
>>>>>    ...
>>>>>
>>>>>    With this series I get the kernel to output to the panel in 0.5s,
>>>>>    instead of 2.8s.
>>>>
>>>> Overall boot time and time to get some individual built in component up
>>>> and running aren't the same thing - what this'll do is get things up
>>>> more in the link order of the leaf consumers rather than deferring those
>>>> leaf consumers when their dependencies aren't ready yet.
>>>
>>> Thanks!  I read too much into what was being improved.
>>>
>>> So this patch series, which on other merits may be a good idea, is as
>>> a by product solving a specific ordering issue, moving successful panel
>>> initialization to an earlier point in the boot sequence, if I now
>>> understand more correctly.
>>>
>>> In that context, this seems like yet another ad hoc way of causing the
>>> probe order to change in a way to solves one specific issue?  Could
>>> it just as likely move the boot order of some other driver on some
>>> other board later, to the detriment of somebody else?
>>
>> Time to display on is important for many products. Having the console
>> up as early as possible is another case. CAN bus is another. This is a
>> real problem that is not just bad drivers.
>
> Yes, I agree.
>
> What I am seeing is that there continues to be a need for the ability
> to explicitly order at least some driver initialization (at some
> granularity), despite the push back against explicit ordering that
> has been present in the past.

The important point that I have struggled to explain is that right now
for downstreams to influence the order in which devices are probed,
they have to carry a substantial amount of patches that cannot be ever
upstreamed. This fiddling with initcall levels and link order means
changing files that are very frequently changing, increasing the
amount of work when rebasing and increasing the probability of
regressions after a rebase.

This just adds up to other shortcomings of mainline and ends up with
the net result of vendors getting stuck with 3.4 kernels on SoCs that
start production in 2015. Another consequence is that vendors don't
have a chance to upstream their stuff even if they cared. The
overarching goal of the project I'm in is to reduce those shortcomings
that downstreams have to workaround, to facilitate their involvement
upstream.

With this series, the order in which devices are probed becomes the
order in which they were registered, which is the order in which the
devices appear in the FW description of the hw or in the board files
(much more predictable, which makes for a more robust process). For DT
and board files, which cover a good part of the consumer devices
shipped today with Linux, the downstream could just change the order
of device nodes and get their display or whatever to probe before any
other devices.

And even if downstream's hw has a SoC .dtsi that exists in mainline,
they could add a step to their build process that automatically
reorders the nodes to avoid carrying changes to that DT fragment.

But that's moot currently because Greg believes that the time spent
probing devices at boot time could be reduced enough so that the order
in which devices are probed becomes irrelevant. IME that would have to
be under 200ms so that the user doesn't notice and that's unicorn-far
from any bootlog I have ever seen.

Given that downstreams are already carrying as many hacks as they
could think of to speed total boot up, I think this is effectively
telling them to go away.

Sorry for the rant,

Tomeu

>> I don't think it is completely ad hoc. Given all devices are
>> registered after drivers, drivers will still probe first in initcall
>> level order and then link order AFAIK. We may not take (more) initcall
>> level tweak hacks, but that is a much more simple change for
>> downstream. Don't get me wrong, I'd really like to see a way to
>> control order independent of initcall level.
>>
>> Rob
>
> Yep, it is not directly ad hoc, just a fortunate side effect in
> this case.  So just accidently ad hoc. :-)
>
> -Frank
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [GIT PULL] On-demand device probing Mark Brown <broonie@kernel.org> - 2015-10-18 21:40 +0200
  Re: [GIT PULL] On-demand device probing Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-18 21:40 +0200
    Re: [GIT PULL] On-demand device probing Mark Brown <broonie@kernel.org> - 2015-10-18 22:00 +0200
      Re: [GIT PULL] On-demand device probing David Woodhouse <dwmw2@infradead.org> - 2015-10-19 11:50 +0200
        Re: [GIT PULL] On-demand device probing Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-19 12:00 +0200
        Re: [GIT PULL] On-demand device probing Mark Brown <broonie@kernel.org> - 2015-10-19 13:10 +0200
        Re: [GIT PULL] On-demand device probing Rob Herring <robh+dt@kernel.org> - 2015-10-19 14:40 +0200
          Re: [GIT PULL] On-demand device probing David Woodhouse <dwmw2@infradead.org> - 2015-10-19 14:50 +0200
            Re: [GIT PULL] On-demand device probing Mark Brown <broonie@kernel.org> - 2015-10-19 17:00 +0200
              Re: [GIT PULL] On-demand device probing David Woodhouse <dwmw2@infradead.org> - 2015-10-19 17:40 +0200
                Re: [GIT PULL] On-demand device probing Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-19 17:50 +0200
                Re: [GIT PULL] On-demand device probing Uwe Kleine-König   <u.kleine-koenig@pengutronix.de> - 2015-10-19 20:30 +0200
                Re: [GIT PULL] On-demand device probing Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-19 20:50 +0200
                Re: [GIT PULL] On-demand device probing Alexandre Courbot <gnurou@gmail.com> - 2015-10-20 01:50 +0200
                Re: gpiod API considerations [Was: [GIT PULL] On-demand device  probing] Uwe Kleine-König   <u.kleine-koenig@pengutronix.de> - 2015-10-20 09:20 +0200
                Re: [GIT PULL] On-demand device probing David Woodhouse <dwmw2@infradead.org> - 2015-10-20 13:20 +0200
                Re: [GIT PULL] On-demand device probing Rob Herring <robh+dt@kernel.org> - 2015-10-19 18:00 +0200
                Re: [GIT PULL] On-demand device probing "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-19 23:20 +0200
                Re: [GIT PULL] On-demand device probing Rob Herring <robh@kernel.org> - 2015-10-20 01:00 +0200
                Re: [GIT PULL] On-demand device probing "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-20 09:30 +0200
                Re: [GIT PULL] On-demand device probing Rob Herring <robh@kernel.org> - 2015-10-20 16:20 +0200
                Re: [GIT PULL] On-demand device probing Alan Stern <stern@rowland.harvard.edu> - 2015-10-20 16:50 +0200
                Re: [GIT PULL] On-demand device probing Mark Brown <broonie@kernel.org> - 2015-10-20 17:40 +0200
                Re: [GIT PULL] On-demand device probing Alan Stern <stern@rowland.harvard.edu> - 2015-10-20 18:10 +0200
                Re: [GIT PULL] On-demand device probing Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-10-20 18:30 +0200
                Re: [GIT PULL] On-demand device probing Alan Stern <stern@rowland.harvard.edu> - 2015-10-20 19:20 +0200
                Re: [GIT PULL] On-demand device probing Mark Brown <broonie@kernel.org> - 2015-10-20 21:40 +0200
                Re: [GIT PULL] On-demand device probing "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-21 01:10 +0200
                Re: [GIT PULL] On-demand device probing Jean-Francois Moine <moinejf@free.fr> - 2015-10-21 08:20 +0200
                Re: [GIT PULL] On-demand device probing "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-22 02:30 +0200
                Re: [GIT PULL] On-demand device probing Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-10-22 11:20 +0200
                Re: [GIT PULL] On-demand device probing "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-27 05:40 +0100
                Re: [GIT PULL] On-demand device probing "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-21 01:10 +0200
                Re: [GIT PULL] On-demand device probing Geert Uytterhoeven <geert@linux-m68k.org> - 2015-10-21 11:00 +0200
                Re: [GIT PULL] On-demand device probing "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-22 01:20 +0200
                Re: [GIT PULL] On-demand device probing Mark Brown <broonie@kernel.org> - 2015-10-19 18:10 +0200
      Re: [GIT PULL] On-demand device probing Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-10-19 14:40 +0200
        Re: [GIT PULL] On-demand device probing Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-19 15:20 +0200
          Re: [GIT PULL] On-demand device probing Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-10-19 16:20 +0200
            Re: [GIT PULL] On-demand device probing Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-19 16:40 +0200
              Re: [GIT PULL] On-demand device probing Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-10-19 17:10 +0200
                Re: [GIT PULL] On-demand device probing Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-19 17:40 +0200
                Re: [GIT PULL] On-demand device probing Geert Uytterhoeven <geert@linux-m68k.org> - 2015-10-19 18:30 +0200
                Re: [GIT PULL] On-demand device probing Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-19 18:50 +0200
                Re: Alternative approach to solve the deferred probe (was: [GIT  PULL] On-demand device probing) Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-20 17:50 +0200
                Re: Alternative approach to solve the deferred probe Frank Rowand <frowand.list@gmail.com> - 2015-10-21 06:00 +0200
                Re: Alternative approach to solve the deferred probe Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-21 10:20 +0200
                Re: Alternative approach to solve the deferred probe Frank Rowand <frowand.list@gmail.com> - 2015-10-21 17:40 +0200
                Re: Alternative approach to solve the deferred probe Grygorii Strashko <grygorii.strashko@ti.com> - 2015-10-21 19:00 +0200
                Re: Alternative approach to solve the deferred probe Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-21 19:30 +0200
                Re: Alternative approach to solve the deferred probe Grygorii Strashko <grygorii.strashko@ti.com> - 2015-10-21 20:20 +0200
                Re: Alternative approach to solve the deferred probe Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-21 20:30 +0200
                Re: Alternative approach to solve the deferred probe Grygorii Strashko <grygorii.strashko@ti.com> - 2015-10-22 17:20 +0200
                Re: Alternative approach to solve the deferred probe Frank Rowand <frowand.list@gmail.com> - 2015-10-21 20:10 +0200
                Re: Alternative approach to solve the deferred probe Grygorii Strashko <grygorii.strashko@ti.com> - 2015-10-21 20:40 +0200
                Re: Alternative approach to solve the deferred probe Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-21 22:40 +0200
                Re: Alternative approach to solve the deferred probe Frank Rowand <frowand.list@gmail.com> - 2015-10-22 02:10 +0200
                Re: Alternative approach to solve the deferred probe (was: [GIT  PULL] On-demand device probing) Mark Brown <broonie@kernel.org> - 2015-10-23 01:40 +0200
        Re: [GIT PULL] On-demand device probing Frank Rowand <frowand.list@gmail.com> - 2015-10-21 18:10 +0200
          Re: [GIT PULL] On-demand device probing Mark Brown <broonie@kernel.org> - 2015-10-21 18:30 +0200
            Re: [GIT PULL] On-demand device probing Frank Rowand <frowand.list@gmail.com> - 2015-10-21 20:30 +0200
              Re: [GIT PULL] On-demand device probing Mark Brown <broonie@kernel.org> - 2015-10-21 23:10 +0200
              Re: [GIT PULL] On-demand device probing Rob Herring <robh+dt@kernel.org> - 2015-10-21 23:20 +0200
                Re: [GIT PULL] On-demand device probing Frank Rowand <frowand.list@gmail.com> - 2015-10-22 00:00 +0200
                Re: [GIT PULL] On-demand device probing Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-10-22 11:10 +0200
                Re: [GIT PULL] On-demand device probing Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-22 16:40 +0200
                Re: [GIT PULL] On-demand device probing Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-22 16:50 +0200
                Re: [GIT PULL] On-demand device probing Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-10-22 17:10 +0200
                Re: [GIT PULL] On-demand device probing Mark Brown <broonie@kernel.org> - 2015-10-23 01:40 +0200
                Re: [GIT PULL] On-demand device probing Frank Rowand <frowand.list@gmail.com> - 2015-10-22 21:00 +0200
                Re: [GIT PULL] On-demand device probing Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-22 21:30 +0200
                Re: [GIT PULL] On-demand device probing Tim Bird <tim.bird@sonymobile.com> - 2015-10-23 17:50 +0200
                Re: [GIT PULL] On-demand device probing Rob Herring <robh+dt@kernel.org> - 2015-10-23 18:40 +0200
                Re: [GIT PULL] On-demand device probing "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-24 15:50 +0200
                Re: [GIT PULL] On-demand device probing Mark Brown <broonie@kernel.org> - 2015-10-25 00:10 +0200
                Re: [GIT PULL] On-demand device probing "Rafael J. Wysocki" <rafael@kernel.org> - 2015-10-25 15:00 +0100
                Re: [GIT PULL] On-demand device probing Mark Brown <broonie@kernel.org> - 2015-10-26 02:20 +0100
                Re: [GIT PULL] On-demand device probing Michael Turquette <mturquette@baylibre.com> - 2015-10-26 12:00 +0100
                Re: [GIT PULL] On-demand device probing Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-10-26 14:00 +0100
                Re: [GIT PULL] On-demand device probing "Rafael J. Wysocki" <rafael@kernel.org> - 2015-10-27 00:40 +0100
                Re: [GIT PULL] On-demand device probing "Andrew F. Davis" <afd@ti.com> - 2015-10-25 20:50 +0100
                Re: [GIT PULL] On-demand device probing Geert Uytterhoeven <geert@linux-m68k.org> - 2015-10-24 20:00 +0200

csiph-web