summaryrefslogtreecommitdiff
path: root/net/xfrm/xfrm_algo.c
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2008-06-12 08:43:07 (GMT)
committerIngo Molnar <mingo@elte.hu>2008-06-12 12:29:54 (GMT)
commit7a232e0350940d2664f4de5cc3f0f443bae5062d (patch)
treebb91a53faab7bf6e92df127f8bdb2225cf808925 /net/xfrm/xfrm_algo.c
parent2e084786f6fe052274f1dfa7c675fe4a02cacd6e (diff)
downloadlinux-fsl-qoriq-7a232e0350940d2664f4de5cc3f0f443bae5062d.tar.xz
sched: 64-bit: fix arithmetics overflow
(overflow means weight >= 2^32 here, because inv_weigh = 2^32/weight) A weight of a cfs_rq is the sum of weights of which entities are queued on this cfs_rq, so it will overflow when there are too many entities. Although, overflow occurs very rarely, but it break fairness when it occurs. 64-bits systems have more memory than 32-bit systems and 64-bit systems can create more process usually, so overflow may occur more frequently. This patch guarantees fairness when overflow happens on 64-bit systems. Thanks to the optimization of compiler, it changes nothing on 32-bit. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/xfrm/xfrm_algo.c')
0 files changed, 0 insertions, 0 deletions