From: Pavel Goran <via-bcache@pvgoran.name>
To: Eric Wheeler <linux-bcache@vger.kernel.org>
Subject: Re[2]: [PATCH 1/2] bcache: introduce ioprio-based bypass/writeback hints
Date: Thu, 29 Sep 2016 13:57:00 +0700 [thread overview]
Message-ID: <1515763256.20160929135700@pvgoran.name> (raw)
In-Reply-To: <alpine.LRH.2.11.1609271614340.29933@mail.ewheeler.net>
Hello Eric,
Thursday, September 29, 2016, 1:21:53 AM, you wrote:
> It respects policy first of course. You can see the top of
> should_writeback() in the patch as context:
> if (cache_mode != CACHE_MODE_WRITEBACK || [...]
So the priority-dependent logic is only applied when cache mode is
"writeback", right? Then, what does "Original bcache logic" from the table in
the original patch description mean? That is, how does it differ from
"Writeback" from the same table?
Does "Writeback" there mean that bcache would write data to the cache
*always*, even in case of linear write, or in other situations where the
original writeback logic would bypass cache? If so, the table should perhaps
be adjusted to say "Always writeback" instead of "Writeback", and "Original
writeback logic" instead of "Original bcache logic".
> If not already in cache, it will read from the backing device and will not
> promote into (pollute) your cache. Having idle IOs bypass the cache can
> increase performance everywhere else since you probably don't care about
> the performance of idle IOs.
Ok, this sounds convincing.
Ideally this would be handled by some kind of priority semantics within the
cache, so that "high-priority" data would always replace "low-priority" data,
and "low-priority" data would only replace "high-priority" data if it's really
old. It's entirely feasible to implement within bcache, but probably it
wouldn't be easy, and might even mean changing cache data format.
Your SSD wearout problem would (again, ideally) be handled by some kind of
custom process attribute (no idea if the kernel even has this kind of concept,
probably not) that would signal bcache to bypass caching for IO that
originates from this process. The additional "bulk" priority class proposed by
Kai would also be a good solution.
However, given that these two approaches are supposedly unavailable, using
existing IO priorities looks like an acceptable solution.
> If you really want idle IO that can writeback, then I can set the default
> for ioprio_writeback and/or ioprio_bypass to be disabled until a user
> explicitly sets them.
Are you talking about bcache options available via sysfs? It would be good to
have control over the priority-dependent logic in this way (or it's already
implemented?). Not sure what the defaults should be, though. :) It would be
even better to have the possibility to save these flags to the superblock, if
it's something that can be easily implemented.
Pavel Goran
next prev parent reply other threads:[~2016-09-29 6:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 23:17 [PATCH 1/2] bcache: introduce ioprio-based bypass/writeback hints Eric Wheeler
2016-09-27 1:43 ` Pavel Goran
2016-09-27 2:43 ` Kai Krakow
2016-09-28 18:21 ` Eric Wheeler
2016-09-29 6:57 ` Pavel Goran [this message]
2016-09-29 18:31 ` Re[2]: " Eric Wheeler
2016-09-29 18:34 ` Kai Krakow
2016-09-29 22:50 ` Eric Wheeler
2016-09-28 19:26 ` Kai Krakow
2016-09-28 21:38 ` Eric Wheeler
2016-09-29 2:19 ` Kai Krakow
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=1515763256.20160929135700@pvgoran.name \
--to=via-bcache@pvgoran.name \
--cc=linux-bcache@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