From: Shaohua Li Date: Mon, 17 Jan 2011 02:52:10 +0000 (+0800) Subject: x86: Avoid tlbstate lock if not enough cpus X-Git-Tag: v2.6.39-rc1~499^2~58 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7064d865af804b9b841e7b9a3e9b653e40c3e5ca;p=pandora-kernel.git x86: Avoid tlbstate lock if not enough cpus This one isn't related to previous patch. If online cpus are below NUM_INVALIDATE_TLB_VECTORS, we don't need the lock. The comments in the code declares we don't need the check, but a hot lock still needs an atomic operation and expensive, so add the check here. Uses nr_cpu_ids here as suggested by Eric Dumazet. Signed-off-by: Shaohua Li Acked-by: Eric Dumazet Cc: Andi Kleen LKML-Reference: <1295232730.1949.710.camel@sli10-conroe> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed