Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2810650iof; Wed, 8 Jun 2022 12:30:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb7sJH9EA4rbO8Htz3GR668lpPp0OCmJQbgMtvMsAA+ftHCmFbHcnanrR2nFW6hPBpyyWT X-Received: by 2002:a17:906:4784:b0:6ff:34ea:d824 with SMTP id cw4-20020a170906478400b006ff34ead824mr33844362ejc.526.1654716636949; Wed, 08 Jun 2022 12:30:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654716636; cv=none; d=google.com; s=arc-20160816; b=Uml0GHvHGQoyz5EommM/Y7CeiZ5Ke3QwP0vQe2fJ9EO3KovnoTwtizg1D2nxX7+ss+ dn9SdiQ0M2CmTumYo9W8agtD5rREuGaxwPQU8NRBAy0iV/3Nr9IhSXRK28V0PqT28SPn VV8fET0BBWRR8eC+qBqiRbz6E4qziKst4OUkymu4m1RzGGfCYkjYGwSW1XjMG2kU4DHx fxEcN+kx41RaE1WCjiQVOH8q9qv2r7L2/XTkIvs23+KbeF1DX8C8cxcdtdjJtraXuZoy LtZOALB48IOD9XDt85YcvInGQEok+3y4jgxyxkTMSItjBsZlHYNyncZ+T4GB97xNGTAo 9WwQ== 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; bh=cCx4uVeqQeSUmVm0iqQB2vFXf1PboEGJhslplIjAGsc=; b=bn5oLCPUhI6ljjvkr3Hb5cJwB9B9vtM7k3LUNbsudyOHojVea308NY3M8S15rZ7q9W VCHEx253J8R0cV/cU4bSX4YU8qw6Csz4WAaR6Neh/XGhkqstILzDgIjvbrQd7ouOey+J FOEtz9zHx1TQVOCKsX4TNGi1X40+qI/aktBYKakXJp/rKQPCFi1rbumpFyT2i3oq+AG5 1q/zi4sapk/aLwgZi2c14aYeVyIqdac1vbPrXD+jn25ssz/MYkctU7ecOHXus4d8o9Se zCb0nBmq9g+/E86gOYAbhw6MSz2T/Qw5vP0lnS2f8zS/Q11m7RHY7pjTsrgONnYkb5OF VCNQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b12-20020a056402278c00b0042e1f3b4a9esi23546514ede.181.2022.06.08.12.30.11; Wed, 08 Jun 2022 12:30:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231910AbiFHSrx (ORCPT + 99 others); Wed, 8 Jun 2022 14:47:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229614AbiFHSrv (ORCPT ); Wed, 8 Jun 2022 14:47:51 -0400 Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E83955365; Wed, 8 Jun 2022 11:47:50 -0700 (PDT) Received: by mail-qk1-f172.google.com with SMTP id k6so13121005qkf.4; Wed, 08 Jun 2022 11:47:50 -0700 (PDT) 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=cCx4uVeqQeSUmVm0iqQB2vFXf1PboEGJhslplIjAGsc=; b=TJqV7fzzDU9w7+AJrBGLLjYSJ8hmFRr81LI/DC6KsqmGZNz2yRLNmfTDwQxRg37/bO ba7RFBEnIxWhsyLdGB72v52NQ0oMt+9pkheBzvmKy/gM1gNK+YzEte//ASOSBKH19Qe+ GESQBiEbTYAgzEnj2235r3jdRaxBNe4CKQaArBdXn68oG73+PmbAZTla2xpFNT2KyMBg WIsAoVQ0mAR1pXoDTIokH4aBviu3YsfAx2pSjTkB9WS+7I9hzWfNa3IlGNr11/s4EwRY Hifp3UxZE4cCplHTzjA5vWTgPxU05Aaf/fKA23XaJiNxSl1JQX/XhDhdI3jPp3nI6gjk L9Zg== X-Gm-Message-State: AOAM5335xLTr3ZL0t4t5y+ir5Wa6U+MGA1UzqgvLNohCy51RRm8AeXbQ DDQefOv6UZK9zHBAlEui8FhC8xh8+osMcA== X-Received: by 2002:a05:620a:12e6:b0:6a6:a5b9:1c57 with SMTP id f6-20020a05620a12e600b006a6a5b91c57mr17865292qkl.393.1654714069233; Wed, 08 Jun 2022 11:47:49 -0700 (PDT) Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com. [209.85.219.181]) by smtp.gmail.com with ESMTPSA id g22-20020ac870d6000000b00304e0245d88sm10868542qtp.48.2022.06.08.11.47.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jun 2022 11:47:48 -0700 (PDT) Received: by mail-yb1-f181.google.com with SMTP id w2so38002867ybi.7; Wed, 08 Jun 2022 11:47:48 -0700 (PDT) X-Received: by 2002:a05:6902:124c:b0:663:9db4:671c with SMTP id t12-20020a056902124c00b006639db4671cmr16391806ybu.543.1654714068446; Wed, 08 Jun 2022 11:47:48 -0700 (PDT) MIME-Version: 1.0 References: <20220601070707.3946847-1-saravanak@google.com> In-Reply-To: From: Geert Uytterhoeven Date: Wed, 8 Jun 2022 20:47:36 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/9] deferred_probe_timeout logic clean up To: Saravana Kannan 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URI_HEX autolearn=no 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 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 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