From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758037Ab0KRO2N (ORCPT ); Thu, 18 Nov 2010 09:28:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59970 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757377Ab0KRO2M (ORCPT ); Thu, 18 Nov 2010 09:28:12 -0500 Message-ID: <4CE537BE.6090103@redhat.com> Date: Thu, 18 Nov 2010 09:27:10 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Lightning/1.0b2pre Thunderbird/3.1.2 MIME-Version: 1.0 To: Wu Fengguang CC: Andrew Morton , Jan Kara , "Li, Shaohua" , Christoph Hellwig , Dave Chinner , "Theodore Ts'o" , Chris Mason , Peter Zijlstra , Mel Gorman , KOSAKI Motohiro , linux-mm , "linux-fsdevel@vger.kernel.org" , LKML Subject: Re: [PATCH] writeback: prevent bandwidth calculation overflow References: <20101118065725.GB8458@localhost> In-Reply-To: <20101118065725.GB8458@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/18/2010 01:57 AM, Wu Fengguang wrote: > On 32bit kernel, bdi->write_bandwidth can express at most 4GB/s. > > However the current calculation code can overflow when disk bandwidth > reaches 800MB/s. Fix it by using "long long" and swapping the order of > multiplication/division. And further, change its unit to pages/second > rather than bytes/second. That allows up to 16TB/s bandwidth in 32bit > kernel. > > Signed-off-by: Wu Fengguang Acked-by: Rik van Riel -- All rights reversed