linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Tom Yan <tom.ty89@gmail.com>
Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 3/3] block: set REQ_PREFLUSH to the final bio from __blkdev_issue_zero_pages()
Date: Sun, 6 Dec 2020 15:05:54 +0100	[thread overview]
Message-ID: <4304d959-9155-3126-a858-28b338968916@suse.de> (raw)
In-Reply-To: <CAGnHSEk0C6VNQysGiysPS1yEXwu4U8PVCaVB2RR7oEgnr4Xz=w@mail.gmail.com>

On 12/6/20 2:32 PM, Tom Yan wrote:
> Why? Did you miss that it is in the condition where
> __blkdev_issue_zero_pages() is called (i.e. it's not WRITE SAME but
> WRITE). From what I gathered REQ_PREFLUSH triggers a write back cache
> (that is on the device; not sure about dirty pages) flush, wouldn't it
> be a right thing to do after we performed a series of WRITE (which is
> more or less purposed to get a drive wiped clean).
> 

But what makes 'zero_pages' special as compared to, say, WRITE_SAME?
One could use WRITE SAME with '0' content, arriving at pretty much the 
same content than usine zeroout without unmapping. And neither of them 
worries about cache flushing.
Nor should they, IMO.

These are 'native' block layer calls, providing abstract accesses to 
hardware functionality. If an application wants to use them, it would be 
the task of the application to insert a 'flush' if it deems neccessary.
(There _is_ blkdev_issue_flush(), after all).

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

  reply	other threads:[~2020-12-06 14:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-06  5:53 [PATCH 1/3] block: try one write zeroes request before going further Tom Yan
2020-12-06  5:53 ` [PATCH 2/3] block: make __blkdev_issue_zero_pages() less confusing Tom Yan
2020-12-06 11:29   ` Hannes Reinecke
2020-12-06 13:28     ` Tom Yan
2020-12-07 13:34   ` Christoph Hellwig
2020-12-08 12:54     ` Tom Yan
2020-12-06  5:53 ` [PATCH 3/3] block: set REQ_PREFLUSH to the final bio from __blkdev_issue_zero_pages() Tom Yan
2020-12-06 11:31   ` Hannes Reinecke
2020-12-06 13:32     ` Tom Yan
2020-12-06 14:05       ` Hannes Reinecke [this message]
2020-12-06 14:14         ` Tom Yan
2020-12-06 16:05           ` Hannes Reinecke
2020-12-08 12:51             ` Tom Yan
2020-12-07 13:35   ` Christoph Hellwig
2020-12-06 11:25 ` [PATCH 1/3] block: try one write zeroes request before going further Hannes Reinecke
2020-12-06 13:25   ` Tom Yan
2020-12-06 13:56     ` Hannes Reinecke
2020-12-06 14:07       ` Tom Yan
2020-12-06 14:28         ` Tom Yan
2020-12-07 13:36 ` Christoph Hellwig
2020-12-08 12:48   ` Tom Yan
2020-12-09 17:51     ` Christoph Hellwig
2020-12-08 22:46 ` Ewan D. Milne

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=4304d959-9155-3126-a858-28b338968916@suse.de \
    --to=hare@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tom.ty89@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).