linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Artur Paszkiewicz <artur.paszkiewicz@intel.com>, shli@kernel.org
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH v2 03/12] raid5-cache: add a new policy
Date: Thu, 08 Dec 2016 10:24:23 +1100	[thread overview]
Message-ID: <87lgvr2uhk.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <ba67c43b-067e-c565-8c70-4bb5544392a3@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3087 bytes --]

On Thu, Dec 08 2016, Artur Paszkiewicz wrote:

> On 12/07/2016 01:46 AM, NeilBrown wrote:
>> On Tue, Dec 06 2016, Artur Paszkiewicz wrote:
>> 
>>> Add a source file for the new policy implementation and allow selecting
>>> the policy based on the policy_type parameter in r5l_init_log().
>>>
>>> Introduce a new flag for rdev state flags to allow enabling the new
>>> policy from userspace.
>> 
>> This seems odd.  Why is this a per-device flag?
>> It makes sense for "journal" to be a per-device flag, because only one
>> device is the journal device and it is obviously different from the
>> others.
>> 
>> But with the ppl, all devices serve as journal devices.  So we would
>> need to set journal_ppl on all devices?  What happens if you set it on
>> some, but not others?  I see you get an error.
>> 
>> I think some sort of array-wide setting would make more sense, would it
>> not?
>
> Yes, it would. The problem exists only for external metadata, because
> for native there is a feature flag in the superblock and a corresponding
> flag in mddev->flags. Patch 12 adds a sysfs attribute to control the
> policy at runtime but it would have to be moved out of raid5 personality
> into the main md code. I didn't like the idea of adding something
> specific to raid5 to generic code and visible in sysfs for unrelated
> raid levels.
>
>> And what is an RWH???  A Really Weird Handle ??
>> 
>> I guess it is probably a Raid5 Write Hole ?  At the very least there
>> should be a comment explaining this when you define the enum. (remember,
>> you are trying to make it easier for reviewers).
>
> That's right, RWH stands for RAID Write Hole. I think I introduced it in
> the cover letter, but I'll explain it also in the code.
>
>> It might almost make sense for bitmap/metadata to be used here.
>> It can currently be "external" "internal" "clustered".
>> Allow also "journalled" or "partial-partiy-log" ???
>> 
>> Maybe not ... but I'd definitely prefer a global setting, and one that
>> didn't use an obscure abbreviation.
>
> So do you think the sysfs attribute from patch 12 ("rwh_policy") could
> be made global? This would simplify things but it doesn't seem right.
> And about the abbreviation, should it be called "write_hole_policy" or
> "raid5_write_hole_policy"? Maybe using bitmap/metadata is not a bad
> idea...

How about we call it "resync_policy" which describes how to cope with
unexpected shutdown.  Options include:

 full     regenerate all redundancy info after a crash
 bitmap   only regenerate redundancy info indicated by bitmap
          (both these suseptible to write-hole on raid456)
 journal  raid456 only, though could theoretically be extended
          to raid1, raid10 : log transactions and replay after crash
 ppl      raid456 only: log partial-parity before writes.

With external metadata, this must be set explicitly.  With internal
metadata, it is set best on flags etc.

Thoughts?  I'm not really happy with "full", but I cannot think of a
better name.

Thanks,
NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2016-12-07 23:24 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-05 15:31 [PATCH v2 00/12] Partial Parity Log for MD RAID 5 Artur Paszkiewicz
2016-12-05 15:31 ` [PATCH v2 01/12] raid5-cache: move declarations to separate header Artur Paszkiewicz
2016-12-05 15:31 ` [PATCH v2 02/12] raid5-cache: add policy logic Artur Paszkiewicz
2016-12-05 15:31 ` [PATCH v2 03/12] raid5-cache: add a new policy Artur Paszkiewicz
2016-12-07  0:46   ` NeilBrown
2016-12-07 14:36     ` Artur Paszkiewicz
2016-12-07 23:24       ` NeilBrown [this message]
2016-12-08 10:28         ` Artur Paszkiewicz
2016-12-08 21:22           ` NeilBrown
2016-12-05 15:31 ` [PATCH v2 04/12] md: superblock changes for PPL Artur Paszkiewicz
2016-12-05 15:31 ` [PATCH v2 05/12] raid5-ppl: Partial Parity Log implementation Artur Paszkiewicz
2016-12-06  1:06   ` kbuild test robot
2016-12-07  1:17   ` NeilBrown
2016-12-07 14:37     ` Artur Paszkiewicz
2016-12-05 15:31 ` [PATCH v2 06/12] raid5-ppl: calculate partial parity Artur Paszkiewicz
2016-12-05 15:31 ` [PATCH v2 07/12] md: mddev_find_container helper function Artur Paszkiewicz
2016-12-07  1:23   ` NeilBrown
2016-12-05 15:31 ` [PATCH v2 08/12] md: expose rdev->sb_start as sysfs attribute Artur Paszkiewicz
2016-12-07  1:25   ` NeilBrown
2016-12-05 15:31 ` [PATCH v2 09/12] raid5-ppl: read PPL signature from IMSM metadata Artur Paszkiewicz
2016-12-07  1:25   ` NeilBrown
2016-12-07 14:38     ` Artur Paszkiewicz
2016-12-07 23:27       ` NeilBrown
2016-12-08 10:36         ` Artur Paszkiewicz
2016-12-05 15:31 ` [PATCH v2 10/12] raid5-ppl: recovery from dirty shutdown using PPL Artur Paszkiewicz
2016-12-05 15:31 ` [PATCH v2 11/12] raid5-ppl: support disk add/remove with distributed PPL Artur Paszkiewicz
2016-12-07  1:29   ` NeilBrown
2016-12-05 15:31 ` [PATCH v2 12/12] raid5-ppl: runtime PPL enabling or disabling Artur Paszkiewicz
2016-12-07  0:32 ` [PATCH v2 00/12] Partial Parity Log for MD RAID 5 NeilBrown
2016-12-07 14:36   ` Artur Paszkiewicz
2016-12-07 17:09     ` Shaohua Li
2016-12-13 15:25       ` Jes Sorensen
2016-12-14 19:47         ` Shaohua Li
2016-12-15 11:44           ` Artur Paszkiewicz
2016-12-16 23:24             ` Shaohua Li
2017-01-03 15:42               ` Jes Sorensen
2017-01-04  8:01                 ` Artur Paszkiewicz
2017-01-04 13:29                   ` Jes Sorensen

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=87lgvr2uhk.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=artur.paszkiewicz@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=shli@kernel.org \
    /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).