Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1694708

Re: [PATCH] Optimize int_sqrt for small values for faster idle

From Eric Dumazet <eric.dumazet@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] Optimize int_sqrt for small values for faster idle
Date 2017-07-24 15:30 +0200
Message-ID <u6LAS-5qf-19@gated-at.bofh.it> (permalink)
References (1 earlier) <qXucO-qs-11@gated-at.bofh.it> <qXumu-vl-13@gated-at.bofh.it> <qXvLz-1Cx-1@gated-at.bofh.it> <qXxaF-2zt-9@gated-at.bofh.it> <u5gIO-5VF-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 2017-07-20 at 12:10 +0200, Peter Zijlstra wrote:
> On Mon, Feb 01, 2016 at 04:36:38PM -0800, Eric Dumazet wrote:
> > On Tue, 2016-02-02 at 00:08 +0100, Rasmus Villemoes wrote:
> > 
> > > Thanks. (Is there a good way to tell gcc that avg*avg is actually a
> > > 32x32->64 multiplication?)
> > 
> > If avg is 32bit, compiler does that for you.
> > 
> > u32 avg = ...
> > 
> > u64 result = (u64)avg * avg;
> 
> It does not in fact do that :/ See commit:
> 
>   9e3d6223d209 ("math64, timers: Fix 32bit mul_u64_u32_shr() and friends")

Interesting :/

Thanks for letting me know !

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH] Optimize int_sqrt for small values for faster idle Peter Zijlstra <peterz@infradead.org> - 2017-07-20 12:20 +0200
  Re: [PATCH] Optimize int_sqrt for small values for faster idle Eric Dumazet <eric.dumazet@gmail.com> - 2017-07-24 15:30 +0200

csiph-web