Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp183862rda; Sat, 21 Oct 2023 03:59:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWPAu98ecBzD81QSDxT2h0AIm42HqeVR6PxeTherlI4tPwRd2d0fGs/CZVJjciOx0d6rJr X-Received: by 2002:a17:90b:e0b:b0:27d:37d3:6e9e with SMTP id ge11-20020a17090b0e0b00b0027d37d36e9emr4455634pjb.17.1697885962601; Sat, 21 Oct 2023 03:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697885962; cv=none; d=google.com; s=arc-20160816; b=RDVeyDEcEU72Mq0/q35URsVe7gXGEdoSOZP2O8ZIUxcPIZ/kLeCCDbf5T8P7TVbR2X HjgX61iJ/TGlcyGb/Mrr0FtjJ8wyhtUlI0ceTcECL2oRLf/6RSiWQF08KBpUXtrAk3dw N5tDqhRhTBPTN3iPR4wM0LagmdVSFT/EVpJb6owHFG8X4FxAi7oVmX0TxLLmxYyYAYwR guOV3nu/QPOJRvKtJnb4TDo59ZlNXkawsMueYjwypkjBVOceUhr+41ip7kSf07QlwkcU g2/ztrINODVFE7Y1cUKtU5Ogglbi8rWW71q4uQDPCkTPVpy1XmqXSok+fgsbrZCFdyc+ 7yTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=i5C6FxFEG20elHUzZF+wAlkNXbA65GZVIdjQBfby3/Y=; fh=7PxXe5XB20P2eIItVUmdsZVPn1Q8BKhJsBQpwIw0koQ=; b=Ps+K6Da4dL9QXVjcAGaK/TmyVZ914r+TY+Or/4nGTO35VZKXYhypwA+uztCcvkA3Cj mBxQIF0VXC7eBhVIKLZ0xg/D6147Md12mXB2rAs603+1/1NmTIHarROIVz/ERo6QFBI6 iMvGA8HIjzgr9puVZfZVN9nmh6FBGtaCV3s4BefG6V9ckhgHoQgyOK279eJHx/tWXJcy Qu7oEcvXcjpv9UK2Y7pgRgtlqGSv9+0qo7CQbuirM5Fbo9I9UkrOK3xoeVLlZZ/KBzlB QyKqHvAG1U5wz1YqtaTplhcbXl9xHFyyRFttygP0HADbN+p+7o5kQpaeSR5b9ldzBG9C 7Mww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ifnYkUmY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id 19-20020a17090a031300b0027491bac826si3417480pje.140.2023.10.21.03.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 03:59:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ifnYkUmY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id E4BDF80B0286; Sat, 21 Oct 2023 03:59:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229668AbjJUK7B (ORCPT + 99 others); Sat, 21 Oct 2023 06:59:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjJUK7A (ORCPT ); Sat, 21 Oct 2023 06:59:00 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E4C799 for ; Sat, 21 Oct 2023 03:58:56 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5469AC433C8; Sat, 21 Oct 2023 10:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697885935; bh=VXBbxg8w4zTKXCyrSSeoaCaTpBuPrlii7tfO2ZHQkPo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ifnYkUmY6lIw15QqNIRHSCwHO34rXRxMPYczWurRPRQan2vVXOEjDmLcDQjg9BQim Uq0QVoX/lM6JbqLixamIUUZmI/zsjyXDWgvmUVOsWuc80ucNjhqZf5Cjabv6UqMNKD y9fKywBftkaK/3mAFoNC6c97/T4LlZCAEa6kSzfI= Date: Sat, 21 Oct 2023 12:58:53 +0200 From: Greg Kroah-Hartman To: stuart hayes Cc: linux-kernel@vger.kernel.org, "Rafael J . Wysocki" , Tanjore Suresh , Martin Belanger , Oliver O'Halloran , Daniel Wagner , Keith Busch , Lukas Wunner Subject: Re: [PATCH v4] driver core: shut down devices asynchronously Message-ID: <2023102151-rejoicing-studio-6126@gregkh> References: <20230921163443.9224-1-stuart.w.hayes@gmail.com> <2023100507-refocus-stooge-08dd@gregkh> <4f36de79-6271-ab6f-19fe-ba189e748b8f@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4f36de79-6271-ab6f-19fe-ba189e748b8f@gmail.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sat, 21 Oct 2023 03:59:18 -0700 (PDT) On Thu, Oct 19, 2023 at 03:40:48PM -0500, stuart hayes wrote: > > > On 10/5/2023 4:36 AM, Greg Kroah-Hartman wrote: > > On Thu, Sep 21, 2023 at 11:34:43AM -0500, Stuart Hayes wrote: > > > Shut down devices asynchronously, ensuring that each device is shut down > > > before its parents. > > > > > > This can dramatically reduce system shutdown/reboot time on systems that > > > have devices that take many seconds to shut down, such as some NVMe drives. > > > On one system tested, the shutdown time went from 11 minutes without this > > > patch to 55 seconds with the patch. > > > > That's a nice improvement, but I think we need a lot more testing on a > > wide range of systems before we can take a patch like this. > > > > Also, what about busses that don't want this type of shutdown? We allow > > busses to opt-in for async probing, shouldn't that be also done for > > shutting them down to resolve issues for busses that can not handle > > this? > > > > thanks, > > > > greg k-h > > Yes, I could add something like what is done for async probing, so drivers > have to opt in to async shutdown of their devices. > > But I'm not sure how to get it tested on a wide range of systems, other than > than having the patch in the kernel. Yes, breaking things is the only way you will know :) > What if it defaults to synchronous > shutdown for now, but the option is there so people are able to test async > shutdown by changing an attribute in sysfs? Then drivers could be patched > later to opt in to async shutdown of their devices by default...? Yes, that will be the proper way forward, default to what you know works today, and then busses can opt-in for the async option if they work properly. That's what we did with probing, so it can mirror that. thanks, greg k-h