lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 30 May 2016 10:05:07 +0200
From:	Jan Kara <jack@...e.cz>
To:	Tejun Heo <tj@...nel.org>
Cc:	Jens Axboe <axboe@...nel.dk>, Jan Kara <jack@...e.com>,
	Fengguang Wu <fengguang.wu@...el.com>,
	linux-kernel@...r.kernel.org, Miao Xie <miaoxie@...wei.com>,
	kernel-team@...com
Subject: Re: [PATCH block/for-4.7-fixes] writeback: use higher precision
 calculation in domain_dirty_limits()

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@...e.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@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ