Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp909991ybt; Tue, 7 Jul 2020 03:20:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqI3WX62iPDNjGe290e6vLdgbadPnhPfvH+ZbCkZ5aDY01GRiKulVJb5zBROMn/VPXVV9S X-Received: by 2002:aa7:c341:: with SMTP id j1mr63079459edr.197.1594117201119; Tue, 07 Jul 2020 03:20:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594117201; cv=none; d=google.com; s=arc-20160816; b=XdO10aInhyN2U8XxepJgEoah7APDpZ112mOrciTX9Q9RE9VoEBaUwDP5ISt5yCCnfg gF27RH6FrI4dDfKEdZz4C7u+CXIaOSmSFDu9BqOQ8rteVUG7AELVS7nRPLlVKNVCZ8nH n8PiergWgbr+UFW2FiiWMwpPlDeLfzsqo7OzzOFrHfguk6h9+UoqOkeVtEq7FVjd3Sen t/8L+FXJI6wEkwnyffoFTl0g7tCIXAZjmAmwR0/DKKQ4BH6FZX7JeU0U4mV/wpRtF9Qk bf0kHKAhCPJMUYnafBWumQGNXnYB3MCHknMZSi3j1VRE20mivpPwDzgYLgbQqJ76U3/g +s1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qTiURiDacJKwIm9SPgxJUCGJ55dLKh31h25sBYHTVY4=; b=C2FwaKwqhRHqRytQbckrwbhfvOSORiBfIiA5reVyvSEfam3btmYtu35N9Q1i+YVg4B 1shLAz173qvBIhcYFtiNpQTt+gsL3+5RP4BrF/da6dkinTxW5E0REhg94gXnJD/0rd2S Vm7tKyG2RK2tqkdB9WaKJNwbI4yz1Ysec82+ASvAGHnM1Xxj3x4zUbGL2LCKeUJ3kEGb W47nH5mzO8VPEJudeA1adGUO6tGjAjAPyZWnAMYLai7pRp/Ts7rXXLfFWe57Ugwi3YIo qjmVObPS+CeeoojdkgJrkS3ADSsg/+yXm74Ft4gB36kjcnyCMPoaJRY9i5D81PI8LUzD pqxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=GSTrLIas; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si10746737edw.59.2020.07.07.03.19.36; Tue, 07 Jul 2020 03:20:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=GSTrLIas; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728492AbgGGKSd (ORCPT + 99 others); Tue, 7 Jul 2020 06:18:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728467AbgGGKSZ (ORCPT ); Tue, 7 Jul 2020 06:18:25 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EFB7C061755; Tue, 7 Jul 2020 03:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=qTiURiDacJKwIm9SPgxJUCGJ55dLKh31h25sBYHTVY4=; b=GSTrLIasbmmxekUaiMETEG7GR8 Rig4k5So96WoWX7n5bmmOJFaI06dZ9Sesys8SnOitzNsrJHBoPy7Fy/wBmTq+6xPdSIoxh9FNsUb7 iJeV+Jt0vqKsMPwVuDZ79DNwwdCkGZrsPPsOq21ZS7Is19nbpwoXyHm/cbg7ks/4RE5tHgj1WRcOV 4cjZaBfmCOWacCaMf4nSgg0FT30vqbUq8PQmJfx/bOcfQPyZGgucs3PJxSI7GRzgDeiGVjkWBTbdD ayE8E7T07lHuz7FBn17/r+UPE53/4fT3XKcxF6+zVyFmL3IHK7sgGkp/RaFHi2Ghqdxwso7CsYiiO CU+fZm9A==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jskft-00030a-CJ; Tue, 07 Jul 2020 10:18:05 +0000 Date: Tue, 7 Jul 2020 11:18:05 +0100 From: Christoph Hellwig To: Henrique de Moraes Holschuh Cc: Christoph Hellwig , Simon Arlott , "James E.J. Bottomley" , "Martin K. Petersen" , Jonathan Corbet , Linux Kernel Mailing List , linux-scsi@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH] scsi: sd: stop SSD (non-rotational) disks before reboot Message-ID: <20200707101805.GA11097@infradead.org> References: <499138c8-b6d5-ef4a-2780-4f750ed337d3@0882a8b5-c6c3-11e9-b005-00805fc181fe> <20200618072138.GA11778@infradead.org> <9877e7de-d573-694b-2b75-95192756684b@0882a8b5-c6c3-11e9-b005-00805fc181fe> <20200618134904.GA26650@infradead.org> <20200705213125.GC8285@khazad-dum.debian.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200705213125.GC8285@khazad-dum.debian.net> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 05, 2020 at 06:31:25PM -0300, Henrique de Moraes Holschuh wrote: > On Thu, 18 Jun 2020, Christoph Hellwig wrote: > > > For SSDs, I don't think an extra stop should ever be an issue. > > > > Extra shutdowns will usually cause additional P/E cycles. > > I am not so sure. We're talking about enforcing clean shutdowns here > (from the SSD PoV). > > A system reboot takes enough time that the SSD is likely to do about the > same amount of P cycles commiting to FLASH any important data that it > would trigger by a shutdown sequence, simply because it should not keep > important data in RAM for too long. By extension, it would not increase > E cycles either. > > OTOH, unclean shutdowns *always* cause extra P/E, and that's if you're > lucky enough for it to not cause anything much worse. The point is - with a normal system that doesn't required your odd reboot method we'll normally not shut down the SSD at all, and that won't require a P/E cycle. But the whole thing is a moot point - if you quirk your system to require a poweroff to reboot the kernel should trat it as a power off as far as shutdown/remove callbacks are concerned and everything will just work as intended.