Skip to content
Commit 32a8df4e authored by Yuyang Du's avatar Yuyang Du Committed by Ingo Molnar
Browse files

sched: Fix odd values in effective_load() calculations



In effective_load, we have (long w * unsigned long tg->shares) / long W,
when w is negative, it is cast to unsigned long and hence the product is
insanely large. Fix this by casting tg->shares to long.

Reported-by: default avatarSasha Levin <sasha.levin@oracle.com>
Signed-off-by: default avatarYuyang Du <yuyang.du@intel.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Dave Jones <davej@redhat.com>
Cc: Andrey Ryabinin <a.ryabinin@samsung.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20141219002956.GA25405@intel.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 536ebe9c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment