From: Phil Turmel <philip@turmel.org>
To: guomingyang <guomingyang@bwstor.com.cn>, linux-raid@vger.kernel.org
Subject: Re: Is there any lazy initialization mechanism in linux-raid?
Date: Fri, 15 Dec 2017 07:34:01 -0500 [thread overview]
Message-ID: <698d56e7-8edb-fd85-1037-3a365002da02@turmel.org> (raw)
In-Reply-To: <46a50eb1-7836-9ec5-109a-59d223708547@bwstor.com.cn>
Good morning,
On 12/15/2017 06:50 AM, guomingyang wrote:
> Hi all:
>
> Today's disk is becoming larger and larger, and the recovery time
> is becoming longer. I'm thinking about a lazy initialization mechanism
> in linux raid5 to speed up recovery, which contains an un-initializing
> bitmap and a backend thread for initializing stripes lazily only after a
> stripe is write. The major difference is as follows:
>
> (1)When a raid4 or raid5 device is created, we don't recovery a
> disk as usual, instead we just set all the bit in un-initialize bitmap.
>
> (2)When a write happens and the corresponding un-initializing bit
> is set, we must first clean the bit, then wake up the backend thread to
> resync the stripe, and only do RCW in corresponding stripe before the
> resync is done.
It is interesting, and opens further possibilities. I'm not sure a
bitmap is the best data structure, but that's be an implementation detail.
> The major advantage of this mechanism is that when a disk is
> replaced, we can only recovery the stripes which have been initialized,
> so as to speed up recovery.
There's a time penalty added on any operation on the disk to determine
whether the location is initialized or not. What should reads do when
accessing uninitialized areas?
> Does linux-raid have similar mechanism today? Or is there anyone
> who has already working on similar mechanism?
By itself I don't think its worth the effort. However, the accounting
logic could also be used to support trim at the md layer, and the
reduction in actual I/O (supply zeroes when reading uninitialized) might
justify the performance impact of the logic.
I haven't seen any action on anything like this, so I would assume you'd
have to start with some patches.
Regards,
Phil
next prev parent reply other threads:[~2017-12-15 12:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 11:50 Is there any lazy initialization mechanism in linux-raid? guomingyang
2017-12-15 12:34 ` Phil Turmel [this message]
2017-12-16 4:22 ` NeilBrown
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=698d56e7-8edb-fd85-1037-3a365002da02@turmel.org \
--to=philip@turmel.org \
--cc=guomingyang@bwstor.com.cn \
--cc=linux-raid@vger.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