Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp435145lqb; Tue, 28 May 2024 23:06:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2GoahbYvG+R8UWtAhUcGFq6isGx617mA9NijCQ4JcIvCgQVtQznn8YI7pm7QmcOJu4mO4oL+Vyza5vJ+XmJ4Z1vwrvlyJz3d4g1OdPA== X-Google-Smtp-Source: AGHT+IG7WAi0oFXZIDIT/SyKdLhu497XoTwIWfxdOE/tcUbUziXEFXctN+OX10FySk1KzfFq8xir X-Received: by 2002:a05:6214:3bc5:b0:6ad:73c0:eb22 with SMTP id 6a1803df08f44-6ad73c0ec3emr129181426d6.12.1716962764149; Tue, 28 May 2024 23:06:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716962764; cv=pass; d=google.com; s=arc-20160816; b=Q1R5UMuYSJNbekOCl5VKSc7lxTQ+OdU7QPQAl2LioMs48V68X/Jmlwyz+oH7Avg1Pa 6dpKytYr3raIWBXIvR5v3bxDmw4W2gMCee1CzWLTxjBaOubtTNW14FZACULC49iKGT07 A0eg6XwtXfqWRVOeczQ5jnusxiEpGlmS7qMIxbKPvdFSM3C47co/TQ+abnqsjoSjCJa/ AIoU4i4WSjv7h8fv/u0RR0bwPmnAdkAFMz3nNdG9EXQ6xHPg/waE6aNp0YUjV+w4ycU3 DjcH3gBHHNTkxTtzQfcjgO7bmJxbI1cl61d/xHuvxrMZ0kZ3O+49xMrk0QQD3ChS/DW2 zGrA== 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=aIRNNezid8K3P+PkD9l/VwzqiXgvq0Dfrh6w2mXrdDI=; fh=LpE7TFg/j+gBdqhquCuYHUB7fWi8BEKEK8t3RNds4Ww=; b=XCN2NgpxnZHCDh4wbGocDNeLz9I2sT8cxZq4LMYfcJ13hn6E9ajmrPJKoxDTNN4Wjk zO6iobKn+Yfq6ydwlIXi7zT6S/5DU/IAqn2q9jod1FmFOmTWqonNcBPLOLHIo1oMJ3C9 G/qCF9jHn4xGfmYzxliULxqHSeLD86efnMgQTy1aENBxb4zDC0/VQf7qMc3L8eb3som6 TB5wlyd3nSgCYXztdwtPvMKbdXaidyr5yB9/PvYY8tsmCFVfeQniV50fdwrrAfdH3ouN kt78kicSadKHwoddH8r1/MIn9C8AUhyHJ3X+Z6r9KwlK+feXIt49WU5nY10YkqZXzpqU 6soQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MXsRvcJp; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-193486-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193486-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ad7a6a6acfsi73981726d6.4.2024.05.28.23.06.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 23:06:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193486-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MXsRvcJp; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-193486-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193486-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C63C11C2206B for ; Wed, 29 May 2024 06:06:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38C1E15CD7F; Wed, 29 May 2024 06:05:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="MXsRvcJp" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5E5E21D531 for ; Wed, 29 May 2024 06:05:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716962756; cv=none; b=cNkIwWMkO6bXGNcMDsuSOco7XJOef+d9nglKmJOjkQI6hgLocOkaF8PIqqVGm+2W8lVanB3LA+mmnJDu4dtZTibo8i1gnqnTMZgSys6qnr1csdcsS5nu5StgBYkvro+8yo4YwgFRsKSjx0P1F60joFUUhMBteLfmY/njXJtD+TA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716962756; c=relaxed/simple; bh=cMeCo2Wv/H8lM/gi80oDYtFefeaUPGECO5IUqO8vWfk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ru6NEhDb/89bIHuV4kLnHZjlzMZPXe8WNSsQLwwNXNg8OFWg/mwf3E1gmstLXlAC7gYjmNb8MwFFwNAVUawGtI6sXu/DhKGhr2M5KfPbVxN/PVSIar4g2YGGEqYtQzL90arAtUg+nEpIpF7lYMNfZg13AN57cDlqfyy/oeUezLo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MXsRvcJp; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C32BC2BD10; Wed, 29 May 2024 06:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716962756; bh=cMeCo2Wv/H8lM/gi80oDYtFefeaUPGECO5IUqO8vWfk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MXsRvcJpIs8UvENjyDVODCcVLUb0y8EYZkISMz5gehg1/3CvC46plee4dMnttg5Rn JYXIyPB2g4R6TA+sQqKuyNPwm7rxDlYmu9+CgQR5frsxuvIY1Rq7v1EUlsAXCwTq3w SnKZiPl67tvnvYs1eVz/esSwWK7kQy/AaoSeQfSw= Date: Wed, 29 May 2024 08:06:00 +0200 From: Greg Kroah-Hartman To: stuart hayes Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, "Rafael J . Wysocki" , Tanjore Suresh , Martin Belanger , Oliver O'Halloran , Daniel Wagner , Keith Busch , Lukas Wunner , David Jeffery , Jeremy Allison , Jens Axboe , Sagi Grimberg , linux-nvme@lists.infradead.org Subject: Re: [PATCH v6 3/4] driver core: shut down devices asynchronously Message-ID: <2024052951-buffalo-humongous-df1f@gregkh> References: <20240516154920.221445-1-stuart.w.hayes@gmail.com> <20240516154920.221445-4-stuart.w.hayes@gmail.com> <20240528063109.GA29965@lst.de> 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: On Tue, May 28, 2024 at 10:35:27PM -0500, stuart hayes wrote: > > > On 5/28/2024 1:31 AM, Christoph Hellwig wrote: > > On Thu, May 16, 2024 at 10:49:19AM -0500, Stuart Hayes wrote: > > > Add /sys/kernel/async_shutdown to allow user control of this feature: > > > > > > safe: shut down all devices synchronously, unless driver prefers async > > > shutdown (driver opt-in) (default) > > > on: shut down all devices asynchronously, unless disabled by the driver > > > (driver opt-out) > > > off: shut down all devices synchronously > > > > The on option seems very odd. IMHO safe is the only really sensible > > option, and maybe we have to support off as a bandaid due to userspace > > behavior dependent on synchronous shutdown, but I'd rather try even > > without that first. > > > > I added the option because of comments from Greg K-H on the v4 submission > of this patch--see > > https://lore.kernel.org/lkml/2023102151-rejoicing-studio-6126@gregkh/T/#m5d0459480bc0fda4563040cab2036839bcbb79a8). > > I thought it would be nice to have the option for testing, even if it gets > removed later, but I'll certainly remove it now if necessary. Opt-in is the requirement here, that's all I asked for. The "on" can probably be removed, and by doing that, you can make this option simpler as well. thanks, greg k-h