Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1323655
| From | Andi Kleen <ak@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Optimize int_sqrt for small values for faster idle |
| Date | 2016-02-02 01:10 +0100 |
| Message-ID | <qXwHE-2lh-7@gated-at.bofh.it> (permalink) |
| References | <qW2BY-13z-9@gated-at.bofh.it> <qXucO-qs-11@gated-at.bofh.it> <qXumu-vl-13@gated-at.bofh.it> <qXvLz-1Cx-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Feb 02, 2016 at 12:08:46AM +0100, Rasmus Villemoes wrote: > On Mon, Feb 01 2016, Andi Kleen <ak@linux.intel.com> wrote: > > > On Mon, Feb 01, 2016 at 10:25:17PM +0100, Rasmus Villemoes wrote: > >> On Thu, Jan 28 2016, Andi Kleen <andi@firstfloor.org> wrote: > >> > >> > From: Andi Kleen <ak@linux.intel.com> > >> > > >> > The menu cpuidle governor does at least two int_sqrt() each time > >> > we go into idle in get_typical_interval to compute stddev > >> > > >> > int_sqrts take 100-120 cycles each. Short idle latency is important > >> > for many workloads. > >> > > >> > >> If you want to optimize get_typical_interval(), why not just take the > >> square root out of the equation (literally)? > >> > >> Something like > > > > Looks good. Yes that's a better fix. > > > > Thanks. (Is there a good way to tell gcc that avg*avg is actually a > 32x32->64 multiplication?) I don't think there is, but you could define a custom macro with a fallback on pure 64x64->64. -Andi
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] Optimize int_sqrt for small values for faster idle Andi Kleen <andi@firstfloor.org> - 2016-01-28 22:50 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle kbuild test robot <lkp@intel.com> - 2016-01-28 23:10 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Joe Perches <joe@perches.com> - 2016-01-28 23:20 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Andi Kleen <andi@firstfloor.org> - 2016-01-28 23:50 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle kbuild test robot <lkp@intel.com> - 2016-01-28 23:20 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Joe Perches <joe@perches.com> - 2016-01-28 23:30 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Andi Kleen <andi@firstfloor.org> - 2016-01-28 23:40 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Eric Dumazet <eric.dumazet@gmail.com> - 2016-01-28 23:40 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-01-29 05:00 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Thomas Rohwer <trohwer85@gmail.com> - 2016-01-31 08:30 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-01 22:30 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Andi Kleen <ak@linux.intel.com> - 2016-02-01 22:40 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-02 00:10 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Andi Kleen <ak@linux.intel.com> - 2016-02-02 01:10 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Eric Dumazet <eric.dumazet@gmail.com> - 2016-02-02 01:40 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-02 21:50 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Eric Dumazet <eric.dumazet@gmail.com> - 2016-02-02 22:40 +0100
Re: [PATCH] Optimize int_sqrt for small values for faster idle Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-02-07 22:40 +0100
csiph-web