summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1362-hcd.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2016-02-16 20:19:18 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-02-17 00:27:16 +0100
commit7024b18ca461bab45e5fb329f6e3d904d5109401 (patch)
tree2dd0d4bc8479ccf843094e6c584fafb7dd3260ac /drivers/usb/host/isp1362-hcd.c
parentLinux 4.5-rc4 (diff)
downloadlinux-7024b18ca461bab45e5fb329f6e3d904d5109401.tar.xz
linux-7024b18ca461bab45e5fb329f6e3d904d5109401.zip
cpuidle: menu: avoid expensive square root computation
Computing the integer square root is a rather expensive operation, at least compared to doing a 64x64 -> 64 multiply (avg*avg) and, on 64 bit platforms, doing an extra comparison to a constant (variance <= U64_MAX/36). On 64 bit platforms, this does mean that we add a restriction on the range of the variance where we end up using the estimate (since previously the stddev <= ULONG_MAX was a tautology), but on the other hand, we extend the range quite substantially on 32 bit platforms - in both cases, we now allow standard deviations up to 715 seconds, which is for example guaranteed if all observations are less than 1430 seconds. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/usb/host/isp1362-hcd.c')
0 files changed, 0 insertions, 0 deletions