diff options
author | Peter Zijlstra <peterz@infradead.org> | 2019-03-05 09:32:02 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-03-19 12:06:11 +0100 |
commit | a23314e9d88d89d49e69db08f60b7caa470f04e1 (patch) | |
tree | bc7de15d3a2de8d4952c24dd65d9d6088d025e98 /fs/inode.c | |
parent | kthread: Do not use TIMER_IRQSAFE (diff) | |
download | linux-a23314e9d88d89d49e69db08f60b7caa470f04e1.tar.xz linux-a23314e9d88d89d49e69db08f60b7caa470f04e1.zip |
sched/cpufreq: Fix 32-bit math overflow
Vincent Wang reported that get_next_freq() has a mult overflow bug on
32-bit platforms in the IOWAIT boost case, since in that case {util,max}
are in freq units instead of capacity units.
Solve this by moving the IOWAIT boost to capacity units. And since this
means @max is constant; simplify the code.
Reported-by: Vincent Wang <vincent.wang@unisoc.com>
Tested-by: Vincent Wang <vincent.wang@unisoc.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Perret <quentin.perret@arm.com>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Rik van Riel <riel@surriel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190305083202.GU32494@hirez.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/inode.c')
0 files changed, 0 insertions, 0 deletions