* [PATCH] mm/page-writeback: Update the comment of Dirty position control
@ 2021-05-11 5:26 Chi Wu
2021-05-11 9:06 ` Jan Kara
0 siblings, 1 reply; 5+ messages in thread
From: Chi Wu @ 2021-05-11 5:26 UTC (permalink / raw)
To: akpm
Cc: linux-mm, linux-kernel, tj, mszeredi, sedat.dilek, axboe, jack,
hcochran, Chi Wu
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 * * * * * * *
* | .*
* | . *
* | . *
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/page-writeback: Update the comment of Dirty position control
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
2021-05-11 10:01 ` chi wu
2021-05-11 10:36 ` [PATCH v2] " Chi Wu
0 siblings, 2 replies; 5+ messages in thread
From: Jan Kara @ 2021-05-11 9:06 UTC (permalink / raw)
To: Chi Wu
Cc: akpm, linux-mm, linux-kernel, tj, mszeredi, sedat.dilek, axboe,
jack, hcochran
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/page-writeback: Update the comment of Dirty position control
2021-05-11 9:06 ` Jan Kara
@ 2021-05-11 10:01 ` chi wu
2021-05-11 10:36 ` [PATCH v2] " Chi Wu
1 sibling, 0 replies; 5+ messages in thread
From: chi wu @ 2021-05-11 10:01 UTC (permalink / raw)
To: Jan Kara
Cc: Andrew Morton, linux-mm, linux-kernel, tj, Miklos Szeredi,
sedat.dilek, Jens Axboe, Howard Cochran
Jan Kara <jack@suse.cz> 于2021年5月11日周二 下午5:06写道:
>
> 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
Thanks.
Yes, most time it is. As the follow code and in the
"dtc->wb_dirty < 8" rampup case, dirty pages may break the rules.
. . . .
if (unlikely(wb->bdi->capabilities & BDI_CAP_STRICTLIMIT)) {
long long wb_pos_ratio;
if (dtc->wb_dirty < 8) {
dtc->pos_ratio = min_t(long long, pos_ratio * 2,
2 << RATELIMIT_CALC_SHIFT);
return;
}
if (dtc->wb_dirty >= wb_thresh)
return;
. . .
> 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).
Thanks.I'll correct it later.
>
> Honza
> --
> Jan Kara <jack@suse.com>
> SUSE Labs, CR
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] mm/page-writeback: Update the comment of Dirty position control
2021-05-11 9:06 ` Jan Kara
2021-05-11 10:01 ` chi wu
@ 2021-05-11 10:36 ` Chi Wu
2021-05-11 10:45 ` Jan Kara
1 sibling, 1 reply; 5+ messages in thread
From: Chi Wu @ 2021-05-11 10:36 UTC (permalink / raw)
To: jack
Cc: akpm, axboe, hcochran, linux-kernel, linux-mm, mszeredi,
sedat.dilek, tj, Chi Wu
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..3882405dc051 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 * * * * * * *
* | .*
* | . *
* | . *
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] mm/page-writeback: Update the comment of Dirty position control
2021-05-11 10:36 ` [PATCH v2] " Chi Wu
@ 2021-05-11 10:45 ` Jan Kara
0 siblings, 0 replies; 5+ messages in thread
From: Jan Kara @ 2021-05-11 10:45 UTC (permalink / raw)
To: Chi Wu
Cc: jack, akpm, axboe, hcochran, linux-kernel, linux-mm, mszeredi,
sedat.dilek, tj
On Tue 11-05-21 18:36:06, 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>
Thanks! Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> 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..3882405dc051 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 * * * * * * *
> * | .*
> * | . *
> * | . *
> --
> 2.17.1
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-05-11 10:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-05-11 10:01 ` chi wu
2021-05-11 10:36 ` [PATCH v2] " Chi Wu
2021-05-11 10:45 ` Jan Kara
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).