From: john stultz Date: Wed, 17 Oct 2007 06:27:18 +0000 (-0700) Subject: Use num_possible_cpus() instead of NR_CPUS for timer distribution X-Git-Tag: v2.6.24-rc1~679 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2d9323d139f5c384fa1ef1d74773b4db1c09b3d;p=pandora-kernel.git Use num_possible_cpus() instead of NR_CPUS for timer distribution To avoid lock contention, we distribute the sched_timer calls across the cpus so they do not trigger at the same instant. However, I used NR_CPUS, which can cause needless grouping on small smp systems depending on your kernel config. This patch converts to using num_possible_cpus() so we spread it as evenly as possible on every machine. Briefly tested w/ NR_CPUS=255 and verified reduced contention. Signed-off-by: John Stultz Acked-by: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed