All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saravana Kannan <saravanak@google.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Sascha Hauer <sha@pengutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Kevin Hilman <khilman@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	David Ahern <dsahern@kernel.org>,
	kernel-team@android.com, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, iommu@lists.linux-foundation.org,
	netdev@vger.kernel.org, linux-gpio@vger.kernel.org,
	kernel@pengutronix.de
Subject: Re: [PATCH v2 7/9] driver core: Set fw_devlink.strict=1 by default
Date: Wed, 22 Jun 2022 13:35:26 -0700	[thread overview]
Message-ID: <CAGETcx8i9R51T-mGuV9_LUz-GXDCncpRWQ1Rj_7i2JrvCttq3w@mail.gmail.com> (raw)
In-Reply-To: <CAGETcx_qm7DWbNVTLfF9jTgGA8uH8oAQzbPcMDh4L6+5mdRFog@mail.gmail.com>

On Wed, Jun 22, 2022 at 12:40 PM Saravana Kannan <saravanak@google.com> wrote:
>
> On Wed, Jun 22, 2022 at 1:44 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> >
> > On Wed, Jun 22, 2022 at 9:48 AM Sascha Hauer <sha@pengutronix.de> wrote:
> >
> > > This patch has the effect that console UART devices which have "dmas"
> > > properties specified in the device tree get deferred for 10 to 20
> > > seconds. This happens on i.MX and likely on other SoCs as well. On i.MX
> > > the dma channel is only requested at UART startup time and not at probe
> > > time. dma is not used for the console. Nevertheless with this driver probe
> > > defers until the dma engine driver is available.
>
> FYI, if most of the drivers are built in, you could set
> deferred_probe_timeout=1 to reduce the impact of this (should drop
> down to 1 to 2 seconds). Is that an option until we figure out
> something better?
>
> Actually, why isn't earlyconsole being used? That doesn't get blocked
> on anything and the main point of that is to have console working from
> really early on.
>
> > >
> > > It shouldn't go in as-is.
> >
> > This affects all machines with the PL011 UART and DMAs specified as
> > well.
> >
> > It would be best if the console subsystem could be treated special and
> > not require DMA devlink to be satisfied before probing.
>
> If we can mark the console devices somehow before their drivers probe
> them, I can make fw_devlink give them special treatment. Is there any
> way I could identify them before their drivers probe?
>
> > It seems devlink is not quite aware of the concept of resources that are
> > necessary to probe vs resources that are nice to have and might be
> > added after probe.
>
> Correct, it can't tell them apart. Which is why it tries its best to
> enforce them, get most of them ordered properly and then gives up
> enforcing the rest after deferred_probe_timeout= expires. There's a
> bit more nuance than what I explained here (explained in earlier
> commit texts, LPC talks), but that's the gist of it. That's what's
> going on in this case Sascha is pointing out.z
>
> > We need a strong devlink for the first category
> > and maybe a weak devlink for the latter category.
> >
> > I don't know if this is a generic hardware property for all operating
> > systems so it could be a DT property such as dma-weak-dependency?
> >
> > Or maybe compromize and add a linux,dma-weak-dependency;
> > property?
>
> The linux,dma-weak-dependency might be an option, but then if the
> kernel version changes and we want to enforce it because we now have a
> dma driver (not related to Shasha's example) support, then the
> fw_devlink still can't enforce it because of that property. But maybe
> that's okay? The consumer can try to use dma and defer probe if it
> fails?
>
> Another option is to mark console devices in DT with some property and
> we can give special treatment for those without waiting for
> deferred_probe_timeout= to expire.

Heh, looks like there's already a property for that: stdout-path.

Let me send a series that'll use that to give special treatment to
console devices.

-Saravana

WARNING: multiple messages have this Message-ID (diff)
From: Saravana Kannan via iommu <iommu@lists.linux-foundation.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Eric Dumazet <edumazet@google.com>, Pavel Machek <pavel@ucw.cz>,
	Will Deacon <will@kernel.org>, Sascha Hauer <sha@pengutronix.de>,
	Kevin Hilman <khilman@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	kernel-team@android.com, Len Brown <len.brown@intel.com>,
	linux-pm@vger.kernel.org, linux-gpio@vger.kernel.org,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	David Ahern <dsahern@kernel.org>,
	linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	kernel@pengutronix.de, netdev@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH v2 7/9] driver core: Set fw_devlink.strict=1 by default
Date: Wed, 22 Jun 2022 13:35:26 -0700	[thread overview]
Message-ID: <CAGETcx8i9R51T-mGuV9_LUz-GXDCncpRWQ1Rj_7i2JrvCttq3w@mail.gmail.com> (raw)
In-Reply-To: <CAGETcx_qm7DWbNVTLfF9jTgGA8uH8oAQzbPcMDh4L6+5mdRFog@mail.gmail.com>

On Wed, Jun 22, 2022 at 12:40 PM Saravana Kannan <saravanak@google.com> wrote:
>
> On Wed, Jun 22, 2022 at 1:44 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> >
> > On Wed, Jun 22, 2022 at 9:48 AM Sascha Hauer <sha@pengutronix.de> wrote:
> >
> > > This patch has the effect that console UART devices which have "dmas"
> > > properties specified in the device tree get deferred for 10 to 20
> > > seconds. This happens on i.MX and likely on other SoCs as well. On i.MX
> > > the dma channel is only requested at UART startup time and not at probe
> > > time. dma is not used for the console. Nevertheless with this driver probe
> > > defers until the dma engine driver is available.
>
> FYI, if most of the drivers are built in, you could set
> deferred_probe_timeout=1 to reduce the impact of this (should drop
> down to 1 to 2 seconds). Is that an option until we figure out
> something better?
>
> Actually, why isn't earlyconsole being used? That doesn't get blocked
> on anything and the main point of that is to have console working from
> really early on.
>
> > >
> > > It shouldn't go in as-is.
> >
> > This affects all machines with the PL011 UART and DMAs specified as
> > well.
> >
> > It would be best if the console subsystem could be treated special and
> > not require DMA devlink to be satisfied before probing.
>
> If we can mark the console devices somehow before their drivers probe
> them, I can make fw_devlink give them special treatment. Is there any
> way I could identify them before their drivers probe?
>
> > It seems devlink is not quite aware of the concept of resources that are
> > necessary to probe vs resources that are nice to have and might be
> > added after probe.
>
> Correct, it can't tell them apart. Which is why it tries its best to
> enforce them, get most of them ordered properly and then gives up
> enforcing the rest after deferred_probe_timeout= expires. There's a
> bit more nuance than what I explained here (explained in earlier
> commit texts, LPC talks), but that's the gist of it. That's what's
> going on in this case Sascha is pointing out.z
>
> > We need a strong devlink for the first category
> > and maybe a weak devlink for the latter category.
> >
> > I don't know if this is a generic hardware property for all operating
> > systems so it could be a DT property such as dma-weak-dependency?
> >
> > Or maybe compromize and add a linux,dma-weak-dependency;
> > property?
>
> The linux,dma-weak-dependency might be an option, but then if the
> kernel version changes and we want to enforce it because we now have a
> dma driver (not related to Shasha's example) support, then the
> fw_devlink still can't enforce it because of that property. But maybe
> that's okay? The consumer can try to use dma and defer probe if it
> fails?
>
> Another option is to mark console devices in DT with some property and
> we can give special treatment for those without waiting for
> deferred_probe_timeout= to expire.

Heh, looks like there's already a property for that: stdout-path.

Let me send a series that'll use that to give special treatment to
console devices.

-Saravana
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2022-06-22 20:36 UTC|newest]

Thread overview: 127+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-01  7:06 [PATCH v2 0/9] deferred_probe_timeout logic clean up Saravana Kannan via iommu
2022-06-01  7:06 ` Saravana Kannan
2022-06-01  7:06 ` [PATCH v2 1/9] PM: domains: Delete usage of driver_deferred_probe_check_state() Saravana Kannan
2022-06-01  7:06   ` Saravana Kannan via iommu
2022-06-09 11:44   ` Ulf Hansson
2022-06-09 11:44     ` Ulf Hansson
2022-06-09 19:29     ` Saravana Kannan
2022-06-09 19:29       ` Saravana Kannan via iommu
2022-06-21  7:28   ` Tony Lindgren
2022-06-21  7:28     ` Tony Lindgren
2022-06-21 19:34     ` Saravana Kannan
2022-06-21 19:34       ` Saravana Kannan via iommu
2022-06-22  4:58       ` Tony Lindgren
2022-06-22  4:58         ` Tony Lindgren
2022-06-22 19:09         ` Saravana Kannan
2022-06-22 19:09           ` Saravana Kannan via iommu
2022-06-23  7:01           ` Tony Lindgren
2022-06-23  7:01             ` Tony Lindgren
2022-06-23  8:21             ` Saravana Kannan
2022-06-23  8:21               ` Saravana Kannan via iommu
2022-06-27  9:10               ` Tony Lindgren
2022-06-27  9:10                 ` Tony Lindgren
2022-06-30 23:10                 ` Saravana Kannan
2022-06-30 23:10                   ` Saravana Kannan via iommu
2022-06-30 23:26                   ` Rob Herring
2022-06-30 23:26                     ` Rob Herring
2022-06-30 23:30                     ` Saravana Kannan
2022-06-30 23:30                       ` Saravana Kannan via iommu
2022-07-01  5:33                       ` Tony Lindgren
2022-07-01  5:33                         ` Tony Lindgren
2022-07-01  6:12                         ` Tony Lindgren
2022-07-01  6:12                           ` Tony Lindgren
2022-07-01  8:10                           ` Saravana Kannan
2022-07-01  8:10                             ` Saravana Kannan via iommu
2022-07-01  8:26                             ` Saravana Kannan via iommu
2022-07-01  8:26                               ` Saravana Kannan
2022-07-01 13:00                               ` Tony Lindgren
2022-07-01 13:00                                 ` Tony Lindgren
2022-07-12  7:12                                 ` Tony Lindgren
2022-07-13  0:49                                   ` Saravana Kannan
2022-07-13  8:06                                     ` Tony Lindgren
2022-07-01 15:08                               ` Sudeep Holla
2022-07-01 15:08                                 ` Sudeep Holla
2022-07-01 19:13                                 ` Saravana Kannan
2022-07-01 19:13                                   ` Saravana Kannan via iommu
2022-07-05  8:44                                   ` Saravana Kannan
2022-07-05  8:44                                     ` Saravana Kannan via iommu
2022-07-01  7:38                   ` Geert Uytterhoeven
2022-07-01  7:38                     ` Geert Uytterhoeven
2022-06-23 12:08     ` Alexander Stein
2022-06-23 12:08       ` Alexander Stein
2022-07-01  0:37       ` Saravana Kannan
2022-07-01  0:37         ` Saravana Kannan via iommu
2022-07-01  6:01         ` (EXT) " Alexander Stein
2022-07-01  6:01           ` Alexander Stein
2022-07-01  7:02           ` Saravana Kannan
2022-07-01  7:02             ` Saravana Kannan via iommu
2022-07-04  7:07             ` (EXT) " Alexander Stein
2022-07-04  7:07               ` Alexander Stein
2022-07-05  1:24               ` Saravana Kannan
2022-07-05  1:24                 ` Saravana Kannan via iommu
2022-07-06 13:02                 ` Re: " Alexander Stein
2022-07-06 13:02                   ` Alexander Stein
2022-07-13  0:45                   ` Saravana Kannan
2022-07-14  6:41                     ` Alexander Stein
2022-07-15 22:08                       ` Saravana Kannan
2022-07-01  7:30         ` Geert Uytterhoeven
2022-07-01  7:30           ` Geert Uytterhoeven
2022-06-01  7:06 ` [PATCH v2 2/9] pinctrl: devicetree: " Saravana Kannan
2022-06-01  7:06   ` Saravana Kannan via iommu
2022-06-01  7:06 ` [PATCH v2 3/9] net: mdio: " Saravana Kannan
2022-06-01  7:06   ` Saravana Kannan via iommu
2022-07-05  9:11   ` Geert Uytterhoeven
2022-07-05  9:11     ` Geert Uytterhoeven
2022-07-13  1:40     ` Saravana Kannan
2022-07-13 11:39       ` Geert Uytterhoeven
2022-08-15  8:38     ` Geert Uytterhoeven
2022-06-01  7:07 ` [PATCH v2 4/9] driver core: Add wait_for_init_devices_probe helper function Saravana Kannan
2022-06-01  7:07   ` Saravana Kannan via iommu
2022-06-01  7:07 ` [PATCH v2 5/9] net: ipconfig: Relax fw_devlink if we need to mount a network rootfs Saravana Kannan
2022-06-01  7:07   ` Saravana Kannan via iommu
2022-06-01  7:07 ` [PATCH v2 6/9] Revert "driver core: Set default deferred_probe_timeout back to 0." Saravana Kannan
2022-06-01  7:07   ` Saravana Kannan via iommu
2022-07-20 17:31   ` Geert Uytterhoeven
2022-07-20 19:01     ` Saravana Kannan
2022-07-21  8:40       ` Geert Uytterhoeven
2022-06-01  7:07 ` [PATCH v2 7/9] driver core: Set fw_devlink.strict=1 by default Saravana Kannan
2022-06-01  7:07   ` Saravana Kannan via iommu
2022-06-22  7:47   ` Sascha Hauer
2022-06-22  7:47     ` Sascha Hauer
2022-06-22  8:44     ` Linus Walleij
2022-06-22  8:44       ` Linus Walleij
2022-06-22 10:52       ` Andy Shevchenko
2022-06-22 10:52         ` Andy Shevchenko
2022-06-22 11:18         ` Sascha Hauer
2022-06-22 11:18           ` Sascha Hauer
2022-06-22 19:40       ` Saravana Kannan via iommu
2022-06-22 19:40         ` Saravana Kannan
2022-06-22 20:35         ` Saravana Kannan [this message]
2022-06-22 20:35           ` Saravana Kannan via iommu
2022-06-22 22:30           ` Saravana Kannan
2022-06-22 22:30             ` Saravana Kannan via iommu
2022-06-28 13:09         ` Linus Walleij
2022-06-28 13:09           ` Linus Walleij
2022-06-01  7:07 ` [PATCH v2 8/9] iommu/of: Delete usage of driver_deferred_probe_check_state() Saravana Kannan
2022-06-01  7:07   ` Saravana Kannan via iommu
2022-08-19 14:26   ` Jean-Philippe Brucker
2022-06-01  7:07 ` [PATCH v2 9/9] driver core: Delete driver_deferred_probe_check_state() Saravana Kannan
2022-06-01  7:07   ` Saravana Kannan via iommu
2022-06-07 18:07 ` [PATCH v2 0/9] deferred_probe_timeout logic clean up Geert Uytterhoeven
2022-06-07 18:07   ` Geert Uytterhoeven
2022-06-08  0:55   ` Saravana Kannan via iommu
2022-06-08  0:55     ` Saravana Kannan
2022-06-08  4:17     ` Saravana Kannan via iommu
2022-06-08  4:17       ` Saravana Kannan
2022-06-08 10:25       ` Geert Uytterhoeven
2022-06-08 10:25         ` Geert Uytterhoeven
2022-06-08 18:12         ` Saravana Kannan
2022-06-08 18:12           ` Saravana Kannan via iommu
2022-06-08 18:47           ` Geert Uytterhoeven
2022-06-08 18:47             ` Geert Uytterhoeven
2022-06-08 21:07             ` Saravana Kannan
2022-06-08 21:07               ` Saravana Kannan via iommu
2022-06-08 22:49               ` Jakub Kicinski
2022-06-08 22:49                 ` Jakub Kicinski
2022-06-08 23:15                 ` Saravana Kannan via iommu
2022-06-08 23:15                   ` Saravana Kannan

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=CAGETcx8i9R51T-mGuV9_LUz-GXDCncpRWQ1Rj_7i2JrvCttq3w@mail.gmail.com \
    --to=saravanak@google.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hkallweit1@gmail.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=kernel-team@android.com \
    --cc=kernel@pengutronix.de \
    --cc=khilman@kernel.org \
    --cc=kuba@kernel.org \
    --cc=len.brown@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=rafael@kernel.org \
    --cc=sha@pengutronix.de \
    --cc=ulf.hansson@linaro.org \
    --cc=will@kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.