lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 11 Jun 2015 09:17:38 -0700
From:	"Doug Smythies" <dsmythies@...us.net>
To:	"'Prarit Bhargava'" <prarit@...hat.com>
Cc:	"'Rafael J. Wysocki'" <rjw@...ysocki.net>,
	<linux-kernel@...r.kernel.org>,
	"'Kristen Carlson Accardi'" <kristen@...ux.intel.com>,
	"'Viresh Kumar'" <viresh.kumar@...aro.org>,
	<linux-pm@...r.kernel.org>
Subject: RE: [PATCH] cpufreq, Fix overflow in busy_scaled due to long delay


On 2015.06.11 08:01 Prarit Bhargava wrote:
> On 06/11/2015 10:51 AM, Doug Smythies wrote:
>> 
>> On 2015.06.10 16:46 Rafael J. Wysocki wrote:
>>> On Wednesday, June 10, 2015 09:18:45 AM Prarit Bhargava wrote:
>>>> I looked into switching to div64_s64() instead of the 32-bit version in
>>>> div_fp(), however, this would result in sample_ratio and core_busy returning
>>>> 0 which is something we don't want.
>> 
>> ???
>> Due to a great many overflow related issues, div_fp() was changed to div64_s64()
>> a long time ago.

> Doug,
>
> Nope -- in a linux.git tree (up-to-date as of 7:00AM ET this AM)
>
> static inline int32_t div_fp(int32_t x, int32_t y)
> {
>        return div_s64((int64_t)x << FRAC_BITS, y);
> }

> If we do want this to be div64_s64, I can make that change, however, I feel that
> a long delay like this should be ignored in the performance calculations in the
> driver and that's why I chose to go the direction I did.

Prarit,

Apologies to you and the list for the distraction. I mis-read "div_s64" as "div64_s64".
Your suggestion is a good one.

I do maintain that my point about the duration method being flawed is valid.
I proposed a fix for that some time ago.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ