[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-25542c646afbf14c43fa7d2b443055cadb73b07a@git.kernel.org>
Date: Tue, 15 Mar 2011 07:49:08 GMT
From: tip-bot for Xiao Guangrong <xiaoguangrong@...fujitsu.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
cpw@....com, xiaoguangrong@...fujitsu.com, tglx@...utronix.de,
mingo@...e.hu
Subject: [tip:x86/mm] x86, tlb, UV: Do small micro-optimization for native_flush_tlb_others()
Commit-ID: 25542c646afbf14c43fa7d2b443055cadb73b07a
Gitweb: http://git.kernel.org/tip/25542c646afbf14c43fa7d2b443055cadb73b07a
Author: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
AuthorDate: Tue, 15 Mar 2011 09:57:37 +0800
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 15 Mar 2011 08:30:34 +0100
x86, tlb, UV: Do small micro-optimization for native_flush_tlb_others()
native_flush_tlb_others() is called from:
flush_tlb_current_task()
flush_tlb_mm()
flush_tlb_page()
All these functions disable preemption explicitly, so we can use
smp_processor_id() instead of get_cpu() and put_cpu().
Signed-off-by: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
Cc: Cliff Wickman <cpw@....com>
LKML-Reference: <4D7EC791.4040003@...fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
arch/x86/mm/tlb.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index 55272d7..d6c0418 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -208,11 +208,10 @@ void native_flush_tlb_others(const struct cpumask *cpumask,
if (is_uv_system()) {
unsigned int cpu;
- cpu = get_cpu();
+ cpu = smp_processor_id();
cpumask = uv_flush_tlb_others(cpumask, mm, va, cpu);
if (cpumask)
flush_tlb_others_ipi(cpumask, mm, va);
- put_cpu();
return;
}
flush_tlb_others_ipi(cpumask, mm, va);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists