linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars Ellenberg <lars.ellenberg@linbit.com>
To: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Bart Van Assche <bart.vanassche@sandisk.com>,
	Jens Axboe <axboe@fb.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"drbd-dev@lists.linbit.com" <drbd-dev@lists.linbit.com>
Subject: [PATCH 05/30] drbd: Introduce new disk config option rs-discard-granularity
Date: Mon, 25 Apr 2016 22:37:05 +0200	[thread overview]
Message-ID: <20160425203705.GD25048@soda.linbit> (raw)
In-Reply-To: <4163185.CbU2BaktXH@phil-dell-xps.local>

On Mon, Apr 25, 2016 at 02:49:11PM -0500, Philipp Reisner wrote:
> Am Montag, 25. April 2016, 11:48:30 schrieb Bart Van Assche:
> > On 04/25/2016 09:42 AM, Philipp Reisner wrote:
> > > Am Montag, 25. April 2016, 08:35:26 schrieb Bart Van Assche:
> > >> On 04/25/2016 05:10 AM, Philipp Reisner wrote:
> > >>> As long as the value is 0 the feature is disabled. With setting
> > >>> it to a positive value, DRBD limits and aligns its resync requests
> > >>> to the rs-discard-granularity setting. If the sync source detects
> > >>> all zeros in such a block, the resync target discards the range
> > >>> on disk.
> > >> 
> > >> Can you explain why rs-discard-granularity is configurable instead of
> > >> e.g. setting it to the least common multiple of the discard
> > >> granularities of the underlying block devices at both sides?
> > > 
> > > we had this idea as well. It seems that real world devices like larger
> > > discards better than smaller discards. The other motivation was that
> > > a device mapper logical volume might change it on the fly...
> > > So we think it is best to delegate the decision on the discard chunk
> > > size to user space.
> > 
> > Hello Phil,
> > 
> > Are you aware that for aligned discard requests the discard granularity
> > does not affect the size of discard requests at all?
> > 
> > Regarding LVM volumes: if the discard granularity for such volumes can
> > change on the fly, shouldn't I/O be quiesced by the LVM kernel driver
> > before it changes the discard granularity? I think that increasing
> > discard granularity while I/O is in progress should be considered as a bug.
> > 
> > Bart.
> 
> Hi Bart,
> 
> I worked on this about 6 month ago, sorry for not having all the details
> at the top of my head immediately. I think it came back now:
> We need to announce the discard granularity when we create the device/minor.
> At might it might be that there is no connection to the peer node. So we
> are left with information about the discard granularity of the local
> backing device only.
> Therefore we decided to delegate it to the user/admin to provide the
> discard granularity for the resync process.

Also, even though it may be technically possible to discard at 512 Byte
granularity, you may want to have the resync only actually do it for
bigger chunks. for $reasons.

    Lars

  reply	other threads:[~2016-04-25 20:37 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 12:07 [PATCH 00/30] DBRD updates Philipp Reisner
2016-04-25 12:07 ` [PATCH 01/30] drbd: bitmap bulk IO: do not always suspend IO Philipp Reisner
2016-04-25 12:07 ` [PATCH 02/30] drbd: change bitmap write-out when leaving resync states Philipp Reisner
2016-04-25 12:07 ` [PATCH 03/30] drbd: Kill code duplication Philipp Reisner
2016-04-25 12:07 ` [PATCH 04/30] drbd: Implement handling of thinly provisioned storage on resync target nodes Philipp Reisner
2016-04-25 15:28   ` [Drbd-dev] " Bart Van Assche
2016-04-25 16:21     ` Philipp Reisner
2016-04-25 12:07 ` [PATCH 05/30] drbd: Introduce new disk config option rs-discard-granularity Philipp Reisner
2016-04-25 15:35   ` [Drbd-dev] " Bart Van Assche
2016-04-25 16:21     ` Philipp Reisner
2016-04-25 18:48       ` Bart Van Assche
2016-04-25 19:49         ` Philipp Reisner
2016-04-25 20:37           ` Lars Ellenberg [this message]
2016-04-25 12:07 ` [PATCH 06/30] drbd: Create the protocol feature THIN_RESYNC Philipp Reisner
2016-04-25 12:07 ` [PATCH 07/30] drbd: adjust assert in w_bitmap_io to account for BM_LOCKED_CHANGE_ALLOWED Philipp Reisner
2016-04-25 12:07 ` [PATCH 08/30] drbd: fix regression: protocol A sometimes synchronous, C sometimes double-latency Philipp Reisner
2016-04-25 12:07 ` [PATCH 09/30] drbd: fix for truncated minor number in callback command line Philipp Reisner
2016-04-25 12:07 ` [PATCH 10/30] drbd: allow parallel flushes for multi-volume resources Philipp Reisner
2016-04-25 12:07 ` [PATCH 11/30] drbd: when receiving P_TRIM, zero-out partial unaligned chunks Philipp Reisner
2016-04-25 16:37   ` [Drbd-dev] " Bart Van Assche
2016-04-25 20:32     ` Lars Ellenberg
2016-04-25 21:23   ` Lars Ellenberg
2016-04-25 12:07 ` [PATCH 12/30] drbd: possibly disable discard support, if backend has discard_zeroes_data=0 Philipp Reisner
2016-04-25 12:07 ` [PATCH 13/30] drbd: zero-out partial unaligned discards on local backend Philipp Reisner
2016-04-25 12:07 ` [PATCH 14/30] drbd: allow larger max_discard_sectors Philipp Reisner
2016-04-25 12:07 ` [PATCH 15/30] drbd: finish resync on sync source only by notification from sync target Philipp Reisner
2016-04-25 12:07 ` [PATCH 16/30] drbd: introduce unfence-peer handler Philipp Reisner
2016-04-25 12:07 ` [PATCH 17/30] drbd: don't forget error completion when "unsuspending" IO Philipp Reisner
2016-04-25 12:07 ` [PATCH 18/30] drbd: if there is no good data accessible, writes should be IO errors Philipp Reisner
2016-04-25 12:07 ` [PATCH 19/30] drbd: only restart frozen disk io when D_UP_TO_DATE Philipp Reisner
2016-04-25 12:07 ` [PATCH 20/30] drbd: discard_zeroes_if_aligned allows "thin" resync for discard_zeroes_data=0 Philipp Reisner
2016-04-25 12:07 ` [PATCH 21/30] drbd: report sizes if rejecting too small peer disk Philipp Reisner
2016-04-25 12:07 ` [PATCH 22/30] drbd: introduce WRITE_SAME support Philipp Reisner
2016-04-25 12:07 ` [PATCH 23/30] drbd: sync_handshake: handle identical uuids with current (frozen) Primary Philipp Reisner
2016-04-25 12:07 ` [PATCH 24/30] drbd: disallow promotion during resync handshake, avoid deadlock and hard reset Philipp Reisner
2016-04-25 12:07 ` [PATCH 25/30] drbd: bump current uuid when resuming IO with diskless peer Philipp Reisner
2016-04-25 12:07 ` [PATCH 26/30] drbd: code cleanups without semantic changes Philipp Reisner
2016-04-25 12:07 ` [PATCH 27/30] drbd: get rid of empty statement in is_valid_state Philipp Reisner
2016-04-25 12:07 ` [PATCH 28/30] drbd: finally report ms, not jiffies, in log message Philipp Reisner
2016-04-25 12:07 ` [PATCH 29/30] drbd: al_write_transaction: skip re-scanning of bitmap page pointer array Philipp Reisner
2016-04-25 12:07 ` [PATCH 30/30] drbd: correctly handle failed crypto_alloc_hash Philipp Reisner
2016-06-13 14:08 [PATCH 00/30] DRBD updates Philipp Reisner
2016-06-13 14:08 ` [PATCH 05/30] drbd: Introduce new disk config option rs-discard-granularity Philipp Reisner
2016-06-13 15:11 [PATCH 00/30] DRBD updates Jens Axboe
2016-06-13 22:26 ` [PATCH 05/30] drbd: Introduce new disk config option rs-discard-granularity Philipp Reisner

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=20160425203705.GD25048@soda.linbit \
    --to=lars.ellenberg@linbit.com \
    --cc=axboe@fb.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=drbd-dev@lists.linbit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philipp.reisner@linbit.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).