From: Kent Overstreet <kent.overstreet@gmail.com>
To: Egon Alter <egon.alter@gmx.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] bcache: ver 3
Date: Sat, 24 Apr 2010 12:08:40 -0800 [thread overview]
Message-ID: <4BD34FC8.9000702@gmail.com> (raw)
In-Reply-To: <201004241747.41045.egon.alter@gmx.net>
On 04/24/2010 07:47 AM, Egon Alter wrote:
>
> I'm wondering if this is similar to the "Cleancache" patches send a few days
> before.
>
> Could bcache provide a (block-dev) backend to cleancache? Also there is fs-
> cache (for networks-fs only currently). Can these caches be combined somehow?
>
> Egon
I just looked at cleancache, and it looks like it's trying to solve part
of the same problem at a different level - sort of giving the page cache
a second level, instead of transparently making block devices faster. I
didn't see any code for whatever holds pages when they're not in memory,
I gather this was originally intended for VMs where pages in the l2
cache are still in memory, just not memory owned by the vm kernel.
Managing the cache itself is much simpler in that case; IMO most of the
complexity involved in using an SSD as cache is the indexing,
allocation, etc. - it's kind of like writing a filesystem, minus the
notion of files, plus we can play fast and loose in certain ways.
That said, adding things to the cache should definitely be done more
like the way cleancache does it; the page cache is what knows what's
going on. So I don't think there's much if any code that could be
shared, but definitely the hooks cleancache/ramzswap are using is what
bcache should be using.
fs-cache is completely different, I haven't looked at it too much but
just knowing its approach I don't think there's any way it'll be as
efficient as bcache will be. It just makes more sense - makes things a
lot simpler and there's less overhead involved in working with ranges of
sectors than doing it at the filesystem level... and this way the
allocation is determined entirely by bcache, and can be better optimized
for ssd erase blocks. (Having the code run under generic_make_request
does make the code more interesting since we can't sleep, but that's a
solved issue and doesn't add to the work it does in the fast path).
next prev parent reply other threads:[~2010-04-24 20:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-24 15:47 [RFC][PATCH] bcache: ver 3 Egon Alter
2010-04-24 20:08 ` Kent Overstreet [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-04-23 19:41 Kent Overstreet
2010-04-23 20:07 ` Randy Dunlap
2010-04-23 20:17 ` Kent Overstreet
2010-04-23 20:19 ` Randy Dunlap
2010-04-23 20:46 ` Kent Overstreet
2010-04-23 20:39 ` Randy Dunlap
2010-04-23 21:05 ` Kent Overstreet
2010-04-25 11:48 ` Pavel Machek
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=4BD34FC8.9000702@gmail.com \
--to=kent.overstreet@gmail.com \
--cc=egon.alter@gmx.net \
--cc=linux-kernel@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