From: NeilBrown <nfbrown@novell.com>
To: Song Liu <songliubraving@fb.com>,
"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>
Cc: Shaohua Li <shli@fb.com>,
"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"hch@infradead.org" <hch@infradead.org>,
Kernel Team <Kernel-team@fb.com>
Subject: Re: [RFC 4/5] r5cache: write part of r5cache
Date: Thu, 02 Jun 2016 08:37:29 +1000 [thread overview]
Message-ID: <87bn3kr0wm.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <8FB9AC1E-AB6D-41B2-9411-C924B23FA7AF@fb.com>
[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]
On Wed, Jun 01 2016, Song Liu wrote:
>>
>>It isn't at all clear to me why you need the extra page. Could you
>>explain when and why the ->page and the ->orig_page would contain
>>different content and both of the content would be needed?
>>
>
> In prexor, we need read old data from the disk to perform the
> substract-xor. In the meanwhile, we need a buffer for the new data.
> When there is no write cache, the new data is in the page of bio.
> With write cache, however, the bio might be already released.
> Therefore, we will need an extra page here: orig_page for new
> Cached data, while newly allocated page just hold old data for prexor.
>
Ahh, I get it now - thanks. The fact that you said "page" rather than
"pages" threw me. I assumed it was a page for the parity block only,
which is wrong.
So I would write:
For RMW, the code allocates an extra page for each data block being
updated. This is stored in r5dev->page and the old data is read into
it. Then the prexor calculation subtracts ->page from the parity
block, and the reconstruct calculation adds the ->orig_page data back
into the parity block.
Or something like that.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2016-06-01 22:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-27 5:29 [RFC 0/5] raid5-cache: the write cache part Song Liu
2016-05-27 5:29 ` [RFC 1/5] add bio_split_mddev Song Liu
2016-05-31 9:13 ` Guoqing Jiang
2016-06-01 13:18 ` Song Liu
2016-05-27 5:29 ` [RFC 2/5] move stripe cache define and functions to raid5.h Song Liu
2016-05-27 5:29 ` [RFC 3/5] r5cache: look up stripe cache for chunk_aligned_read Song Liu
2016-06-01 2:52 ` NeilBrown
2016-06-01 13:23 ` Song Liu
2016-05-27 5:29 ` [RFC 4/5] r5cache: write part of r5cache Song Liu
2016-05-31 9:00 ` Guoqing Jiang
2016-06-01 13:13 ` Song Liu
2016-06-01 3:12 ` NeilBrown
2016-06-01 13:36 ` Song Liu
2016-06-01 22:37 ` NeilBrown [this message]
2016-05-27 5:29 ` [RFC 5/5] r5cache: naive reclaim approach Song Liu
2016-06-01 3:16 ` NeilBrown
2016-06-01 13:24 ` Song Liu
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=87bn3kr0wm.fsf@notabene.neil.brown.name \
--to=nfbrown@novell.com \
--cc=Kernel-team@fb.com \
--cc=dan.j.williams@intel.com \
--cc=hch@infradead.org \
--cc=linux-raid@vger.kernel.org \
--cc=shli@fb.com \
--cc=songliubraving@fb.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).