linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Christoph Hellwig <hch@infradead.org>,
	sandeen@redhat.com,
	"linux-ext4@vger.kernel.org device-mapper development"
	<dm-devel@redhat.com>,
	DarkNovaNick@gmail.com, linux-lvm@redhat.com
Subject: Re: [linux-lvm] do not disable ext4 discards on first discard failure? [was: Re: dm snapshot: ignore discards issued to the snapshot-origin target]
Date: Fri, 29 Apr 2011 09:55:57 -0400	[thread overview]
Message-ID: <20110429135556.GB31165@redhat.com> (raw)
In-Reply-To: <1D2A9D06-CBD3-4DC8-B1D5-69DDCEB44238@dilger.ca>

On Thu, Apr 28 2011 at  9:12pm -0400,
Andreas Dilger <adilger.kernel@dilger.ca> wrote:

> On Apr 28, 2011, at 14:59, Mike Snitzer wrote:
> > Eric and I think it is best to revert this commit:
> > a30eec2 ext4: stop issuing discards if not supported by device
> > 
> > (though ideally ext4 would still WARN_ONCE per superblock with something
> > like: "discard failed, please consider disabling discard support")
> > 
> > 1) The user asked for discards (with '-o discard' mount option)
> >   - what is the real harm in coninuing to issue them even if it _seems_
> >     they aren't supported?
> 
> Aren't discard operations considered barriers?  If there are needless
> discard operations being sent to the disk then it seems like this
> would have a non-zero performance penalty, just by virtue of blocking
> IO submissions at the block device layer.

The blkdev_issue_discard() interface is synchronous.  Given that, yes it
will cause jbd2 to block waiting for it to complete.

For DM, the discard would not actually be issued to the physical storage
there is still work that would be done to submit the bio only to have DM
return -EOPNOTSUPP.

But ext4 doesn't care if it is on DM or not; so I agree that cost of
continuing to issue discards would be higher on non-DM storage.

That said, the user asked for discards via -o discard.  Ext4 is taking
that to mean "no the user only _really_ asked for discards if they will
always work".

If ext4 is committed to that disable-on-first-failure hueristic then
Documentation/filesystems/ext4.txt should probably speak to it.
 
> > 2) assuming the entire block device uniformly supports discards can
> >   be flawed (a DM device's discard support can vary based on logical
> >   offset).
> 
> Hybrid storage is potentially an increasingly popular configuration.
> We've been looking at DM-mapped SSD RAID-1 + HDD RAID-6 arrays for
> ext4 to allow storing only the metadata on SSD.

Meaning you assemble a tailormade DM linear (concat) device that mixes
the two?  What are you using to assemble that device -- presummably some
code that is aware of ext4's metadata and data layout?  Code hooked off
of mkfs?

> That said, it may
> make sense to have the DM translation layer check the component
> devices of an LV to see if discard is supported on any of them, and
> only return -EOPNOTSUPP if none of them do.

That is what DM does.  DM will only return -EOPNOTSUPP if a particular
target doesn't support discards.  If only one device supports discards
then the entire logical DM device advertises discard support.

Mike

  reply	other threads:[~2011-04-29 13:55 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 14:59 [linux-lvm] Testing TRIM with LVM DarkNovaNick
2011-04-12 23:47 ` Mike Snitzer
2011-04-13  1:47   ` DarkNovaNick
2011-04-13  8:41     ` Zdenek Kabelac
2011-04-13 15:38       ` DarkNovaNick
2011-04-13 22:40     ` [linux-lvm] [PATCH] dm snapshot: add discard support to the snapshot-origin target [was: Re: Testing TRIM with LVM] Mike Snitzer
2011-04-13 23:48       ` [linux-lvm] " Mike Snitzer
2011-04-26 17:32         ` Mike Snitzer
2011-04-28  0:19           ` [linux-lvm] [PATCH] dm snapshot: ignore discards issued to the snapshot-origin target Mike Snitzer
2011-04-28  7:53             ` [linux-lvm] [dm-devel] " Christoph Hellwig
2011-04-28 20:59               ` [linux-lvm] do not disable ext4 discards on first discard failure? [was: Re: dm snapshot: ignore discards issued to the snapshot-origin target] Mike Snitzer
2011-04-28 21:28                 ` Eric Sandeen
2011-04-28 22:59                   ` Alasdair G Kergon
2011-04-28 23:01                     ` Eric Sandeen
2011-04-28 23:11                       ` Alasdair G Kergon
2011-04-29  1:12                 ` Andreas Dilger
2011-04-29 13:55                   ` Mike Snitzer [this message]
2011-04-29  9:30                 ` Lukas Czerner
2011-04-29 12:24                   ` [linux-lvm] [dm-devel] " Alasdair G Kergon
2011-04-29 12:29                     ` Christoph Hellwig
2011-04-29 14:28                       ` Eric Sandeen
2011-04-29 15:13                         ` Ray Morris
2011-05-04 16:33                         ` Ted Ts'o
2011-05-04 17:02                           ` Lukas Czerner
2011-05-02  7:16                     ` Lukas Czerner
2011-05-02  8:13                       ` Alasdair G Kergon
2011-05-02  8:19                         ` Christoph Hellwig
2011-05-02 10:24                           ` Lukas Czerner
2011-05-02 12:48                             ` [linux-lvm] " Mike Snitzer
2011-05-02 13:05                               ` Lukas Czerner
2011-05-02 14:47                                 ` Eric Sandeen
2011-05-02 14:48                                   ` Christoph Hellwig
2011-05-02 14:58                                   ` Lukas Czerner
2011-05-02 13:48                             ` [linux-lvm] [dm-devel] " Martin K. Petersen
2011-05-02 14:20                             ` Martin K. Petersen
2011-05-02 14:39                               ` Lukas Czerner
2011-05-02 14:50                                 ` Martin K. Petersen
2011-05-02 14:58                                 ` [linux-lvm] " Mike Snitzer
2011-05-02 16:58                                 ` [linux-lvm] [dm-devel] " Martin K. Petersen
2011-05-03  8:57                                   ` Lukas Czerner
2011-05-04 15:10                                     ` Martin K. Petersen
2011-05-04 16:02                                       ` [linux-lvm] " Mike Snitzer
2011-05-04 16:50                                         ` Martin K. Petersen
2011-05-04 18:03                                           ` Mike Snitzer
2011-05-04 17:10                                       ` [linux-lvm] [dm-devel] " Lukas Czerner
2011-05-04 17:32                                         ` Martin K. Petersen
2011-05-04 17:35                                           ` Lukas Czerner
2011-05-18 12:16                                       ` [linux-lvm] " Mike Snitzer
2011-05-18 12:52                                         ` Mike Snitzer
2011-05-04 15:16                                     ` [linux-lvm] [dm-devel] " Martin K. Petersen
2011-05-04 16:12                                       ` Lukas Czerner
2011-05-05  8:33                                       ` Karel Zak
2011-05-05 10:48                                         ` Lukas Czerner
2011-04-14 15:31       ` [linux-lvm] [PATCH] dm snapshot: add discard support to the snapshot-origin target [was: Re: Testing TRIM wi DarkNovaNick

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=20110429135556.GB31165@redhat.com \
    --to=snitzer@redhat.com \
    --cc=DarkNovaNick@gmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=dm-devel@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-lvm@redhat.com \
    --cc=sandeen@redhat.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).