Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1745734pxb; Wed, 30 Mar 2022 09:18:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxThiTBn4lqRod/OZ5YcFkuvhU+ngPcK5fuyDHfQ6Xqu/gBmRgeXoGDHRmtd7lmXqKzO79P X-Received: by 2002:a17:907:7e94:b0:6e4:9d72:a784 with SMTP id qb20-20020a1709077e9400b006e49d72a784mr323153ejc.346.1648657136194; Wed, 30 Mar 2022 09:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648657136; cv=none; d=google.com; s=arc-20160816; b=UUh5wMXVhixvumlFlICfN3d5E4sBVRwmVGo+9md8ACKixIXqHi4BbMF+e8iHH5oXzD CjMQUNDLgYC3+aOie4ARvgIOg3gi9jZIH+w40j7/u3S4wmRMOSeRmxZtqowjkQUxPuu+ MhwJloRvzyDZY4QsByEtgmOQq+r6Pzw+edbtUIlDu29LcTgZGKxflqUQjBSJTfHuVlpY RUgiNQGwjWPTSTmkxBppHGh/fmlOuezk33FNrpTvOn5igZLDuVw/3aNXhvIzrCBqi1Ls NshG5E0TEYNrx+W8UwVhs5gGt2BBhdttuIkH07R7AQzcqAjvSNUi25FkoZrT1KKRNwSv GBsA== 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=h9LtN354uVuUYmVb2mASO8NEBFMkBKelxqOXNVRMI1A=; b=xgX3As1bM2eKg91CEVbxsZ77o/YnX7MjpkzcvAWzHrym4ui0ji//MSNyBeFFRiPTAw ifGOc9fWbPPOw2HKye2wizAnILx1MUflI9p7mJU2c5o1ADUVE40MFQnhbvaT/YqeXs9i SOjhzYP8X+ko+DMtXqlLe8MzizpcvDwPXrKbbS66RjP0c84C7Ee6CMo1+xYIEENduaOj t9wBpzrNJVqs2rkcHoYDBN10oPnz2M1c8sxwjnJ7O5BrwGY4m2Ct8Gk5wtye4Hu4o57Y 3BQ3aY4VfBrTQdj4FhBVPIUl5/kucEbQPYVBNBYKngvDJ5WZUB9k0sQPYhVDyN+BlKZU LKnA== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z8-20020a170906814800b006df76385d9dsi19602863ejw.573.2022.03.30.09.18.28; Wed, 30 Mar 2022 09:18:56 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343546AbiC3LPd (ORCPT + 99 others); Wed, 30 Mar 2022 07:15:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343541AbiC3LPa (ORCPT ); Wed, 30 Mar 2022 07:15:30 -0400 Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B771E23BFB; Wed, 30 Mar 2022 04:13:42 -0700 (PDT) Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-2e6650cde1bso214777197b3.12; Wed, 30 Mar 2022 04:13:42 -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=h9LtN354uVuUYmVb2mASO8NEBFMkBKelxqOXNVRMI1A=; b=XqJegpkErBHQu+EhoXrl9y5OSLjp/YZKurs5eTx/HohGEjZTNK1HrCLgps4qVdVMJq 70LfDEoyiULkfV9JmrVWcHKcSvdaEIJwcUkKdI3DylWRqBNE8KPsZY2taz3HtMFXgZN2 3ze63H27BBKdUXo6Dgkb+n87zXq+q9etgOQUnNDiN32uAjcIslbqHcm0RNL5RbmeIGcJ KknspNkXWh+uAOiBXKvs2oUv1b7hrBOnHNk0m8/kdiCjtpDPVFyRZrMlihJ+fC5QGPKU jUkcO4K53Ifrrz2icLKMum1Y0icghvS5B2uxltugHc5o6MMQ6emGLwfCeoDmuPqNx1aS 1Egg== X-Gm-Message-State: AOAM533LKmRK+zvDvrvSMU9C3SGujInzeKt4L0Eg/N9RGMDuCva+3pVw vpE7xoUDKQVQXCs0zWeUy7uqilFFpIa8BA/SWM0= X-Received: by 2002:a81:6887:0:b0:2e6:126d:3102 with SMTP id d129-20020a816887000000b002e6126d3102mr35867153ywc.7.1648638821666; Wed, 30 Mar 2022 04:13:41 -0700 (PDT) MIME-Version: 1.0 References: <20220328230008.3587975-1-tansuresh@google.com> <20220330062516.GA24340@wunner.de> In-Reply-To: <20220330062516.GA24340@wunner.de> From: "Rafael J. Wysocki" Date: Wed, 30 Mar 2022 13:13:30 +0200 Message-ID: Subject: Re: [PATCH v1 0/3] Asynchronous shutdown interface and example implementation To: Lukas Wunner Cc: Keith Busch , Tanjore Suresh , Greg Kroah-Hartman , "Rafael J . Wysocki" , Christoph Hellwig , Sagi Grimberg , Bjorn Helgaas , Linux Kernel Mailing List , linux-nvme , Linux PCI Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 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 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 On Wed, Mar 30, 2022 at 8:25 AM Lukas Wunner wrote: > > On Tue, Mar 29, 2022 at 08:07:51PM -0600, Keith Busch wrote: > > Thanks, I agree we should improve shutdown times. I tried a while ago, but > > lost track to follow up at the time. Here's the reference, fwiw, though it > > may be out of date :): > > > > http://lists.infradead.org/pipermail/linux-nvme/2014-May/000826.html > > > > The above solution is similiar to how probe waits on an async domain. > > Maybe pci can schedule the async shutdown instead of relying on low-level > > drivers so that everyone implicitly benefits instead of just nvme? I'll > > double-check if that's reasonable, but I'll look through this series too. > > Using the async API seems much more reasonable than adding new callbacks. > > However I'd argue that it shouldn't be necessary to amend any drivers, > this should all be doable in the driver core: Basically a device needs > to wait for its children and device links consumers to shutdown, apart > from that everything should be able to run asynchronously. Well, this is done already in the system-wide and hibernation paths. It should be possible to implement asynchronous shutdown analogously.