lkml.org 
[lkml]   [2010]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] writeback: prevent bandwidth calculation overflow
On Fri, Nov 19, 2010 at 12:29:00AM +0800, Peter Zijlstra wrote:
> On Fri, 2010-11-19 at 00:06 +0800, Wu Fengguang wrote:
> > On Fri, Nov 19, 2010 at 12:02:01AM +0800, Peter Zijlstra wrote:
> > > On Thu, 2010-11-18 at 23:44 +0800, Wu Fengguang wrote:
> > > > + pause = HZ * pages_dirtied / (bw + 1);
> > >
> > > Shouldn't that be using something like div64_u64 ?
> >
> > OK, but a dumb question: gcc cannot handle this implicitly?
>
> it could, but we chose not to implement the symbol it emits for these
> things so as to cause pain.. that was still assuming the world of 32bit
> computing was relevant and 64bit divides were expensive ;-)

Good to know that, thanks! So let's avoid it totally :)


\
 
 \ /
  Last update: 2010-11-18 17:37    [W:0.358 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site