From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755194AbcE3OzN (ORCPT ); Mon, 30 May 2016 10:55:13 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:34918 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754704AbcE3OzM (ORCPT ); Mon, 30 May 2016 10:55:12 -0400 Subject: Re: [PATCH block/for-4.7-fixes] writeback: use higher precision calculation in domain_dirty_limits() To: Tejun Heo , Jan Kara References: <57333E75.3080309@huawei.com> <5733D845.2030709@huawei.com> <20160512153234.GS4775@htj.duckdns.org> <20160527183446.GS23194@mtj.duckdns.org> Cc: Fengguang Wu , linux-kernel@vger.kernel.org, Miao Xie , kernel-team@fb.com From: Jens Axboe Message-ID: <574C544E.70905@kernel.dk> Date: Mon, 30 May 2016 08:55:10 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160527183446.GS23194@mtj.duckdns.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/27/2016 12:34 PM, 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. > > Signed-off-by: Tejun Heo > Reported-by: Miao Xie > Link: http://lkml.kernel.org/g/57333E75.3080309@huawei.com > Cc: stable@vger.kernel.org # v4.2+ > Fixes: 9fc3a43e1757 ("writeback: separate out domain_dirty_limits()") Queued up for this series, with the minor comment tweak that Jan suggested. -- Jens Axboe