Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp120417rbe; Wed, 28 Feb 2024 14:23:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUzaneazfKIYsVvUchQIxKXarCY5D7AyMqULhwBtb0VG37g9JbHjrJJdZ/nmL0rkCSbdrCKYEfXRFpxMIbijIhqRTnhUqPQkmV6v8lWvA== X-Google-Smtp-Source: AGHT+IExItRMc+ku8rvdav3EX74Taaq95VfQDyEyxo0Mpa9wUVpe6dl2D4jz1todE8Qikg2t4F/Y X-Received: by 2002:a50:cbc9:0:b0:566:ef9:30ce with SMTP id l9-20020a50cbc9000000b005660ef930cemr166723edi.3.1709158983935; Wed, 28 Feb 2024 14:23:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709158983; cv=pass; d=google.com; s=arc-20160816; b=eX1BsUJc8vSnxi04t8OH83iuMuNVVayEv8M0O2izIpplw5lZp+FFV/EMqmxWGI4m0q tRk9vlfPhNhVD3KYE1AA3Gv2q5cGwNDqre3FXMBv7B3vZR5DJ5O83FcW11vnkjoaCDIa jOZvGUe8o9500xkQYU62vz0DsQYQPMg4ZL9k/AZhrTPLqZYX5kF2FD3z41X7JIFGQLH4 xOe6mBrk6PspS1cAuoclE3FezvpnJPscM5ZZIQZzWsxuwENQu3Q+nmfi0An5C7eOuSP6 95Yy8gZXd67H4bImVNsBJnqFfUjnxVAuYZkOcs3A5ucAUi6sDQz+AninAgmz70epRZGz H5vw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xgQoXqD0xYq4yf+u8DVK7cpxCCNjrztlu+cKe20ucFc=; fh=Hf99a+HLXmGmhUWquBIsSpIwrsaFMYnMTSK5ve1teks=; b=xDQA4MFJcer+dG+JFvYkLLx6TVOrxMD8D1E1iXgyhjoM1fenwEPX3QxWrmcjLiTYQ8 Aa7LGnwW3Lbcpmm+KbN8By5SBOxq1K+2rugNnjPoUpXndhHfV0OIIf+WytxN+Re9Pu9E xjjR2iwPyNWJ7Yfu8cGiQtmaAbermogweS7pV05Vr4vAirxBy9lB8nR6ENVL3kMQZ3IX /HaAlrC5NfCVMVEHKbb8j678/toOA+iNbBrbczkMTUDTwudE4LNYOVq3i+eQ8ZZfHbi/ hjghYptp650FnhFQxInow1QVylESaBqxenVhCZYXiIl/jKHXY38CXoQzW4ftRVjKhX2W HiCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Aq/6N6ZK"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-85783-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85783-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u25-20020a50c059000000b0056631d89158si1974282edd.402.2024.02.28.14.23.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 14:23:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85783-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Aq/6N6ZK"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-85783-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85783-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8C8F11F241C2 for ; Wed, 28 Feb 2024 22:23:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 20E061361CF; Wed, 28 Feb 2024 22:22:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Aq/6N6ZK" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AC9B1361B8 for ; Wed, 28 Feb 2024 22:22:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709158975; cv=none; b=RuE7zAz1/lkGrJRHJykAjlLnFnAu0I4qvodl4QDgCRZcRJ1vdyV02+E2s4b4WHpZdTQCbmXwU1zym1Obh3L6x1uV7d4u6DfjRnXA3rssucBRSxhlB76JGRU8E0dw8eUz31z+NYCigff8dXLwmzuFvefs50vun1ujIOCj0RbiDEI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709158975; c=relaxed/simple; bh=bqPIJ6+vi+DTHNESKaVkxIhlnvIO2JJ89ZmaKhl/6iE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bTxaAuGCEzK3gQp1VaQNlnD/EwihS65DmGJtAi/A/7OvMyVXdNlHIWEdz9v+jteVAqgUfX+oWQdDgin5cPhh/4c+dBrwn1mKAHXSWp2tvM79EdKPlxIVoaszT+cPT0u79vfhA+KbW+ZQGeZtOE4g0eTowwmvq+nLs3zcvdUekK8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Aq/6N6ZK; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709158972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xgQoXqD0xYq4yf+u8DVK7cpxCCNjrztlu+cKe20ucFc=; b=Aq/6N6ZKBtzlM5wD2RhdGeS45Vrs6GuUIjLaJQRKZQpXXBpyMCA7fz1tKZApcBITC07q4M kefIcfcqJE3WdlXwzq6UPCAoKcQHQVcg6HmGNwC1McnjhCSgIuvaWSB4ql/5paM6HB+GVi 7w0cVCIc3SVMcDrUcWF33bnlwTljRoI= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-551-TeVike1eMlWbG9gOE3H3KA-1; Wed, 28 Feb 2024 17:22:50 -0500 X-MC-Unique: TeVike1eMlWbG9gOE3H3KA-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-787f6208f7eso47949485a.0 for ; Wed, 28 Feb 2024 14:22:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709158970; x=1709763770; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xgQoXqD0xYq4yf+u8DVK7cpxCCNjrztlu+cKe20ucFc=; b=TbktEa7d0sZ49ojI8Vox8BSmf8wjfMfLW9XN798+g4+guW+b4+okyg37H3abyRdqGx Sc7FxkWJzKIcXRkwMm7wh5b5QujydHFWGqBl+Hs3SpT7ggDswX8DE44STR2yUcHNAq5j IqSAk0UmqXg4q1Qcrp2BCRmbnhLeQrEmj6FoDDGP3eCq5f5sSCENXi7gVSBT4CZfzx4A HRA+WRktFLQMqkvBZLqorhAzzUpJh3vPoD7OY2yHwMRsoQqsNP40s/ZUNOZa/MXVUjLT ESBB4XQeJU3ciR3D6en8nILFAfoUk5ZqnRqe2rePHHXlBeyhc+YztTyy7uR1r3DdwXZh tMRA== X-Gm-Message-State: AOJu0YxGpFopIPzvFQLKq/4qrz+CROwfvmLs/jPWAgJnCxJLZzjlWLBP mA0vqOi/BNZQPMiQQ61cBXnNDEFMhloezXdlZpbFkVyym0gXsE8X11jGjKtp5STsbUudcoAG8C7 QwYDQ1rVqEQsK2G9CPSjblEn6zqNNJNoAowEzT/b9TufGdoZ0Nytn6kOK/uR00Q== X-Received: by 2002:a05:620a:461f:b0:787:730b:11e9 with SMTP id br31-20020a05620a461f00b00787730b11e9mr114074qkb.36.1709158970482; Wed, 28 Feb 2024 14:22:50 -0800 (PST) X-Received: by 2002:a05:620a:461f:b0:787:730b:11e9 with SMTP id br31-20020a05620a461f00b00787730b11e9mr114057qkb.36.1709158970229; Wed, 28 Feb 2024 14:22:50 -0800 (PST) Received: from fedora ([2600:1700:1ff0:d0e0::37]) by smtp.gmail.com with ESMTPSA id f3-20020a05620a12e300b00787db370253sm55031qkl.92.2024.02.28.14.22.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 14:22:49 -0800 (PST) Date: Wed, 28 Feb 2024 16:22:48 -0600 From: Andrew Halaney To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, javier@dowhile0.org, Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: Re: [PATCH v3] driver core: Don't set a deferred probe timeout if modules are disabled Message-ID: References: <20240227231001.648698-1-javierm@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240227231001.648698-1-javierm@redhat.com> On Wed, Feb 28, 2024 at 12:09:02AM +0100, Javier Martinez Canillas wrote: > There is no point to schedule the workqueue to timeout the deferred probe, > if all the initcalls are done and modules are not enabled. The default for > this case is already 0 but can be overridden by the deferred_probe_timeout > parameter. Let's just skip this and avoid queuing work that is not needed. > > Signed-off-by: Javier Martinez Canillas Reviewed-by: Andrew Halaney > --- > > Changes in v3: > - Just skip setting the deferred_probe_timeout parameter when modules > are disabled (Andrew Halaney). > > drivers/base/dd.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/base/dd.c b/drivers/base/dd.c > index 85152537dbf1..48a45860d2bb 100644 > --- a/drivers/base/dd.c > +++ b/drivers/base/dd.c > @@ -266,6 +266,13 @@ static int __init deferred_probe_timeout_setup(char *str) > { > int timeout; > > + /* > + * If loadable modules support is disabled, there is no point to > + * set a timeout for the deferred probe and schedule a workqueue. > + */ > + if (!IS_ENABLED(CONFIG_MODULES)) > + return 1; > + > if (!kstrtoint(str, 10, &timeout)) > driver_deferred_probe_timeout = timeout; > return 1; > -- > 2.43.2 >