From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7FF1C433ED for ; Tue, 11 May 2021 09:06:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4301261004 for ; Tue, 11 May 2021 09:06:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4301261004 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5E01D6B006E; Tue, 11 May 2021 05:06:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5907B6B0071; Tue, 11 May 2021 05:06:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 40A2F6B0072; Tue, 11 May 2021 05:06:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0028.hostedemail.com [216.40.44.28]) by kanga.kvack.org (Postfix) with ESMTP id 21FAE6B006E for ; Tue, 11 May 2021 05:06:35 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C7651181AEF39 for ; Tue, 11 May 2021 09:06:34 +0000 (UTC) X-FDA: 78128369508.34.C026A66 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf12.hostedemail.com (Postfix) with ESMTP id 811F73FD for ; Tue, 11 May 2021 09:06:18 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 47DD1B14B; Tue, 11 May 2021 09:06:33 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id DCCE01F2B6D; Tue, 11 May 2021 11:06:32 +0200 (CEST) Date: Tue, 11 May 2021 11:06:32 +0200 From: Jan Kara To: Chi Wu 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 Message-ID: <20210511090632.GH24154@quack2.suse.cz> References: <20210511052626.19005-1-wuchi.zero@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210511052626.19005-1-wuchi.zero@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 811F73FD Authentication-Results: imf12.hostedemail.com; dkim=none; spf=pass (imf12.hostedemail.com: domain of jack@suse.cz designates 195.135.220.15 as permitted sender) smtp.mailfrom=jack@suse.cz; dmarc=none X-Rspamd-Server: rspam03 X-Stat-Signature: gwdzkssnh3ih3ofbnx3smwpszuucg517 Received-SPF: none (suse.cz>: No applicable sender policy available) receiver=imf12; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: none/none X-HE-Tag: 1620723978-850604 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 > --- > 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 SUSE Labs, CR