linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-mmc@vger.kernel.org,
	Wenchao Chen <wenchao.chen666@gmail.com>,
	Avri Altman <avri.altman@wdc.com>,
	Christian Lohle <cloehle@hyperstone.com>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bean Huo <beanhuo@micron.com>
Subject: Re: [PATCH] mmc: core: Allow to avoid REQ_FUA if the eMMC supports an internal cache
Date: Tue, 21 Mar 2023 05:37:27 -0700	[thread overview]
Message-ID: <ZBmlB2K3KMt7Apv5@infradead.org> (raw)
In-Reply-To: <CAPDyKFogTyf30X+3JGeqf+yER_OLQ8JwXy6oEF3Rn78KzLSDxw@mail.gmail.com>

On Mon, Mar 20, 2023 at 04:24:36PM +0100, Ulf Hansson wrote:
> > Neither to ATA or SCSI, but applications and file systems always very
> > much expected it, so withou it storage devices would be considered
> > fault.  Only NVMe actually finally made it part of the standard.
> 
> Even if the standard doesn't say, it's perfectly possible that the
> storage device implements it.

That's exactly what I'm saying above.

> > But these are completely separate issue.  Torn writes are completely
> > unrelated to cache flushes.  You can indeed work around torn writes
> > by checksums, but not the lack of cache flushes or vice versa.
> 
> It's not a separate issue for eMMC. Please read the complete commit
> message for further clarifications in this regard.

The commit message claims that checksums replace cache flushes.  Which
is dangerously wrong.  So please don't refer me to it again - this
dangerously incorrect commit message is wht alerted me to reply to the
patch.

> > > However, the issue has been raised that reliable write is not
> > > needed to provide sufficient assurance of data integrity, and that
> > > in fact, cache flush can be used instead and perform better.
> >
> > It does not.
> 
> Can you please elaborate on this?

Flushing caches does not replace the invariant of not tearing subsector
writes.  And if you need to use reliable writes for (some) devices to
not tear sectors, no amount of cache flushing is going to paper over
the problem.

  reply	other threads:[~2023-03-21 12:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 16:45 [PATCH] mmc: core: Allow to avoid REQ_FUA if the eMMC supports an internal cache Ulf Hansson
2023-03-16 16:49 ` Christoph Hellwig
2023-03-16 19:12   ` Adrian Hunter
2023-03-20  6:25     ` Christoph Hellwig
2023-03-20 15:24       ` Ulf Hansson
2023-03-21 12:37         ` Christoph Hellwig [this message]
2023-03-21 13:28           ` Ulf Hansson
2023-03-21 10:36 ` Adrian Hunter
2023-03-21 11:03   ` Ulf Hansson
2023-03-21 11:12     ` Adrian Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZBmlB2K3KMt7Apv5@infradead.org \
    --to=hch@infradead.org \
    --cc=adrian.hunter@intel.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=cloehle@hyperstone.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wenchao.chen666@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).