linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Chi Wu <wuchi.zero@gmail.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, tj@kernel.org, mszeredi@redhat.com,
	sedat.dilek@gmail.com, axboe@fb.com, jack@suse.cz,
	hcochran@kernelspring.com
Subject: Re: [PATCH] mm/page-writeback: Update the comment of Dirty position control
Date: Tue, 11 May 2021 11:06:32 +0200	[thread overview]
Message-ID: <20210511090632.GH24154@quack2.suse.cz> (raw)
In-Reply-To: <20210511052626.19005-1-wuchi.zero@gmail.com>

On Tue 11-05-21 13:26:26, Chi Wu wrote:
> As the value of pos_ratio_polynom() clamp between 0 and
> 2LL << RATELIMIT_CALC_SHIFT, the global control line should be
> consistent with it.
> 
> Signed-off-by: Chi Wu <wuchi.zero@gmail.com>
> ---
>  mm/page-writeback.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index 0062d5c57d41..e9a4f6cf12bb 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -845,7 +845,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,
>   *     ^ pos_ratio
>   *     |
>   *     |            |<===== global dirty control scope ======>|
> - * 2.0 .............*
> + * 2.0 * * * * * * *
>   *     |            .*
>   *     |            . *
>   *     |            .   *

Generally, pos_ratio is used only within [freerun, limit] range so its
values outside of that range don't matter much. But you're right that
pos_ratio_polynom() clamps the computed value as you describe and we can
visualize that in the graph as well. Just please move the '*' line you add
by one space to the right so that the curve really follows the cubic curve
upto 'freerun' mark (the vertical '.' line).

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR


  reply	other threads:[~2021-05-11  9:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11  5:26 [PATCH] mm/page-writeback: Update the comment of Dirty position control Chi Wu
2021-05-11  9:06 ` Jan Kara [this message]
2021-05-11 10:01   ` chi wu
2021-05-11 10:36   ` [PATCH v2] " Chi Wu
2021-05-11 10:45     ` Jan Kara

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=20210511090632.GH24154@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@fb.com \
    --cc=hcochran@kernelspring.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mszeredi@redhat.com \
    --cc=sedat.dilek@gmail.com \
    --cc=tj@kernel.org \
    --cc=wuchi.zero@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).