Linux Device Mapper development
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Steven Wilton <swilton@fluentit.com.au>
Cc: dm-devel@redhat.com
Subject: Re: [PATCH v3] dm-cache watermarks
Date: Mon, 7 Mar 2016 09:17:13 -0500	[thread overview]
Message-ID: <20160307141713.GA19967@redhat.com> (raw)
In-Reply-To: <56DBFAEB.2050801@fluentit.com.au>

On Sun, Mar 06 2016 at  4:39am -0500,
Steven Wilton <swilton@fluentit.com.au> wrote:

> I realised that I over-thought the original logic.  The attached
> patch is much simpler - write back dirty cache entries at the
> migration threshold rate when we are over the low watermark, and we
> write back as fast as possible when we go over the high watermark.
> 
> The current behaviour can be replicated by setting the high
> watermark to 100, and the low watermark to 0.
> 
> regards
> 
> Steven

...

> diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
> index 7dab682..7b8b4a3 100644
> --- a/drivers/md/dm-cache-target.c
> +++ b/drivers/md/dm-cache-target.c
> @@ -2332,6 +2364,8 @@ static void set_cache_size(struct cache *cache, dm_cblock_t size)
>  }
>  
>  #define DEFAULT_MIGRATION_THRESHOLD 2048
> +#define DEFAULT_WRITEBACK_HIGH_WATERMARK 40
> +#define DEFAULT_WRITEBACK_LOW_WATERMARK 30
>  

These should default to current behavior (100 and 0 respectively, like
you mentioned above).

This change needs an accompanying Documentation update.  It also needs a
proper path header to accurately convey the scope of the change.

Please post v4 with these changes and then I'll take a closer look (as
I'm sure Joe will).  But please be aware that in general we want less
knobs, not more.

Thanks,
Mike

  reply	other threads:[~2016-03-07 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-06  9:39 [PATCH v3] dm-cache watermarks Steven Wilton
2016-03-07 14:17 ` Mike Snitzer [this message]
2016-03-08 15:16   ` Steven Wilton

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=20160307141713.GA19967@redhat.com \
    --to=snitzer@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=swilton@fluentit.com.au \
    /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