cpumask: use cpumask_var_t in uv_flush_tlb_others.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Sunday, April 5, 2009 - 12:02 pm

Gitweb:     http://git.kernel.org/linus/76ba0ecda0de9accea9a91cb6dbde46782110e1c
Commit:     76ba0ecda0de9accea9a91cb6dbde46782110e1c
Parent:     5c6cb5e2b1798694c859fd3821a34404355e1030
Author:     Rusty Russell <rusty@rustcorp.com.au>
AuthorDate: Fri Mar 13 14:49:57 2009 +1030
Committer:  Rusty Russell <rusty@rustcorp.com.au>
CommitDate: Fri Mar 13 14:49:57 2009 +1030

    cpumask: use cpumask_var_t in uv_flush_tlb_others.
    
    Impact: remove cpumask_t, reduce per-cpu size for CONFIG_CPUMASK_OFFSTACK=y
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
 arch/x86/kernel/tlb_uv.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index d038b9c..8afb691 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -275,6 +275,8 @@ const struct cpumask *uv_flush_send_and_wait(int cpu, int this_blade,
 	return NULL;
 }
 
+static DEFINE_PER_CPU(cpumask_var_t, uv_flush_tlb_mask);
+
 /**
  * uv_flush_tlb_others - globally purge translation cache of a virtual
  * address or all TLB's
@@ -304,8 +306,7 @@ const struct cpumask *uv_flush_tlb_others(const struct cpumask *cpumask,
 					  struct mm_struct *mm,
 					  unsigned long va, unsigned int cpu)
 {
-	static DEFINE_PER_CPU(cpumask_t, flush_tlb_mask);
-	struct cpumask *flush_mask = &__get_cpu_var(flush_tlb_mask);
+	struct cpumask *flush_mask = __get_cpu_var(uv_flush_tlb_mask);
 	int i;
 	int bit;
 	int blade;
@@ -755,6 +756,10 @@ static int __init uv_bau_init(void)
 	if (!is_uv_system())
 		return 0;
 
+	for_each_possible_cpu(cur_cpu)
+		alloc_cpumask_var_node(&per_cpu(uv_flush_tlb_mask, cur_cpu),
+				       GFP_KERNEL, cpu_to_node(cur_cpu));
+
 	uv_bau_retry_limit = 1;
 	uv_nshift = uv_hub_info->n_val;
 	uv_mmask = (1UL << uv_hub_info->n_val) - 1;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
cpumask: use cpumask_var_t in uv_flush_tlb_others., Linux Kernel Mailing ..., (Sun Apr 5, 12:02 pm)