From: James Bottomley <jejb@linux.ibm.com>
To: Bart Van Assche <bvanassche@acm.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Asutosh Das <asutoshd@codeaurora.org>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
Avri Altman <avri.altman@wdc.com>,
linux-scsi@vger.kernel.org, Bean Huo <beanhuo@micron.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Jinyoung Choi <j-young.choi@samsung.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH 2/2] scsi: ufs: Use SYNCHRONIZE CACHE instead of FUA
Date: Thu, 02 Feb 2023 17:13:59 -0500 [thread overview]
Message-ID: <3e72df08118eefd2fc738e71c87d65ebce4df330.camel@linux.ibm.com> (raw)
In-Reply-To: <89a59589-a8b6-21cd-9f77-a595216974dc@acm.org>
On Thu, 2023-02-02 at 11:00 -0800, Bart Van Assche wrote:
> On 2/2/23 10:46, James Bottomley wrote:
> > Well, that may not be true in all situations. Semantically FUA is
> > a barrier: it can be implemented such that it destages only the
> > current write plus the cache writes that occurred before the write
> > with the FUA. It could also be implemented as you suggest above,
> > which simply destages the entire cache, but it doesn't have to be.
> > One of the reasons for FUA to exist is the potential difference
> > between the two.
>
> Hi James,
>
> Although support for the barrier concept has been removed from the
> block layer, would it be possible to tell me in which T10 document I
> can find more information about the barrier semantics? All I found
> in the latest SBC-5 draft (revision 4; 2023-01-24) about FUA is the
> following (section 5.40 WRITE (10)):
I have only a vague recollection of manufacturers implementing this
semantic but ...
> "A force unit access (FUA) bit set to one specifies that the device
> server shall write the logical blocks to:
> a) the non-volatile cache, if any; or
> b) the medium.
> An FUA bit set to zero specifies that the device server shall write
> the logical blocks to:
> a) volatile cache, if any;
> b) non-volatile cache, if any; or
> c) the medium."
>
> To me the description of FUA in the SBC-3 draft from 11 November 2013
> seems identical to the above text.
So what that says is the FUA write writes to the medium and *doesn't*
flush the volatile cache (so any writeback data stays there). I assume
this style is for metadata reservations, so we guarantee fs tree
consistency but not necessarily file data consistency. However, that
makes flushing everything a way bigger hammer than this behaviour.
James
next prev parent reply other threads:[~2023-02-02 22:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 18:06 [PATCH 0/2] Use SYNCHRONIZE CACHE instead of FUA for UFS devices Bart Van Assche
2023-02-01 18:06 ` [PATCH 1/2] scsi: core: Introduce the BLIST_BROKEN_FUA flag Bart Van Assche
2023-02-01 18:06 ` [PATCH 2/2] scsi: ufs: Use SYNCHRONIZE CACHE instead of FUA Bart Van Assche
2023-02-02 1:54 ` Daejun Park
2023-02-02 4:32 ` kernel test robot
2023-02-02 7:52 ` Adrian Hunter
2023-02-02 18:09 ` Bart Van Assche
2023-02-02 18:46 ` James Bottomley
2023-02-02 19:00 ` Bart Van Assche
2023-02-02 22:13 ` James Bottomley [this message]
2023-02-02 9:01 ` kernel test robot
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=3e72df08118eefd2fc738e71c87d65ebce4df330.camel@linux.ibm.com \
--to=jejb@linux.ibm.com \
--cc=adrian.hunter@intel.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=j-young.choi@samsung.com \
--cc=jaegeuk@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stanley.chu@mediatek.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