All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Krakow <hurikhan77@gmail.com>
To: linux-bcache@vger.kernel.org
Subject: Re: [PATCH 1/2] bcache: introduce ioprio-based bypass/writeback hints
Date: Tue, 27 Sep 2016 04:43:48 +0200	[thread overview]
Message-ID: <20160927044348.25fedb75@jupiter.sol.kaishome.de> (raw)
In-Reply-To: 1610652744.20160927084309@pvgoran.name

Am Tue, 27 Sep 2016 08:43:09 +0700
schrieb Pavel Goran <via-bcache@pvgoran.name>:

> Hello Eric,
> 
> Tuesday, September 27, 2016, 6:17:22 AM, you wrote:
> 
> > Add support to bcache hinting functions and sysfs to hint by the
> > ioprio of 'current' which can be configured with `ionice`.  
> 
> > Cache hinting is configurable by writing 'class,level' pairs to
> > sysfs. These are the defaults:
> >         echo 2,7 > /sys/block/bcache0/bcache/ioprio_bypass
> >         echo 2,0 > /sys/block/bcache0/bcache/ioprio_writeback  
> 
> > (-p) IO Class    (-n) Class level       Action
> > -----------------------------------------------------
> > (1) Realtime      0-7                           Writeback
> > (2) Best-effort     0                           Writeback
> > (2) Best-effort   1-6                           Original bcache
> > logic (2) Best-effort     7                           Bypass cache
> > (3) Idle          n/a                           Bypass cache  
> 
> Not sure it's a good idea, at all. If I set cache policy to, say,
> write-through, then I expect write-back to never happen, regardless
> of what userspace does with IO priority.
> 
> Similarly, using low IO priority (idle or best effort-7) should not
> make IO *slow regardless of any other IO load* (which would happen if
> cache is completely bypassed).
> 
> Right now, it looks to me as inappropriate mixing of different
> concepts. Unless I fail to understand something.

I'm also uncomfortable with mixing concepts but I like the idea of
this. In the end, "idle" means that you don't care about the
performance of the process anyways.

I think the kernel already supports cache hinting in the sense of
"don't pollute my cache with these file operations". It should maybe
better hook in with that but I think this was already discussed here.
The outcome was that mixing different cache levels is also not a good
idea.

Currently, sticking to using "ioprio_bypass" would probably the best we
can easily get. I strongly object to enable "ioprio_writeback" to
bypass whatever policy was assigned to the device.

So, +1 for ioprio_bypass, but NACK for ioprio_writeback...

Maybe it would make sense to have another IO class like "bulk" which
could work like "idle" but also bypasses writing to caches and thus
stops flushing important data out of cache (and as a side-effect also
reduces flash wearing for bulk operations).


-- 
Regards,
Kai

Replies to list-only preferred.

  reply	other threads:[~2016-09-27  2:44 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 [this message]
2016-09-28 18:21     ` Eric Wheeler
2016-09-29  6:57       ` Re[2]: " Pavel Goran
2016-09-29 18:31         ` 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=20160927044348.25fedb75@jupiter.sol.kaishome.de \
    --to=hurikhan77@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.