From: Jan Kara <jack@suse.cz>
To: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>, Jan Kara <jack@suse.com>,
Fengguang Wu <fengguang.wu@intel.com>,
linux-kernel@vger.kernel.org, Miao Xie <miaoxie@huawei.com>,
kernel-team@fb.com
Subject: Re: [PATCH block/for-4.7-fixes] writeback: use higher precision calculation in domain_dirty_limits()
Date: Mon, 30 May 2016 10:05:07 +0200 [thread overview]
Message-ID: <20160530080507.GC3690@quack2.suse.cz> (raw)
In-Reply-To: <20160527183446.GS23194@mtj.duckdns.org>
On Fri 27-05-16 14:34:46, Tejun Heo wrote:
> As vm.dirty_[background_]bytes can't be applied verbatim to multiple
> cgroup writeback domains, they get converted to percentages in
> domain_dirty_limits() and applied the same way as
> vm.dirty_[background]ratio. However, if the specified bytes is lower
> than 1% of available memory, the calculated ratios become zero and the
> writeback domain gets throttled constantly.
>
> Fix it by using per-PAGE_SIZE instead of percentage for ratio
> calculations. Also, the updated DIV_ROUND_UP() usages now should
> yield 1/4096 (0.0244%) as the minimum ratio as long as the specified
> bytes are above zero.
The patch looks good to me. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Just one nit below:
> @@ -386,26 +387,28 @@ static void domain_dirty_limits(struct dirty_throttle_control *dtc)
> /*
> * The byte settings can't be applied directly to memcg
> * domains. Convert them to ratios by scaling against
> - * globally available memory.
> + * globally available memory. As the ratios are in
> + * per-PAGE_SIZE, they can be obtained by dividing bytes by
> + * pages.
The comment would be more comprehensible to me is the last sentence was
"... by dividing bytes by number of pages".
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2016-05-30 8:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <57333E75.3080309@huawei.com>
2016-05-12 1:11 ` [BUG]Writeback Cgroup/Dirty Throttle: very small buffered write thoughput caused by writeback cgroup and dirty thottle Miao Xie
2016-05-12 15:32 ` Tejun Heo
2016-05-13 6:11 ` Miao Xie
2016-05-27 18:24 ` Tejun Heo
2016-05-27 18:34 ` [PATCH block/for-4.7-fixes] writeback: use higher precision calculation in domain_dirty_limits() Tejun Heo
2016-05-30 8:05 ` Jan Kara [this message]
2016-05-30 14:55 ` Jens Axboe
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=20160530080507.GC3690@quack2.suse.cz \
--to=jack@suse.cz \
--cc=axboe@kernel.dk \
--cc=fengguang.wu@intel.com \
--cc=jack@suse.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miaoxie@huawei.com \
--cc=tj@kernel.org \
/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).