Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp22492iof; Wed, 8 Jun 2022 14:15:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweTh29vm76ljueP0+Qm44Ktp8jQpH1TjTqIz5s+aG5vmXBxMj1QqKPahxgeOIeK8SHNKpu X-Received: by 2002:a17:907:6d92:b0:6ff:11bb:cce7 with SMTP id sb18-20020a1709076d9200b006ff11bbcce7mr32482012ejc.166.1654722951754; Wed, 08 Jun 2022 14:15:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654722951; cv=none; d=google.com; s=arc-20160816; b=Fjm9Q89QW15cpZVYIdoMD8g1Ea7OA8upuIsxX8L5wUsxJ2IIPbp0wcY8W5h1lZMh6y begH5aPkxvUtnH6/GFn/z9vGg3bR95/zgeF8hTQydz81uOlpY0U48Dif5RpLuuIyeyJk j6v+/CzIlYwNV0X1RZ7hM2guTBzsmf4rm1vVO41nbUXMwBlpz7NZ3oOb2TBRTwh/1Wmx eKF9vvAYHryLh2xpnLgQH5wOhrGPP1dbPwBpaDgjdzQRp84pVyb17MrevGaAbAEXWigF XgjFxrRFO/2pk+tdcGF0iKhc3KSvlACfPkiNIp2dtW15MUmPNSvw1JyAZBltUjh+clZM Nqdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=b5ReOqAs2o3gzeqG3OL7V4il5yL5akHyIyGPxcacfBA=; b=dSv8ouoz1RF539uhgWEgp+yEs1qITP6YFJSe6CPxk6/SAirlif0NDPwj2JWwiQeUGi nVvx5bLBy0JFA8WIjxlLtDXqOjjjof22nqP5LD5e3F7prmxvve1mcfADf/FXcf1EDW6R L+ZKJuGPEUC5wVf8hGyr7/qcy3eE5PzYmq1LBRCOZhOrx+D7Sx0i0A6gRWO/ImmaigRA 52kV8CdU1iayi5LP8XZOD0VhTYDXASbeXqPAxeUJYlzuiVY5Tm3yfUtj+V/HIdHse0P5 B3Xkuty8IeYY/55wL4qakDLAE4QY8fJQhjMuHJpLJIEGQwtyycphVU8IjauIu7m9d1w9 9meg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Ba4mwhCN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i11-20020a1709064fcb00b00711e4cb3834si5419389ejw.116.2022.06.08.14.15.23; Wed, 08 Jun 2022 14:15:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Ba4mwhCN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234941AbiFHVIY (ORCPT + 99 others); Wed, 8 Jun 2022 17:08:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234685AbiFHVIX (ORCPT ); Wed, 8 Jun 2022 17:08:23 -0400 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 123AD2271BF for ; Wed, 8 Jun 2022 14:08:22 -0700 (PDT) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-31336535373so71474367b3.2 for ; Wed, 08 Jun 2022 14:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b5ReOqAs2o3gzeqG3OL7V4il5yL5akHyIyGPxcacfBA=; b=Ba4mwhCNe1k/SVYGgiax1RHLVYaE16PYm+5fiQboXFgD/ag+N5cvz705MN4rVjpIPI 20mqv9SEpUPx3PtChBxCddPxC3gpwz6N5PF+G0ZElhJAMs7eaWr/Z+J8nMSxF5pOKofY CLFQyzIeUPghYqThB66mUFHJcWTC93ASqEVRt3LVLl9QPXBD+PYs/yU2uLqcxreGwdik 4HASNcsIvuV/mOpjIf/knlk/2pymeg4ut2QXPF/hi4finuKXsMk29G9quSLgCq5XjL9S aWkJqkdgxfW8i8wPGvE0N8YcrI2ZFizB9Lbxi1u9CnGJusfu9M2jfO6bciIlSU/xqWwh 708Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b5ReOqAs2o3gzeqG3OL7V4il5yL5akHyIyGPxcacfBA=; b=OxU9M0R4ddDFl5ZaPljjU2aUXRPfPyL9U9gLKUNHsPkb0VFFCX+zQUPRIiejVqOejD xN8ceEDja2Rf/TjZQePJK7lJygpO3+bUWf/Q/KFmHHTPQTOaRxplKAaEG6obSX+KqlMZ C4QHtuO+rkEAzAtli2M8x/R75PSa76BfugUVSvORH66OZc8pkT0lFfEVH/ZtWaE+stg0 z4XfFJBLaAmSlAhv3p5GUElLf8DPlJGv6J/9DewT5xTzFPaioY7sVkygz2sHaaNwPg39 uP6ep4XPoKYCpnlktyXYOg2iancF4I2OvO2EjTRqrDsCAswmzRy/wfqlaLKYBVIIDZly IvGQ== X-Gm-Message-State: AOAM530Z6rmI/tqBkSoaN14WI7H1hXiuxyxhLIsljkc/OgH3HrQKlC86 Vbgg1lTpCRprhnBdv38fACPmgVyiBmjy0wJzY8PqxA== X-Received: by 2002:a0d:c984:0:b0:30c:c95c:21d0 with SMTP id l126-20020a0dc984000000b0030cc95c21d0mr41306613ywd.218.1654722500963; Wed, 08 Jun 2022 14:08:20 -0700 (PDT) MIME-Version: 1.0 References: <20220601070707.3946847-1-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Wed, 8 Jun 2022 14:07:44 -0700 Message-ID: Subject: Re: [PATCH v2 0/9] deferred_probe_timeout logic clean up To: Geert Uytterhoeven Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Len Brown , Pavel Machek , Joerg Roedel , Will Deacon , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Linus Walleij , David Ahern , Android Kernel Team , Linux Kernel Mailing List , Linux PM list , Linux IOMMU , netdev , "open list:GPIO SUBSYSTEM" , Linux-Renesas , =?UTF-8?Q?Niklas_S=C3=B6derlund?= , Laurent Pinchart , Rob Herring , Vladimir Oltean Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URI_HEX,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 8, 2022 at 11:54 AM Geert Uytterhoeven wrote: > > Hi Saravana, > > On Wed, Jun 8, 2022 at 8:13 PM Saravana Kannan wrote: > > On Wed, Jun 8, 2022 at 3:26 AM Geert Uytterhoeven wrote: > > > On Wed, Jun 8, 2022 at 6:17 AM Saravana Kannan wrote: > > > > On Tue, Jun 7, 2022 at 5:55 PM Saravana Kannan wrote: > > > > > On Tue, Jun 7, 2022 at 11:13 AM Geert Uytterhoeven wrote: > > > > > > On Wed, Jun 1, 2022 at 12:46 PM Saravana Kannan wrote: > > > > > > > This series is based on linux-next + these 2 small patches applies on top: > > > > > > > https://lore.kernel.org/lkml/20220526034609.480766-1-saravanak@google.com/ > > > > > > > > > > > > > > A lot of the deferred_probe_timeout logic is redundant with > > > > > > > fw_devlink=on. Also, enabling deferred_probe_timeout by default breaks > > > > > > > a few cases. > > > > > > > > > > > > > > This series tries to delete the redundant logic, simplify the frameworks > > > > > > > that use driver_deferred_probe_check_state(), enable > > > > > > > deferred_probe_timeout=10 by default, and fixes the nfsroot failure > > > > > > > case. > > > > > > > > > > > > > > The overall idea of this series is to replace the global behavior of > > > > > > > driver_deferred_probe_check_state() where all devices give up waiting on > > > > > > > supplier at the same time with a more granular behavior: > > > > > > > > > > > > > > 1. Devices with all their suppliers successfully probed by late_initcall > > > > > > > probe as usual and avoid unnecessary deferred probe attempts. > > > > > > > > > > > > > > 2. At or after late_initcall, in cases where boot would break because of > > > > > > > fw_devlink=on being strict about the ordering, we > > > > > > > > > > > > > > a. Temporarily relax the enforcement to probe any unprobed devices > > > > > > > that can probe successfully in the current state of the system. > > > > > > > For example, when we boot with a NFS rootfs and no network device > > > > > > > has probed. > > > > > > > b. Go back to enforcing the ordering for any devices that haven't > > > > > > > probed. > > > > > > > > > > > > > > 3. After deferred probe timeout expires, we permanently give up waiting > > > > > > > on supplier devices without drivers. At this point, whatever devices > > > > > > > can probe without some of their optional suppliers end up probing. > > > > > > > > > > > > > > In the case where module support is disabled, it's fairly > > > > > > > straightforward and all device probes are completed before the initcalls > > > > > > > are done. > > > > > > > > > > > > > > Patches 1 to 3 are fairly straightforward and can probably be applied > > > > > > > right away. > > > > > > > > > > > > > > Patches 4 to 6 are for fixing the NFS rootfs issue and setting the > > > > > > > default deferred_probe_timeout back to 10 seconds when modules are > > > > > > > enabled. > > > > > > > > > > > > > > Patches 7 to 9 are further clean up of the deferred_probe_timeout logic > > > > > > > so that no framework has to know/care about deferred_probe_timeout. > > > > > > > > > > > > > > Yoshihiro/Geert, > > > > > > > > > > > > > > If you can test this patch series and confirm that the NFS root case > > > > > > > works, I'd really appreciate that. > > > > > > > > > > > > Thanks, I gave this a try on various boards I have access to. > > > > > > The results were quite positive. E.g. the compile error I saw on v1 > > > > > > (implicit declation of fw_devlink_unblock_may_probe(), which is no longer > > > > > > used in v2) is gone. > > > > > > > > > > Thanks a lot for testing these. > > > > > > > > > > > However, I'm seeing a weird error when userspace (Debian9 nfsroot) is > > > > > > starting: > > > > Setting fw_devlink_strict to true vs. false seems to influence which of > > > two different failures will happen: > > > - rcar-csi2: probe of feaa0000.csi2 failed with error -22 > > > - rcar-vin: probe of e6ef5000.video failed with error -22 > > > The former causes the NULL pointer dereference later. > > > The latter existed before, but I hadn't noticed it, and bisection > > > led to the real culprit (commit 3e52419ec04f9769 ("media: rcar-{csi2,vin}: > > > Move to full Virtual Channel routing per CSI-2 IP"). > > > > If you revert that patch, does this series work fine? If yes, are you > > happy with giving this a Tested-by? > > Sure, sorry for forgetting that ;-) > > Tested-by: Geert Uytterhoeven +few folks who I forgot to add. Geert, Thanks for the extensive testing! Linus W, Ulf, Kevin, Will, Rob, Vladimir, Can I get your reviews for the deletion of driver_deferred_probe_check_state() please? We can finally remove it and have frameworks not needing to know about it. Greg, Rafael, Can you review the wait_for_init_devices_probe() patch and the other trivial driver core changes please? David/Jakub, Do the IP4 autoconfig changes look reasonable to you? Thanks, Saravana > > 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