mm/page-writeback: Update the comment of Dirty position control
Subsystems (2)
PATCH 1/1 mm/page-writeback: Update the comment of Dirty position control
As the value of pos_ratio_polynom() clamp between 0 and 2LL << RATELIMIT_CALC_SHIFT, the global control line should be consistent with it.
--- mm/page-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page-writeback.c +1 -1
@@ -845,7 +845,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,* ^ pos_ratio * | * | |<===== global dirty control scope ======>| -* 2.0 .............* +* 2.0 * * * * * * * * | .* * | . * * | . *
Signature · 1 line
2.17.1
Jan Kara
maintainerQuoted 14 lines · 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 <[email protected]>--- mm/page-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/page-writeback.c +0
-0
mm/page-writeback.c static long long pos_ratio_polynom(unsigned long setpoint, · line 851
Quoted 8 lines
mm/page-writeback.c +1
-1@@ -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
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 11 lines · Jan Kara <[email protected]> 于2021年5月11日周二 下午5:06写道:
Quoted 9 lines · 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 <[email protected]>--- mm/page-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
mm/page-writeback.c static long long pos_ratio_polynom(unsigned long setpoint, · line 851
Quoted 13 lines
mm/page-writeback.c +1
-1@@ -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_ratiois 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;. . .
Quoted 4 lines
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.
Quoted 5 lines
Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR
PATCH v2 1/1 mm/page-writeback: Update the comment of Dirty position control
In reply to Jan KaraAs the value of pos_ratio_polynom() clamp between 0 and 2LL << RATELIMIT_CALC_SHIFT, the global control line should be consistent with it.
--- mm/page-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page-writeback.c +1 -1
@@ -845,7 +845,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,* ^ pos_ratio * | * | |<===== global dirty control scope ======>| -* 2.0 .............* +* 2.0 * * * * * * * * | .* * | . * * | . *
Signature · 1 line
2.17.1
Quoted 5 lines · 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 <[email protected]>
Thanks! Feel free to add:
Honza
Quoted 20 lines
--- mm/page-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/page-writeback.c +1
-1@@ -845,7 +845,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,* ^ pos_ratio * | * | |<===== global dirty control scope ======>| -* 2.0 .............* +* 2.0 * * * * * * * * | .* * | . * * | . * Signature · 1 line
2.17.1
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR