From: Michael Lyle <mlyle@lyle.org>
To: Pony Cheng <ponycheng0@gmail.com>, linux-bcache@vger.kernel.org
Subject: Re: bcache journal
Date: Tue, 30 Jan 2018 23:55:21 -0800 [thread overview]
Message-ID: <fa369a50-679d-4d37-7a5d-5f9181bb8878@lyle.org> (raw)
In-Reply-To: <CAATtUKmyuZUXq0SLx6YmMJPWzFfw15cNm=EGZpD6pxeuHGqt+g@mail.gmail.com>
Hi Pony Cheng--
On 01/28/2018 11:23 PM, Pony Cheng wrote:
> Hi all:
> I'm reading the source code of bcache, and I'm so confused about
> journal. Journal just use bucket of cache, why we need it, and what's
> the real purpose of journal in bcache. If we write to the bucket, do
> we need write it to journal first?
The purpose of the journal is to control write amplification from btree
node writes. If we have 100 things to insert into the btree because
we're just caching new things, and this would touch 100 different btree
nodes, we can just write the new nodes to the journal in a single I/O
instead of doing 100 different updates. Later, we can free the journal
pages by doing those updates, but hopefully be doing more than one
update to each btree node and significantly lessen the total amount of I/O.
>
> How do you think of these?
>
> Pony Cheng
Regards,
Mike
next prev parent reply other threads:[~2018-01-31 7:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 7:23 bcache journal Pony Cheng
2018-01-31 7:55 ` Michael Lyle [this message]
2018-02-02 2:18 ` Pony Cheng
-- strict thread matches above, loose matches on Subject: below --
2012-10-28 16:20 Bcache Journal Alex Pyrgiotis
[not found] ` <508D5B43.4040504-Hpc4xzY4zrDSDkk6z29a7FAUjnlXr6A1@public.gmane.org>
2012-10-29 20:43 ` Kent Overstreet
[not found] ` <20121029204330.GA14917-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-10-29 21:47 ` Alex Pyrgiotis
2012-11-02 3:44 ` James Sefton
[not found] ` <loom.20121102T043837-976-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2012-11-02 15:16 ` Kent Overstreet
[not found] ` <20121102151620.GB14917-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-11-02 16:44 ` James Sefton
[not found] ` <93462A6BCE1CD840B94554FBBEE4C93603075DA022-DfMK7iAD4PJfakIiyABxvNnpRUX5XqCHU7KNoL8tkdc@public.gmane.org>
2012-11-02 16:57 ` Kent Overstreet
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=fa369a50-679d-4d37-7a5d-5f9181bb8878@lyle.org \
--to=mlyle@lyle.org \
--cc=linux-bcache@vger.kernel.org \
--cc=ponycheng0@gmail.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).